Re: [osg-users] Open Flight characteristic not reflected in the current OSG
Greetings Paul! Yea, I came to the same conclusion also! That is why I went to the second choice. Oh! I goofed when I gave you that last corrected code segment. It should be:" Code: colors->push_back(osg::Vec4(_PrimaryColor.r(), _PrimaryColor.g(), _PrimaryColor.b(), 1.0 - getTransparency())); Thank you! David David Glenn --- D Glenn Computer Graphics & Media Systems. www.dglenn.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43337#43337 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
On 9/29/2011 4:44 PM, David Glenn wrote: Turns out that what you did worked but if you looked at the object that I gave you, it's solid ( its suppose to be transparent) The transparency is set at a node that is labeled WATER that introduces the transparency to the face (Primary) color. Hi David -- I finally got a chance to take a look at this. Comments below. So my partner (John Markano) looked at GeometryRecords.cpp around some ware after line 431 (OSG 3.0.1) or 331 (OSG 2.8.1) he added the line: Code: _PrimaryColor.a() = 1.0 - getTransparency(); Then he thought this would have unwanted side effects I agree. :-) (even though I didn't see any) and adopted a change in the same file but at line 257 (OSG 3.0.1) or 157 (OSG 2.8.1) change the code: Code: colors->push_back(_PrimaryColor); to the line : Code: colors->push_back(osg::Vec4(_PrimaryColor.r(), (_PrimaryColor.g(), (_PrimaryColor.b(), 1.0 - getTransparency())); I zero'd in on the exact same change. I think this is the right thing to do. I'll post this to osg-submissions shortly. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
I'm still busy with other tasks. Why don't you post an updated submission to osg-submissions, which contains my changed plus what you added to handle transparency? Then Robert can fold it in, and I can test with your complete file when I finally get some time to take a look. -Paul On 10/6/2011 11:24 AM, David Glenn wrote: Greetings Paul! I tested the second method just about every way I can think of and it meets our requirements, so I'm going with it unless you can come up with a better answer (I can always change it). So check it when you have the time. Thanks! David. David Glenn --- D Glenn Computer Graphics& Media Systems. www.dglenn.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43239#43239 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
Greetings Paul! I tested the second method just about every way I can think of and it meets our requirements, so I'm going with it unless you can come up with a better answer (I can always change it). So check it when you have the time. Thanks! David. David Glenn --- D Glenn Computer Graphics & Media Systems. www.dglenn.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43239#43239 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
I agree, your model has blending enabled, and the face has non-1.0 transparency. It'll be a couple days before I can dig into this. When I fixed the rgb part of this issue, I looked through the flt spec, and don't remember seeing anything about how transparency should be handled. But I'll take another look. -Paul On 9/29/2011 4:44 PM, David Glenn wrote: Greetings Paul: I thought I was going to get a break, but I guess that there is no rest for the weary. Good news is that I have this guy that on-board that's on top of that. Turns out that what you did worked but if you looked at the object that I gave you, it's solid ( its suppose to be transparent) The transparency is set at a node that is labeled WATER that introduces the transparency to the face (Primary) color. So my partner (John Markano) looked at GeometryRecords.cpp around some ware after line 431 (OSG 3.0.1) or 331 (OSG 2.8.1) he added the line: Code: _PrimaryColor.a() = 1.0 - getTransparency(); Then he thought this would have unwanted side effects (even though I didn't see any) and adopted a change in the same file but at line 257 (OSG 3.0.1) or 157 (OSG 2.8.1) change the code: Code: colors->push_back(_PrimaryColor); to the line : Code: colors->push_back(osg::Vec4(_PrimaryColor.r(), (_PrimaryColor.g(), (_PrimaryColor.b(), 1.0 - getTransparency())); Both seem to work in my perspective, but I was wondering what you thought or you had a better idea! ... David Glenn – D Glenn Computer Graphics& Media Systems D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43123#43123 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
Greetings Paul: I thought I was going to get a break, but I guess that there is no rest for the weary. Good news is that I have this guy that on-board that's on top of that. Turns out that what you did worked but if you looked at the object that I gave you, it's solid ( its suppose to be transparent) The transparency is set at a node that is labeled WATER that introduces the transparency to the face (Primary) color. So my partner (John Markano) looked at GeometryRecords.cpp around some ware after line 431 (OSG 3.0.1) or 331 (OSG 2.8.1) he added the line: Code: _PrimaryColor.a() = 1.0 - getTransparency(); Then he thought this would have unwanted side effects (even though I didn't see any) and adopted a change in the same file but at line 257 (OSG 3.0.1) or 157 (OSG 2.8.1) change the code: Code: colors->push_back(_PrimaryColor); to the line : Code: colors->push_back(osg::Vec4(_PrimaryColor.r(), (_PrimaryColor.g(), (_PrimaryColor.b(), 1.0 - getTransparency())); Both seem to work in my perspective, but I was wondering what you thought or you had a better idea! ... David Glenn – D Glenn Computer Graphics & Media Systems D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43123#43123 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
Greetings Paul: Managed to test your patch on OSG 2.8.1 and OSG 3.0.1 before I called it the week and on both it works fine! Thanks! Good Job Paul! ... David Glenn - D Glenn Computer Graphics & Media Systems. D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43120#43120 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
Hi all -- David and I have been discussing this offline, and we've arrived at a fix that will be posted shortly. Turns out the actual issue was that the vertex record flags field had the NO_COLOR bit set, but the OSG flt loader wasn't checking for that bit. If NO_COLOR is set, the color index should be ignored. The code to support the Face record was already set up to use the face color in this situation. For the fix, all we had to do was modify the Vertex record code to correctly check for NO_COLOR, then leave the vertex color invalid in that case. The Face record took care of the rest. -Paul On 9/27/2011 3:30 PM, David Glenn wrote: Paul Martz wrote: On 9/27/2011 10:55 AM, David Glenn wrote: Greetings All: Something I found that is interesting in Creator 3.4 (Open Flight) that is not reflected in OSG. In Creator Face Attributes, under the Drawing tab, If your set the Shade to Gouraud, you are shading at the vector level, hence you usually set the colors at the vector points. What I found interesting is that if you don't set a vector color (leave the index color set to -1), since it is undefended, in Creators view it defaults to the Face color (or Primary Color). Do you have a small reproducer model that could be added to the regression suite at osgfltexport.googlecode.com? This does not happen in the Open Flight plug-in in either 2.8.1 or the latest I've tested 3.0.1 . Can you describe what OSG does and how it's different from the expected behavior? -Paul I know this is not a documented feature, but maybe we need to cover this in the Open Flight Plug-in anyway so we are computable to that standard. It would be better than trying to explain to some of these modelers why they have to brake old habits when from their perspective, it only happens on OSG. ... Thank you! David Glenn - D Glenn 3D Computer Graphics& Media Systems. D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43046#43046 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum Quick answers 1) Yes, Ill make a reproduction you can use, as soon as I can get some free time to make one and to test it to verify the results - just in case! 2) Any elements that appear colored in Creator 3.4 display, appear as white in OSG 2.8.1 and OSG 3.0.1 that I tested. I post something here when I send it there or have any problems. David Glenn - D Glenn 3D Computer Graphics& Media Systems. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
Paul Martz wrote: > On 9/27/2011 10:55 AM, David Glenn wrote: > > > Greetings All: > > > > Something I found that is interesting in Creator 3.4 (Open Flight) that is > > not reflected in OSG. > > > > In Creator Face Attributes, under the Drawing tab, If your set the Shade to > > Gouraud, you are shading at the vector level, hence you usually set the > > colors at the vector points. What I found interesting is that if you don't > > set a vector color (leave the index color set to -1), since it is > > undefended, in Creators view it defaults to the Face color (or Primary > > Color). > > > > Do you have a small reproducer model that could be added to the regression > suite > at osgfltexport.googlecode.com? > > > > This does not happen in the Open Flight plug-in in either 2.8.1 or the > > latest I've tested 3.0.1 . > > > > Can you describe what OSG does and how it's different from the expected > behavior? > -Paul > > > > > > I know this is not a documented feature, but maybe we need to cover this in > > the Open Flight Plug-in anyway so we are computable to that standard. It > > would be better than trying to explain to some of these modelers why they > > have to brake old habits when from their perspective, it only happens on > > OSG. > > > > ... > > > > Thank you! > > > > David Glenn - D Glenn 3D Computer Graphics& Media Systems. > > > > > > D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=43046#43046 > > > > > > > > > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > > -- > -Paul Martz Skew Matrix Software > http://www.skew-matrix.com/ > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Quick answers 1) Yes, Ill make a reproduction you can use, as soon as I can get some free time to make one and to test it to verify the results - just in case! 2) Any elements that appear colored in Creator 3.4 display, appear as white in OSG 2.8.1 and OSG 3.0.1 that I tested. I post something here when I send it there or have any problems. David Glenn - D Glenn 3D Computer Graphics & Media Systems. D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43050#43050 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Open Flight characteristic not reflected in the current OSG
On 9/27/2011 10:55 AM, David Glenn wrote: Greetings All: Something I found that is interesting in Creator 3.4 (Open Flight) that is not reflected in OSG. In Creator Face Attributes, under the Drawing tab, If your set the Shade to Gouraud, you are shading at the vector level, hence you usually set the colors at the vector points. What I found interesting is that if you don't set a vector color (leave the index color set to -1), since it is undefended, in Creators view it defaults to the Face color (or Primary Color). Do you have a small reproducer model that could be added to the regression suite at osgfltexport.googlecode.com? This does not happen in the Open Flight plug-in in either 2.8.1 or the latest I've tested 3.0.1 . Can you describe what OSG does and how it's different from the expected behavior? -Paul I know this is not a documented feature, but maybe we need to cover this in the Open Flight Plug-in anyway so we are computable to that standard. It would be better than trying to explain to some of these modelers why they have to brake old habits when from their perspective, it only happens on OSG. ... Thank you! David Glenn - D Glenn 3D Computer Graphics& Media Systems. D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43046#43046 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Open Flight characteristic not reflected in the current OSG
Greetings All: Something I found that is interesting in Creator 3.4 (Open Flight) that is not reflected in OSG. In Creator Face Attributes, under the Drawing tab, If your set the Shade to Gouraud, you are shading at the vector level, hence you usually set the colors at the vector points. What I found interesting is that if you don't set a vector color (leave the index color set to -1), since it is undefended, in Creators view it defaults to the Face color (or Primary Color). This does not happen in the Open Flight plug-in in either 2.8.1 or the latest I've tested 3.0.1 . I know this is not a documented feature, but maybe we need to cover this in the Open Flight Plug-in anyway so we are computable to that standard. It would be better than trying to explain to some of these modelers why they have to brake old habits when from their perspective, it only happens on OSG. ... Thank you! David Glenn - D Glenn 3D Computer Graphics & Media Systems. D Glenn (a.k.a David Glenn) - Moving Heaven and Earth! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43046#43046 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org