I am new to Panda3D. I in a progress of creation of wireless networks propagation tool and I want to use Panda3D to visualize the results of calculations.
I have read the most of the manual and reviewed all examples. These were really useful. However, I still have got one problem.
I would like to apply different glow / lights to some surface, to some flat object (plane or cube or whatever). I am currently thinking of two possible solutions: glow and many point lights.
However I don’t know how to create the glow programmatically on the surface of some object. The example shows how to create glow using a map built into a model. Can someone give me some hints how to do it in python?
Second thing are point lights. I would need hundreds or thousands of point lights to visualize the wave intensities at given point. I have read that it would be rather not possible because of performance issues (the number of lights as I presume should not be bigger than lets say 10 or so). Am I thinking correctly?
I also thought about fog but did not get any good results.
Please share some thoughts about how to accomplish this.
Thanks in regards
Hi, and welcome to Panda3d
so . basically. you want to visualize the simulation of electromagnetic waves?
like some sort of water-like simulation where waves propagate through air?
if so, i’d go for animated texture. no matter if you swap images or use video textures. using python to manually manipulate pixels during runtime will propably too slow. and as you said. the number of lights should be kept low too.
can you describe what sort of data you’r trying to display? are those 2d-arrays? textures? volumes? are they animated or static?
Hi, thanks for quick reply.
I want to visualize 2d data on some surface (floor). No waves are needed to be visible, only a smooth color transitions, like in WinProp program:
No animation is needed.
And one more question, why simple plane exported from Blender to Egg and loaded into panda won’t show whereas simple cube is visible?
Right, most graphics card only support a very limited number of lights. There is a way to overcome this limit though - by use of deferred shading. Using this way, lighting is applied as a postprocessing filter, after the scene is rendered.
Have you seen Panda’s “Fireflies” sample program? It shows a proof-of-concept implementation of deferred shading (it’s said to be a somewhat poor implementation, and it does some things a lot more complex than needed, I believe, though).
Firefiles are fantastic! The demo loads slowly on my PC (Athlon 3600, 4GB RAM, Geforce 7600), I thought it hangs and therefore missed it! Will digg into it
However, I am afraid that it will not run on some integrated graphics chips like cheaper laptops - I own one of these. And I will need to present it as my bachelor thesis here in Warsaw University of Technology.
Do you actually need to render thousands of point lights, or just thousands of points? There’s an important difference: each point light will illuminate objects around it (but is not itself visible). Each point, on the other hand, is a visible point onscreen which illuminates nothing around it.
Also, the former will require lots of graphics horsepower and probably cannot be done on an integrated graphics card. The latter is easy and can be done on any hardware with a simple particle system.
I need smooth transitions between color points. The lights are good because the transitions are created automatically. So far I am changing the Fireflies demo to see how many lights I would need and how many are renderable.
Are you sure you don’t just want a mesh with color set on the vertices? That will also create smooth transitions between the color points, and it is also trivially easy on any hardware.
Maybe I do want it If you could point me to some example I would be grateful I am looking for good and fast solution.
Have you tried assigning vertex color to your plane mesh in Blender? You’ll need enough vertices to show the color transitions, not just one vertex at each corner (the transitions are linearly blended between vertices).
As to why your plane model isn’t visible, perhaps you’re looking at the back side of the plane.