Originally created by: val... (code.google.com)@gmail.com
*What steps will reproduce the problem?*
1. Put attached files to any folder.
2. With ufo load and place both .xml's one near another.
*What is the expected output? What do you see instead?*
I'm expected to see two objects with same color but different sizes.
Actually, smaller objects look much brighter.
If I change in object_scale.xml 0.5 to 1,5 then bigger object look much darker.
*Any output in the console (black window)?*
Nothing special.
*What version of the product are you using (when using GIT version, please
mention date or Hudson build number)?*
Latest git updated 21jan2011 12:00UTC
*What operating system and graphics card?*
Ubuntu 10.04
GeForce 7600GS
*Please provide any additional information below or as attachment (Avoid
expiring external links, such as to imageshack/pastebin/...).*
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: cumuluni... (code.google.com)@gmail.com
Works perfectly well here, can't confirm the issue.
OpenSuse nVidia 7400. Proof attached.
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: gijsrooy
Val, can you attach a screenshot of the problem?
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: val... (code.google.com)@gmail.com
Yes.
Left is
<animation>
<type>scale</type>
<x-offset>2</x-offset>
<y-offset>2</y-offset>
<z-offset>2</z-offset>
</animation>
Right up is no animation
Right down is
<animation>
<type>scale</type>
<x-offset>0.5</x-offset>
<y-offset>0.5</y-offset>
<z-offset>0.5</z-offset>
</animation>
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: val... (code.google.com)@gmail.com
I found when this happens. For some reason I have been disabled materials shaders.
If they are turned on in the rendering menu, the colors become identical for all object.
So it is no problem for most users, and even who disable shaders rarely use <scale>, but this is.
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: lauri.pe... (code.google.com)@gmail.com
If this happens without shaders and with scale, I assume it is caused by <scale> also scaling normals. Solution would be to run glEnable(GL_NORMALIZE); if shaders (that normalize the normal length in all cases) are not used and scaling is used.
See http://www.opengl.org/resources/features/KilgardTechniques/oglpitfall/ for reference.
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: lauri.pe... (code.google.com)@gmail.com
(No comment was entered for this change.)
Labels: Rendering fixable
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bre... (code.google.com)@gmail.com
So what/where exactly is a fix required here? Is this an issue of a specific shader, something to be fixed in our fgfs/simgear - or an OSG issue?
Labels: Priority-Medium
Cc: lauri.pe...@gmail.com timoor...@gmail.com
Status: Accepted
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: lauri.pe... (code.google.com)@gmail.com
I guess it should be checked if the transform doing the scale animation has GL_NORMALIZE or GL_RESCALE_NORMAL enabled, and if not, adding that and seeing if it helps.
See http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00902.html#_details
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bre... (code.google.com)@gmail.com
Lauri, well spotted! Adding
osg::StateSet* stateset = getOrCreateStateSet();
stateset->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
to the scale transformation fixes the issue (even with shaders disabled).
GL_RESCALE_NORMAL also works.
Which should we add - or both?
Status: Dev
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: lauri.pe... (code.google.com)@gmail.com
I think using GL_NORMALIZE would be better, since that always normalizes normals to unit length, which I assume is what we want.
GL_RESCALE_NORMAL only scales to the original length, I think. So if somewhere the normal length got wrong, it will show wrong results. And it only works with uniform scaling. So let's go with GL_NORMALIZE.
In some cases rescaling might be a bit faster than normalizing, but I don't think the difference can be noticed...
See: http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bre... (code.google.com)@gmail.com
Fix pushed:
http://www.gitorious.org/fg/simgear/commit/3c0966279c5bb27bd0cf9f3d850feb03ece783e4
=> Please test if it works for you.
Status: Testing
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bre... (code.google.com)@gmail.com
(No comment was entered for this change.)
Status: Fixed