View Single Post
  #1  
Old 11-28-2012, 08:00 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Talking Exporting Lights in OSG File

Dear Vizard Support,

I had a question regarding lights being exported from 3D Studio Max.

I created a simple model in 3d Studio max with a light attached and grouped the two objects together.

I exported it using your OSG/IVE exporter and enabled lights in the settings.

When I bring the object into Vizard, the object itself is lit, however nothing else appears to be lit in my scene.

Also, if I make copies of the object, the light is removed from the previous objects and moves to the latest one created.
I get why that is probably happening, since the specific light number in OpenGL is being replaced with new info.

However, I was more interested in why the light only appears to be affecting the objects in the group and copies rather than other objects in the scene.

Also, when exporting lights in this way, is there anything I should know about how the Max settings transfer over to Vizard? That is, what settings in the standard lights are transferable to Vizard (attenuation distance, color, intensity, scaling the light in max, etc...)?

I am trying to make the process of setting up lights in a scene easier by not requiring people to: 1) Code in lights themselves and 2) allow them to interactively place pre-generated lights.

Finally, if I do not want the copies to replace the light location, I am guessing I have to open up the group, grab the node names, grab the child and put that light information into my own light class that would control them internally and provide a proper light number for OpenGL. However, your documentation says you can only support the minimum number of lights required for a graphics card to support in OpenGL, 8 lights.

Is there a way of making sure certain lights only influence certain objects? I know you have light groups for more than 8 lights, but that would require me to do some sort of multiple light sorting for different objects that are under the influence in the scene. And if the light limit exceeded 8 for an area being influenced, I'd have to pull some 'light' averaging trickery to reduce the number back down to 8.

I'd rather list whether a light affects a particular object. Does Vizard have any built-in capabilities for this? Seems I half stumbled upon it with the exported light that only affecting certain models.

I attached a picture with the inspector view of the object and the object in a scene with the headlamp turned off. The model in the background has lighting enabled and was not exported with it turned off. If I turn the lamp on, the whole scene is illuminated.

Thanks,
George Lecakes
Director, VR Lab
Rowan University

P.S. I forgot to reset the XForm on the lamp which is why it is so huge! Whoops.
Attached Thumbnails
Click image for larger version

Name:	LampTest.png
Views:	1881
Size:	261.5 KB
ID:	546  
Reply With Quote