Hi Gordon,

Roland, I did not say it was useless, that's your words not mine
I said I would not want any model be loaded no matter the format  changing
my global state, from my own experience and needs that's not the role of a
model in most use cases,  that's the role of the application

I don't see how loading a model with lights or a list of camera views overrides any global state. You're free to decide what to do with these. In particular, I guess you're mindful of your OpenGL light IDs, well your application should be responsible of managing these so that no 2 active lights have the same ID, so you should have a visitor that reassigns light IDs or an update callback on all lights for example.

The truth is that most modeling programs have the ability to add light sources and cameras in the scene. And for many models it makes sense to include them in the actual model. It doesn't mean the light represents the sun, sure that should probably be a global light source managed by the application. But what about a building with lights at the cieling of the rooms? Those lights should be placed by the artist and included in the model, and I'd expect OSG to load these.

Another example: I have an ROV model. I'm not sure you know what that is, it's a submarine remote-operated vehicle. It has a few spotlights and cameras to allow the operator to see where he's driving the ROV (in reality the cameras feed back into the operator's console). In that case, the modeler might very well add the lights and cameras directly to the model, so they move appropriately. In a case like that I would value having a loader that loads that correctly. Then, my app could decide which lights to turn on and attach the actual OSG camera to one of the cameras in the model when needed.

I agree with Robert on this: If you don't want lights in your models then... don't add lights to your models. Coordinate with your art staff and tell them. But IMHO if there's light sources in the file then OSG should load that information, otherwise the loader is incomplete. There are uses, and if you don't want any that's your choice but OSG should not dictate that for all users.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to