Re: [Maya2osg-users] Winding again!
Status: Alpha
Brought to you by:
jtaibo
|
From: PP CG <pp...@cg...> - 2011-10-22 18:44:05
|
Hi, found the place ( code ) of confusion, Line 281 in Mesh.cpp
// Revert normals if opposite (needed for correct lihgting when
using FFP)
// If we are using GLSL instead of FFP, we do not reverse the
normals because
// it is already done in the shader
bool reverse_normals = !Config::instance() -> getArgBool(
"-useGLSL" ) && !doubleSided(mDagPath.node()) && opposite(mDagPath.node());
float normalDirection = ( reverse_normals ? -1.0f : 1.0f ) ;
What to do about it ? I think we should keep the setting, but need to
switch the culling ( backface, frontface ) as well, and that shoud fix
J-S issue, right ?
Cheers, PP
>
> On Wed, Oct 19, 2011 at 9:41 AM, PP CG <pp...@cg...
> <mailto:pp...@cg...>> wrote:
>
> Hi guys,
>
> > I don't remember why is this "flip normals if surface mode is
> > opposite" option required. Probably Peter explained it to me
> some time
> > ago, but I don't remember. It was supposed to work automatically in
> > FFP as well as in GLSL mode.
> >
> > Peter can you throw some light here?
>
> When I added this option I thought one could save a StateSet
> change when
> some surfaces have backface culling and some frontface culling. But
> AFAIK we figured that it was not working correctly, and removed this
> option from the UI.
> @Javier, I think you needed it only for one special case ( Shders ? ).
>
>
> I think I don't need it. It wasnt originally in the export options.
> The opposite flag was checked in FFP as well as in GLSL. There were
> some bugs about this some time ago, but I thought I solved them. I'll
> take a look at it as soon as I can, to check if it is working OK.
>
>
> Regards,
>
> --
> Javier Taibo
>
>
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Ciosco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
>
>
> _______________________________________________
> Maya2osg-users mailing list
> May...@li...
> https://lists.sourceforge.net/lists/listinfo/maya2osg-users
|