Hi Martijn, I have just reviewed your changes, and am rejecting it for now as I feel its tackles the task of object space incorrectly and that fact that it's hardwired to your personal preference is also unacceptable.
In the OSG different elements of state are decoupled and managed independently. This means that you can set just the texture matrix independently from texturing, tex env, tex gen etc. This is crucial to the flexibility and robustly of state management in the OSG. In you modification you hardware an texture matrix operation into TextureCubeMap - which will straight away break any other texture matrix operations that the OSG will manage, and the state will leak out and ruin other texture operations. If one wish to do view dependent settings of the texture matrix then it should be done via a custom TexMatrix, and possible via the TexMatrixNode to introduce this correctly position this now view dependent state attribute. Robert. On Mon, Aug 18, 2008 at 3:36 PM, Martijn Kragtwijk <[EMAIL PROTECTED]> wrote: > Hello all, > > Some time ago I was playing with cube maps, to get nice highlights on our > models. I noticed that the cube maps are by default considered in eye space, > but I'd rather have them in object space, since this is the only way to make > the reflections consistent in a multi-projector setup, and of course it > makes more sense from a physical point of view. Actually, I personally can't > think of a situation where one would explicitly want cube maps NOT to be in > world space, but please go ahead and correct me on this:) > > Anyway, I would like to suggest the attached changes (w.r.t. OSG 2.4) for > using cube maps in world space by default. Just as in SpecularHighlight.cpp, > I load the texture matrix with the inverse of the rotation component of the > view matrix. > > Please let me know what you think, or if I'm missing something obvious:) > > Martijn Kragtwijk > > Martijn Kragtwijk > ([EMAIL PROTECTED]) > -- > Virtual Reality Specialist > Rijksuniversiteit Groningen, afdeling voor High-Performance Computing & > Visualisatie (HPC&V) Nettelbosje 1, 9747 AJ Groningen > telefoon: 050-3639245 / 06-25030665 > http://www.rug.nl/cit/hpcv/ > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
