Hi Everyone,
I have a stupid newbie question. I think I’ve found a few possible ways to circumvent this problem here on the forums, but I’d really like to know if I’m just doing something wrong here.
I can run the normal mapping demo just fine (looks really awesome), whether I use the auto shader generator or use the included manual shader. I have this script:
import direct.directbase.DirectStart
from pandac.PandaModules import PointLight
from direct.task import Task
from pandac.PandaModules import VBase4
from pandac.PandaModules import TextureStage
sphere = loader.loadModel('sphere')
sphere.setShaderAuto()
sphere.reparentTo(render)
sphere.setPos(0, 5, 0)
sphCol = loader.loadTexture('colormap.bmp')
sphColStage = TextureStage('colstage')
sphColStage.setMode(TextureStage.MModulate)
sphere.setTexture(sphColStage, sphCol)
sphNrm = loader.loadTexture('layingrock-n.jpg')
sphNrmStage = TextureStage('nrmstage')
sphNrmStage.setMode(TextureStage.MNormal)
sphere.setTexture(sphNrmStage, sphNrm)
key = PointLight('key')
key.setColor(VBase4(1, 1, 1, 1))
keyPath = render.attachNewNode(key)
keyPath.setPos(5, 0, 0)
sphere.setLight(keyPath)
run()
When I run it, I get this output on the console:
I get this output on all of the Panda scripts that I run.
colormap.bmp is an image I have. layingrock-n.jpg is the normal map included with the normal mapping demo.
The problem is, when I run the script, I see my model with the color map, but no noticeable bump. I tried removing the color map stage to see if it was there but I just couldn’t see it, but no dice.
As an aside, I also rendered out a grayscale noise image to use in place of a normal map. I ended up with just big splotches of black on the surface of my sphere, and the light moves through to the opposite side of the sphere.
I’m running an nVidia GeForce 8800 with the latest drivers installed.
Help!
Thanks!
Robby