Demomaster application framework with wxpython navigator


#41

Are you using DirectX or OpenGL ?

It is interesting that the last demo is the most complicated one and these example use the same shaders.

Most likely it is a bug in my code, but I can’t reproduce it here. If you look into share/grass1.py you can see how the grass is implemented there. It shall be easy to understand. If you would like to fix it, I can provide any help you need.


#42

OpenGL (but I tried DirectX, with the same results as before).

About fixing it, to me the code seems to be too scattered and difficult to figure out what is where, sorry; it will take too much time to read it. I will take a look a look later, when I have more time.


#43

here some examples. some demos work as they should, others crash the full application.


hope this explains what i mean:

btw, everything works fine under windows. problems only occur on linux


#44

You have a Nvidia 7600GS with 180.29 drivers, right ? I believe it is powerful enough ? Can other Linux users get an explanation here ?


#45

64b linux, NVIDIA 8600M here, 177 drivers, no problems. I didn’t test with 180 drivers since they were extremely buggy and gave many visual artifacts.


#46

I also have no apparent problems with it; not even close to Nemesis#13’s screenshots. I am running this on Ubuntu 9.04 (Linux) 64-bit, Nvidia 8800GT, version 180 driver.

By the way, great job with the Demo Master.


#47

version 0.4 released.


#48

Again, excellent job!
There are some problems with the vtf water:

  • The simulation is not framerate independent. The waves are much too fast with the 400 fps I’m getting on my crappy card - I had to enable vsync to 60 fps to get it to look reasonable. Might wanna multiply something with globalClock.getDt() or so.
  • The water keeps jittering long after I disturbed it, instead of calming down.
  • The water is moved across edges. Try clicking at the almost edge of the water - the distortion will bleed through the other side. Possible you forgot a WMClamp somewhere?

Also, I couldn’t find a license file - which license does your code use? Or, did you release it in the Public Domain?

PS. haha, I like the animation when you hit the monkey.


#49

sweet addition the waterdemo!

This time I got issues to report:
the ‘shader advanced demo 3’ I can’t make it work properly, in each and every subtask. I’m still on 1.5.4 though, maybe you’re using 1.6.0 code compatibility, I don’t now.

About the waterdemos my card complained about in this way:

:gobj(error): Cg program too complex for driver:/home2/kartoffeln/Work/c/panda/more_stuff/demomaster-0.4/demo_nature/shaders/vertextexture1.sha
:TaskManagerwarning: task initdemo ran for 13.88 seconds
:collide(error): Invalid attempt to detect collision from CollisionRay into CollisionRay!

This means that a CollisionRay object attempted to test for an
intersection into a CollisionRay object.  This intersection
test has not yet been defined; it is possible the CollisionRay
object is not intended to be collidable.  Consider calling
set_into_collide_mask(0) on the CollisionRay object, or
set_from_collide_mask(0) on the CollisionRay object.

but beside that and to missing the reflection and refraction effects, the awesome distortion simulation was there and with excellent framerate (for my junk card of course).


#50

Oh yes, I only test it with vsync-on. Will look into it later. It is great that it can run 400 fps on your machine !

I also find that the water cannot calming down. I am not sure if it is the dynamic property after integrating the differential equation, or it is my implementation issue. As you can see I setup a plane with another camera and shader to compute the dynamic water texture, I would like to interface the shader directly instead of go through the camera. Is it possible ?
(You can play with the grid ratios property to get different effects also.)

WMClamp…ok, I will try later.

For licenses, it is public domain I believe. Since it is a collection of demo, code from the forum, reference implementation on Nvidia demo, … etc., not much real invention here. Hopefully it can be a reference for everyone later…sometimes it is quite useful to refer to working code when encounter a problem.

The animation on the monkey hitting, it is not my invention neither. It is a demo I found in the forum…something like a planet crash game…sorry that I forget the link and cannot mention the author here.


#51

Thank you for reporting, it is great to know that it can run on your hardware and os.

shader advanced demo 3, it is the mother of the vtf demos. I test the tricks here. I forget to remove it, but you can run it with “demomaster.py f”. Only one or two methods there is looking for a texture in tmp directory. Most likely I will remove this demo in the coming release.

The water demo complaints, that’s normal. It is because the code I put there is buggy. I have not fixed them yet as I am busy on other demos.

I want to put up the water demo with refraction effect. May be the next one with some fishes swimming around … not sure if I can do it.


#52

i can’t try it with other configurations (other drivers, window manager, xorg config) at the moment, due to some update issues.

and sorry for the late reply, but i wasn’t able to post because of some forum bugs >_>


#53

EDIT: Now I get it, you have to start demomaster.py :smiley:
Yeah, it works, but the window layout could be better.

Hm the two vtf water demos complain my video card was not poweful enough, but I have a GF 120.

EDIT2: demo_terrain

Failed to load heightfield image demo_terrain/models/land01-map.png!

But the image is there at that path.

First ever Python crash in ODE Demo 1:

ODE INTERNAL ERROR 1: assertion "bNormalizationResult" failed in _dNormalize4() [../../include/ode/odemath.h]
Abort trap

Error says error in libpandaode.dylib


#54

Which version of panda are you using ? Current version only tested with 1.5.4

Are you on Linux or Windows ? Current version only tested on Windows XP, but some users can run it fine with Linux.

Are you using DirectX or OpenGL driver ? DirectX driver seems buggy.

Hm the two vtf water demos complain my video card was not poweful enough, but I have a GF 120.

Have you started the program by “demomaster.py f” ?
If so, what do you see in the console output ?


#55

I am on OS X.5 with Panda 1.6.

With f the vtf water demos work and they look OK, but the heightmap for the ground is not loaded.

:grutil(error): Failed to load heightfield image demo_terrain/models/land01-map.png!
:grutil(error): No valid heightfield image has been set!


:grutil(error): Failed to load heightfield image demo_nature/textures/ground.tga!
:grutil(error): No valid heightfield image has been set!

#56

I see. I am not familiar with OSX.

I believe 1.6 has some changes on ODE. I update the demomaster to 1.6 version later.

Are you able to run other demos, especially the terrain demos in demomaster ?


#57

With 1.6.0 the terrain shows that error as well, for me - everything else worked fine in 1.6.0.


#58

Some stuff that does not work:

GeoMipTerrain - Yarr

It crashes when I start the Grass demo 3:

Assertion failed: okflag at line 121 of built/include/virtualFileSystem.I
Traceback (most recent call last):
  File "/Applications/Panda3D/1.6.0/demomaster-0.4/demomain.py", line 203, in InitDemoLater
    demo.InitScene()
  File "./demo_nature/grass3demo.py", line 43, in InitScene
    self.particle.loadConfig(Filename("demo_nature/particles/fire2.ptf"))
  File "Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/particles/ParticleEffect.py", line 201, in loadConfig
AssertionError: okflag at line 121 of built/include/virtualFileSystem.I
:task(error): Exception occurred in PythonTask initdemo
Traceback (most recent call last):
  File "/Applications/Panda3D/1.6.0/demomaster-0.4/demomaster.py", line 38, in <module>
    run()
  File "Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/showbase/ShowBase.py", line 2420, in run
  File "Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/task/TaskNew.py", line 471, in run
  File "Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/task/TaskNew.py", line 429, in step
  File "/Applications/Panda3D/1.6.0/demomaster-0.4/demomain.py", line 203, in InitDemoLater
    demo.InitScene()
  File "./demo_nature/grass3demo.py", line 43, in InitScene
    self.particle.loadConfig(Filename("demo_nature/particles/fire2.ptf"))
  File "Panda3D-tpl-rw/Panda3D/1.6.0/lib/direct/particles/ParticleEffect.py", line 201, in loadConfig
AssertionError: okflag at line 121 of built/include/virtualFileSystem.I

The simple water shader example works, but there are black dots on the surface.

Shaders advance demo 3 looks different with the f startup option on or off. With f I get this in Terminal:

Assertion failed: do_has_ram_mipmap_image(n) at line 2793 of panda/src/gobj/texture.cxx
Traceback (most recent call last):
  File "/Applications/Panda3D/1.6.0/demomaster-0.4/wxPanelControl.py", line 455, in executeFunction
    entryfunction()
  File "./demo_shaderadv/shaderadv3.py", line 386, in Demo09
    tex.store(self.screenImageNew)
AssertionError: do_has_ram_mipmap_image(n) at line 2793 of panda/src/gobj/texture.cxx

The rotating Earths sample works, but gloss maps enabled look no different.

The demo with those many moons gives me:

:gobj(error): Texture::read() - couldn't read: ../../../../../../../../models/textures/MoonMap.jpg
:gobj(error): Unable to find texture "../../../../../../../../models/textures/MoonMap.jpg" on model-path /Applications/Panda3D/1.6.0/demomaster-0.4/demo_showshaders:/Applications/Panda3D/1.6.0/demomaster-0.4/share:/Applications/Panda3D/1.6.0/demomaster-0.4/demo_softshadow:/Applications/Panda3D/1.6.0/demomaster-0.4/demo_shadermodels:/Applications/Panda3D/1.6.0/demomaster-0.4/demo_shaderbasic:/Applications/Panda3D/1.6.0/demomaster-0.4/demo_shaderadv:/Applications/Panda3D/1.6.0/demomaster-0.4:/Applications/Panda3D/1.6.0:/Applications/Panda3D/1.6.0/models

Looks like a path error.

Shaders - Advance Demo 3 -> Shader Test3 test

:gobj(error): Texture::read() - couldn't read: tmp/test.png
:gobj(error): Cg program too complex for driver:/Applications/Panda3D/1.6.0/demomaster-0.4/demo_shaderadv/shaders/vertextexture.sha

It’s hard to tell if something looks right without reference screenshots :wink:

Another annoying thing is that the columns on the right seem to have a fixed size, you cant enlarge them.


#59

oh I didn’t see this message, thanks for the suggestions for how to track down the problem, I’ll give this a try tonight. I really hope I can get this working, because that demo video looks awesome!


#60

hi Bradamante

Thank you for the report.

Obviously something is changed in the terrain api in 1.6.0. Since I am busy on some other demos, I will look into the upgrade some time later. (can pro-rsoft give some advice here ? if it looks like a simple fix to you ??)

Grass Demo 3, the program tries to load the smoking effect file called fire2.rtf
Are you able to run the particle effect demos in Panda ? There is no magic in this file, except it references a png file for smoking effect. You may look into this file, change the png file path, and etc, to run it in the Panda Particle effect panel come with the sample program.

Water shader demo, you can try changing the grid size property for adjusting the level of normal deviation. Or can you upload the screen for me to take a look ? Are you running with Video-sync on ?
Current limitation is mentioned by pro-rsoft two days ago.

Shader Advance Demo 3, it is a mistake. I will remove it or fix it in the coming release. I use this sample to test out the tricks to develop the water demos. To run it, you need to specify “demomaster.py f” because it uses vertex texture fetching feature.

Rotation earth sample, … not sure as I am not the author and have not looked into details.
MoonMap.jpg is missing, yes, it is missing…not sure if I have not copied all the files from the demo. You can refer to the original demo from the link provided in the sample program.