Demomaster application framework with wxpython navigator


#141

Hi!

I’m new to Panda3D (and 3D graphics programming in general) – but I’m attempting modify clcheung’s vertex texture fetching example (watervtfdemo1_new.py) to add some islands to an “ocean”. However, when I add an island there is a very strange reflection artifact – basically the “underside” of the island (the view of the island from beneath the water) is reflected over the entire waterplane (see attached images below).

I read the whitepaper from NVIDIA on which this demo was based and they mention using a technique to reflect/refract objects that are above the plane by computing view of the objects from below the plane and mapping that onto the water plane. This seems to work very well for objects that are on the periphery of the waterplane and for things like skyboxes which are high above the plane. But when I add an object close to the surface (e.g. an island) it creates a massively distorted view of those objects which fills large parts (or all) of the waterplane.

I was curious if anyone has a simple solution to this. Is there a way to make a NodePath or GeoMipTerrain object (i.e. the island) invisible from a certain viewing angle?

I thought that perhaps if I could make only the island be “invisible” from beneath the water, then it won’t be reflected by the water at all. Also I only want to clip the island (i.e. make it transparent from the viewpoint of beneath the water) but need to preserve the view of the sky and mountains, etc so they are reflected by the water.

Thanks in advance for any insight!
Tim





#142

You should use a clipping plane by adding a ClipPlaneAttrib to your reflection camera to make sure that all content below the water plane is clipped from the reflection. Search for water examples around the forums, many of them include code to do that.


#143

thanks, I’ll give that a try!


#144

I have downloaded the demomaster application framework 0.8.
Using Panda3d 1.8.1 the following error shows up when running demomaster.py:

...
DOFShaderDemo : [Shaders - DOF]
ShaderFacingRatioDemo : [Shaders - Facing Ratio]
ShaderHatching1Demo : [Shaders - Hatching 1]
ShaderHatching2Demo : [Shaders - Hatching 2]
ShowShadersDemo : [Shaders - Show Models with various effects]
ShowShadersDemo : [Shaders - Show Panda Shaders]
SunShaderDemo : [Shaders - Sun]
SoftShadowDemo : [Shadow - Shadow Manager from pro-rsoft]
Shadow2Demo : [Shadow - Shadow Manager Test 2]
Traceback (most recent call last):
  File "demomaster.py", line 51, in <module>
    room = demomain.Container(fmultithread, demolist, None)
  File "s:\tmp\demomaster-0.8\demomain.py", line 93, in __init__
    self.ActivateGUI()
  File "s:\tmp\demomaster-0.8\demomain.py", line 272, in ActivateGUI
    self.fMouseDisabled = (base.mouse2cam.getParent() == base.dataUnused)
AttributeError: ShowBase instance has no attribute 'dataUnused'

Any ideas how to fix this?

PS: Running on Windows 8 with Pyhton 2.7.3


#145

find this line
File “s:\tmp\demomaster-0.8\demomain.py”, line 272, in ActivateGUI
self.fMouseDisabled = (base.mouse2cam.getParent() == base.dataUnused)

change from
self.fMouseDisabled = (base.mouse2cam.getParent() == base.dataUnused)
with
self.fMouseDisabled = (base.mouse2cam.getParent() == True)


#146

Yes that worked, thanks for your quick reply!


#147

I decided to resurrect demomaster-0.8 on the new version of Panda3D 1.10.0. Got a few screenshots.






artifacts :slightly_frowning_face:


#148

hello, thanks for your work, it’s possible to share new code (in github for example)


#149

I do not have the right, because there is no license. There is also a lot of need to redo the code.


#150

Why you decided to resurrect demomaster-0.8 on the new version of Panda3D 1.10.0 ?
if you can’t share it…


#151
  1. In order to evaluate the progress in the work of Panda3D. After all, many years have passed.
  2. Update the screenshots in the topic, as the old ones are no longer available. I also think to make a video.

In fact, running the demo wizard at 1.10.0 is not such a big job.


#152

Okay, I understand.
It’s possible to share in private ( with private link for example) ?
or do not have the right because code have no license ?


#153

This does not work without hacking, I also deleted the WX. When I finish, I’ll let you know. And I think I can only share with the condition for review.


#154

Okay, thank you.
It would be necessary to find the author of these codes, if he wants to share these codes with the community he could add a license.
it could help in this discussion: