i just wanted 1 light :(

well i am a newbie and i figured out that we cant export lights out of 3ds max :frowning:((((((((
so i tried to put a light in the scene but i have no idea why it wont work
it says that
PointLight name is not defined
and i diddnt get it from the tutorials they r too advanced for me…

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
import math

environ = loader.loadModel ("models/maworld")

plight = PointLight('plight') 
plight.setColor(VBase4(0.2, 0.2, 0.2, 1)) 
plnp = render.attachNewNode(plight.upcastToPandaNode()) 
plnp.setPos(10, 20, 0) 

def SpinCameraTask(task):
        angledegrees = task.time * 6.0
        angleradians = angledegrees * (math.pi /180.0)
        base.camera.setHpr(angledegrees, 0, 0)
        return Task.count

        taskMgr.add(SpinCameraTask, "SpinCameraTask")

pandaActor = Actor.Actor("models/panda-model",{"walk":"models/panda-walk4"})


It seems like you didn’t include the panda libraries. Insert this line into your code.

from direct.showbase import DirectObject
from pandac.PandaModules import *

Also, if your not a programmer and you want to look at your models why not use ppview. It’s part of the max exporter. Just select preview model. Right click and drag up or do to zoom.

tanks man that helped really :slight_smile:

I been working with maya and I was wondering if anyone can explain
how i could use the lights created in Maya in panda, also the texture networks
that i created using maya which are not external files, can they be used in

any help would be great,
thanks MEZ

You will have to re-create the actual light objects in Panda (the exporter will not convert them for you). However, the exporter can convert the position and direction of each of your lights, in the same way it converts the position and direction of any object: by storing that transform on a node. You can find the node in Panda and attach your newly-created light to the same node, so that it will inherit the transform (and thus its position and direction). See “Searching the Scene Graph” in the Panda3D manual.

For textures, you will have to convert them to external files within Maya before you convert your scene to egg. Someone has already asked this question before; see this thread.

Once I create the light objects will the position and orientation be automatically taken on by the light or what do I have to do.

A side question, do you know how to export internal texture to external file from maya?

thanks in advance

You have to find the node that corresponds to the original light from the Maya file, and parent your new light object to that node. It will look something like this:

dlight = NodePath(DirectionalLight('dlight'))
maya_dlight = model.find('**/maya_dlight')

Read the thread I linked to in the above post. The last post in that thread describes how to do this.