WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #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:	1852
Size:	261.5 KB
ID:	546  
Reply With Quote
  #2  
Old 12-04-2012, 04:20 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Exporting lights through Max is currently not supported and causes the type of issue you're seeing.

It is possible to disable lights on certain nodes. In the following code only light1 is disabled on the basketball:
Code:
import viz
import vizact

viz.setMultiSample(4)
viz.fov(60)
viz.go()

soccerball = viz.addChild('soccerball.osgb')
basketball = viz.addChild('basketball.osgb')
volleyball = viz.addChild('volleyball.osgb')

soccerball.setPosition([-0.5,2,1.5])
basketball.setPosition([0,2,1.5])
volleyball.setPosition([0.5,2,1.5])

headLight = viz.MainView.getHeadLight().disable()
light1 = viz.addLight()
light2 = viz.addLight()
light2.setEuler(0,90,0)

basketball.disable(viz.LIGHT0 + light1.getNumber())
Reply With Quote
  #3  
Old 12-06-2012, 08:02 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Thank you Jeff. Are there any plans to support lighting in the future (within the next year or so), or do you think I should just go ahead with my own system for handling importing lights from 3D Studio Max in the meantime?
Reply With Quote
  #4  
Old 12-07-2012, 09:49 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
There are no plans for supporting light imports. So yes, I would say go ahead with your own system for that.
Reply With Quote
Reply

Tags
3d studio max, lights

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing of an imported .py file Uttama_vizard Vizard 2 05-04-2010 06:18 AM
IVEx file extenstion unrecognised. sindi Vizard 2 12-10-2009 01:20 AM
Read file....many issues Uttama_vizard Vizard 9 07-08-2008 02:16 PM
File Management Uttama_vizard Vizard 2 07-01-2008 09:44 AM
Trouble Exporting to .ive le perdusier Vizard 2 11-27-2007 04:31 PM


All times are GMT -7. The time now is 10:34 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC