Lights
#1
Hi there,

I work with Reader3ds and it realy works fine.

The cameras defined in 3ds-files are easy to handle and I need an equivalent for lights.

Here is the question: Is there a possibility to handle defined lights like Cameras?

I can see whether lights are defined by ImportLights. But I would like to have something like Cameras to get the list of all lights defined in the 3ds. The way through the LogicalTreeHelper ist not that elegant...

Thanks for answers
#2
In the current version there is no lights collection (as it is for Cameras). But you can simply get all the light with the following code:

Code:
Model3DGroup lightsGroup = null;
if (_current3dsReader.NamedObjects.ContainsKey(Ab3d.Reader3ds.AllLightsGroupName))
    lightsGroup = _current3dsReader.NamedObjects[Ab3d.Reader3ds.AllLightsGroupName] as Model3DGroup;

If the 3ds file contains lights they are stored into a new Model3DGroup that is named with Ab3d.Reader3ds.AllLightsGroupName ("__AllLightsGroup") name. It can be easily accessed with NamedObjects dictionary.


I am currently working on new version of Reader3ds and will also add a Lights collection to simplify getting the lights.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)