I am interested in effects for a while.
I find that setting bloom or cartoon ink is too easy. So I thought it would be nice to try something harder. In reference I have found this:
So I’ve written this:
import direct.directbase.DirectStart
from pandac.PandaModules import *
from direct.filter.CommonFilters import CommonFilters
class VolumtericLightTest():
def __init__():
fltr = CommonFilters(base.win, base.cam)
fltr.setVolumetricLighting(0,
32,
5.0,
0.1,
0.1)
alight = AmbientLight('amibent')
alight.setColor(VBase4(0.3, 0.3, 0.3, 1))
alnp = render.attachNewNode(alight)
plight = PointLight('point')
plight.setColor(VBase4(0.8, 0.8, 0.8, 1))
plnp = render.attachNewNode(plight)
plight.setPos(0, 0, 1)
render.setLight(alnp)
def panda():
pnda = loader.loadModel("panda")
pnda.reparentTo(render)
base.camera.lookAt(pnda)
panda()
run()
And… nothing.
What’s the problem?