I'm trying to get water to work in my game, but when I experiment with it, It either crashes, doesn't move, or completely lags the f**k out of me. I'm using a few codes from the JME Tests to get ideas of what to do, yet they all don't look right. (Can't post screenies, Too busy.)
water = new WaterRenderPass(cam, 4, true, false);
water.setClipBias(0.5f);
water.setWaterMaxAmplitude(3.0f);
water.setWaterPlane(new Plane( new Vector3f( 0.0f, 1.0f, 0.0f ), 0.0f ));
watergrid = new ProjectedGrid("Water ", cam, 100, 70, 0.01f, new WaterHeightGenerator());
water.setWaterEffectOnSpatial(watergrid);
rootNode.attachChild(watergrid);
Any ideas? (Yes, I'm a total newb at jME :D)
does the watertests included in jme work? how does your scenegraph look? what are you setting as reflected scene on the waterrenderpass?
Hikaru
July 11, 2007, 5:10am
3
It doesn't work at all or just lags me to hell
can't help you if you don't at least answer those questions, or post some code of your setup…what graphics card do you have by the way?
Hikaru
July 14, 2007, 12:53am
5
1.) They work, but some are laggy. None of them show any kind of texture whatsoever.
2, 3.) Not sure
sounds like your graphicscard doesnt support FBO's(what we use for render to texture). what kind of graphicscard and OS? tried updating your drivers?
Hikaru
July 15, 2007, 2:22am
7
ATI Radeon XPress 200 Series. Windows XP Professional Media Edition.
Will update today and post back.
Edit: Unable to find drivers for ATI Radeon, so I can't get anything there x-x
Hikaru
July 15, 2007, 2:51am
8
I'd also like to express when I load that water effect, The game just goes completely black and doesn't load at all.
This is the output:
Jul 14, 2007 10:50:45 PM com.jme.renderer.lwjgl.LWJGLTextureRenderer <init>
INFO: FBO support detected.
Jul 14, 2007 10:50:45 PM com.jme.renderer.lwjgl.LWJGLTextureRenderer initCamera
INFO: init RTT camera
Jul 14, 2007 10:50:45 PM com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
Jul 14, 2007 10:50:45 PM com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup tex8: 320,256
Jul 14, 2007 10:50:45 PM com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup tex9: 320,256
Jul 14, 2007 10:50:45 PM com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup tex10: 320,256
Jul 14, 2007 10:50:45 PM com.jmex.effects.water.WaterRenderPass reloadShader
INFO: Shader reloaded...
Jul 14, 2007 10:50:45 PM com.jme.scene.Node attachChild
INFO: Child (Water) attached to this node (rootNode)
Anything odd with this? It lags my computer to hell x.x
Sasa
July 30, 2007, 10:36pm
9
what are you crazy ? you can't have any 3d accel without the drivers for your card.
Run the demo if it doesn't work there is something wrong with your comp. Otherwise …
Hikaru
September 9, 2007, 12:48am
10
Sasa said:
what are you crazy ? you can't have any 3d accel without the drivers for your card.
Run the demo if it doesn't work there is something wrong with your comp. Otherwise ...
Well it still lags me, but at least it moves. Now the problem is that its not showing the texture, but thats explainable (No texture file to begin with!!)