Hmm, well maybe I am not explaining the problem too well. Here is another way of explaining it.
1) I load files. They have materials on them. 2) I also create nodes dynamically. They have bound colors. 3) When the dynamic geometry is drawn BEFORE the loaded geometry, then the color of the dynamic geometry shows up in the loaded geometry (and on down the scenegraph) until the next color is set with a bound color. 4) When the dynamic geometry is drawn AFTER the loaded geometry, then the problem does not occur. You suggested that the problem could be resolved by setting a bound color to each of the loaded files. So, essentially after loading the file, go in to the geom of the loaded file and set a bound color to the geometries. My question was whether or not it would be easier to set a material in my dynamically created geometry some other way (not with a color bind) so that the color state would automatically "pop" as I traversed the scenegraph. Does that make sense? Dumping the model to an OSG reveals what I think it does. Namely that there is a color on the dynamically created geom and not on the loaded geom. - Paul > Hi Paul, > > I'm afraid there a few too many unknowns for me to point you to the > solution. I'd recommend writing out the model to .osg and then > browsing through it to see if everything is where you expect it to be. > > Robert. > > On 11/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Hi Robert, >> >> So when I load a model (from an obj converted to an ive) with a material >> associated with it, doesn't that solve the problem for me? Well >> obviously >> it doesn't, but why not? Do I need to go through each of the loaded >> models >> and check them after they are loaded to ensure that there is a color >> binding for them? Isn't there an easier way? Like I said, the problem >> model does have a material. Is it a difference between using the >> material >> in the loaded file and a color binding in the dynamic model? I can >> certainly create a material to use for the dynamic model instead of >> doing >> color binding if that is better. >> >> - Paul >> >> > HI Paul, >> > >> > You need to a make sure all your osg::Geometry have a colour array >> > attached, otherwise colours will bleed into one another. >> > >> > Robert. >> > >> >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://openscenegraph.net/mailman/listinfo/osg-users >> http://www.openscenegraph.org/ >> > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
