@nehon: hehe, yea, sorry. Hadn’t read the rest of the thread - only watched the video as I posted it.
Downloaded the latest build - but can’t run the test:
[java]SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.material.Material.selectTechnique(Material.java:616)
at com.jme3.material.Material.autoSelectTechnique(Material.java:626)
at com.jme3.material.Material.render(Material.java:687)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:435)
at com.jme3.post.FilterPostProcessor.renderProcessing(FilterPostProcessor.java:146)
at com.jme3.post.FilterPostProcessor.renderFilterChain(FilterPostProcessor.java:186)
at com.jme3.post.FilterPostProcessor.postFrame(FilterPostProcessor.java:195)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:720)
at com.jme3.renderer.RenderManager.render(RenderManager.java:737)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:216)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:144)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:141)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:198)
at java.lang.Thread.run(Thread.java:680)
[/java]
Macbook - NVIDIA GeForce 320M .
Hi @all,
i have to say that the water looks really really great. Especially it’s quiet easy to setup. Great work. I tried to setup the water effects with the use of the WaterFilter and generated a simple terrain with the hillheightmap. All works except the background. There are water-artefacts in the background. The TestPostWater uses a skybox/skysphere but i’m using a skydome instead. Could that cause the problem?
Any ideas?
Regards
Moe
Edit: Can someone explain what the difference is between the WaterFilter and the SimpleWaterProcessor? I know that the use of filters requires a filterpostprocessor. But i saw that there are the same methods in both classes.
@javatar it should be fixed now
@oOMoeOo there is a special treatment for the sky bucket for the reflection map, so maybe it can have weird effects if you are not using the “conventional” sky. I’m gonna test with some generated terrain, but could you tell me how do you set up your sky dome please?
SUPERRR!!! Thank you a lot!!! Big respect!!!
I have got crash and log with jme3test.water.TestPostWaterLake.
09.01.2011 16:43:01 com.jme3.material.MaterialDef
INFO: Loaded material definition: Default GUI
09.01.2011 16:43:01 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Gui Node)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (Statistics View)
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (Statistics View) attached to this node (Gui Node)
09.01.2011 16:43:02 com.jme3.material.MaterialDef
INFO: Loaded material definition: Sky Plane
09.01.2011 16:43:02 com.jme3.scene.Node attachChild
INFO: Child (Sky) attached to this node (Root Node)
09.01.2011 16:43:05 com.jme3.material.MaterialDef
INFO: Loaded material definition: Phong Lighting
09.01.2011 16:43:18 com.jme3.scene.Node attachChild
INFO: Child (houseinterior) attached to this node (main-scene_node)
09.01.2011 16:43:18 com.jme3.asset.DesktopAssetManager loadAsset
WARNING: Cannot locate resource: Mesh.010.mesh.xml
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Mesh.010-geom-1) attached to this node (Mesh.010-ogremesh)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Mesh.010-geom-2) attached to this node (Mesh.010-ogremesh)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Mesh.010-geom-3) attached to this node (Mesh.010-ogremesh)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Mesh.010-geom-4) attached to this node (Mesh.010-ogremesh)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Mesh.010-ogremesh) attached to this node (houseinterior-entity)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (houseinterior-entity) attached to this node (houseinterior)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (viewer) attached to this node (main-scene_node)
09.01.2011 16:43:19 com.jme3.asset.DesktopAssetManager loadAsset
WARNING: Cannot locate resource: Plane.005.mesh.xml
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Plane.005-ogremesh) attached to this node (viewer-entity)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (viewer-entity) attached to this node (viewer)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (shoulder) attached to this node (viewer)
09.01.2011 16:43:19 com.jme3.asset.DesktopAssetManager loadAsset
WARNING: Cannot locate resource: Plane.mesh.xml
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Plane-ogremesh) attached to this node (shoulder-entity)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (shoulder-entity) attached to this node (shoulder)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (camera0) attached to this node (shoulder)
09.01.2011 16:43:19 com.jme3.scene.Node attachChild
INFO: Child (Cube) attached to this node (viewer)
09.01.2011 16:43:19 com.jme3.asset.DesktopAssetManager loadAsset
WARNING: Cannot locate resource: Cube.005.mesh.xml
09.01.2011 16:43:20 com.jme3.scene.Node attachChild
INFO: Child (Cube.005-ogremesh) attached to this node (Cube-entity)
09.01.2011 16:43:20 com.jme3.scene.Node attachChild
INFO: Child (Cube-entity) attached to this node (Cube)
09.01.2011 16:43:20 com.jme3.scene.Node attachChild
INFO: Child (terrain) attached to this node (main-scene_node)
09.01.2011 16:43:20 com.jme3.asset.DesktopAssetManager loadAsset
WARNING: Cannot locate resource: Mesh.009.mesh.xml
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-1) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-2) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-3) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-4) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-5) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-6) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-7) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-8) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-9) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-10) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-11) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-12) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-13) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-14) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-15) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-geom-16) attached to this node (Mesh.009-ogremesh)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Mesh.009-ogremesh) attached to this node (terrain-entity)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (terrain-entity) attached to this node (terrain)
09.01.2011 16:43:24 com.jme3.scene.Node attachChild
INFO: Child (Cube.001) attached to this node (main-scene_node)
09.01.2011 16:43:24 com.jme3.asset.DesktopAssetManager loadAsset
WARNING: Cannot locate resource: Cube.002.mesh.xml
Java Result: -805306369
Farcry meets Monkey! Nehon did it!! XD
Amazing!
@nehon finally i found out what causes the problem. I saw that i had a SimpleShadowRenderer attached at the scene processor system. if you replace all the lines in the TestPostWater class from creating the sky until the end of the simpleInit()-method with the following lines you’ll see the effect.
[java]Dome skyMesh = new Dome(new Vector3f(), 5, 10, 500.f, true);
Geometry dome = new Geometry(“SkyDome”, skyMesh);
Material skyMat = new Material(assetManager, “Common/MatDefs/Misc/SimpleTextured.j3md”);
skyMat.setTexture(“m_ColorMap”, assetManager.loadTexture(“Textures/Sky/Lagoon/lagoon_south.jpg”));
dome.setMaterial(skyMat);
mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Front);
dome.setQueueBucket(Bucket.Sky);
mainScene.attachChild(dome);
cam.setFrustumFar(4000);
AudioNode waves = new AudioNode(assetManager, “Sound/Environment/Ocean Waves.ogg”, false);
waves.setLooping(true);
audioRenderer.playSource(waves);
fpp = new FilterPostProcessor(assetManager);
water = new WaterFilter(rootNode, lightDir);
water.setWaterHeight(initialWaterHeight);
fpp.addFilter(water);
viewPort.addProcessor(new BasicShadowRenderer(assetManager, 2048));
viewPort.addProcessor(fpp);[/java]
Regards
Moe
ahoi, ive been stalking this water thing for a while now, and one thing bothers me…
is it possible to make waves go in different directions as a river? those white parts at shore look great, better at river or stream snaking in terrain.
and ive got that strange dark bug at ground that lwsquad had in his video, but i quess that will be fixed with rebuilding
@oOMoeOo thank you i’m gonna look at it
There is a wind parameter that sets the direction of the waves (it’s a vector 2). But this direction is uniform over the whole water plane so if your river is snaky, it will look weird.
beside the water is horizontal, and can’t be oblique.
But i guess in certain cases you can simulate a stream or a river.
A bit late, but this is just amazing, nehon. Feels like doing a pirates game, mattey!
I guess my graphics card doesn’t support the new water effects? Downloaded the last nightly build, tried running the test; threw the following:
[java]java.lang.UnsupportedOperationException: No default technique on material ‘Advanced Water’
is supported by the video hardware. The caps [GLSL130] are required.[/java]
That’s on a 13" MacBook White - NVIDIA GeForce 320M .
Look in the log, what does it say under GLSL, OpenGL, driver version etc?
You might need to download new drivers.
I have a GeForce 8400M GS which is 3 generations behind your card and it runs the water fine.
@momoko_fan: Thanks. However I already have the latest drivers (according to NVIDIA). Same goes when running it on a Macbook using the 9400M…
Momoko_Fan said:
I actually have a GeForce 8400M GS and thats the card I used to work on the water shader!
I also had the issue you mentioned, but I updated my drivers and the issue disappeared.
I checked driver versions etc on mine, and its the latest (Quadro fx 3600M notebook driver v167.57)
I cant run this.
javatar said:
I haven't tried the latest build on the ATI Radeon actually -- will do tomorrow. I did however just try the example on an nVidia 9400M (macbook) and got:
[java]
INFO: Uniform g_NormalMatrix is not declared in shader.
Invalid memory access of location 0x9 rip=0x7fff85abf020
[/java]
Same here, with OSX 10.6 and GF330M...
@momoko_fan: If it’s of any use: I tried this on a friend’s iMac (ATI Radeon 5750) and we found the same problem. Not working.
Just thought I’d let you know.
really event with the last revision?
I haven’t tried the latest build on the ATI Radeon actually – will do tomorrow. I did however just try the example on an nVidia 9400M (macbook) and got:
[java]
INFO: Uniform g_NormalMatrix is not declared in shader.
Invalid memory access of location 0x9 rip=0x7fff85abf020
[/java]
Yeah, on mac it crashes native, guess thats Apples OpenGL
Yeah now it only requires GLSL 1.2 …
Its funny how GeForce 320 and Radeon 5750, which are both much newer than my card, don’t support it.
I know some people that have Mac with similar issues. I think that Steve Jobs might be putting a limit of the maximum OpenGL version that is supported, but still gives you the same hardware. So e.g. you pay more to “unlock” new “features”…
evil steve.
According to http://developer.apple.com/graphicsimaging/opengl/capabilities/index.html however both the 330 and 9400 series should support OpenGL 2.1…