Traceback (most recent call last):
File "VLT.py", line 22, in <module>
File "VLT.py", line 7, in __init__
AttributeError: CommonFilters instance has no attribute 'setVolumetricLighting'
Even though it is in the reference.
At this point, I will have to turn it over to someone more knowledgeable than I with regards to the lighting effects.
The first argument to setVolumetricLighting should be a NodePath.
You need to create a sphere, make it the color of the sun, reparent it to your light (or reparent your light to it), and pass it as first parameter.
I know this is an old thread, but I haven’t found any clearly newer ones to deal with volumetric lighting.
For several days I have been trying to figure out how to set volumetric lighting in Panda3D. I tried, say, the last example by @MentalDisaster from this thread:
I copied and used it exactly as in this post, only so as not to have to manually zoom out the camera each time, I added a line of code:
It seemed to me that volumetric lighting should make a given object begin to cast visible light rays. Something like:
Instead, against the background of the object, I see some faded copy of it.
Is this really what it should look like? Is this how the Volumetric Lighting filter works in Panda3D? Because maybe it’s not a bug, but a feature and I have wrong expectations?
Since I read that the caster should be basically a light source, I changed the line setting the volumetric lighting filter to:
Thank you. But… A strange thing: I do not observe this Volumetric Lighting effect on my setup. I copied EXACTLY your code and after running (and manually centring the panda object) I see something completely different: