Page 14 of 18

Posted: Sat Apr 30, 2011 1:44 am
by Seven
soulless wrote:Is there something more to edit in the code than just taking away the timer parameter from RealisticWaterSceneNode creation???

in version 19 I used to have:

Code: Select all

myRiverNode = new RealisticWaterSceneNode(smgr, 10000, 10000, 
		driver->getTexture("media/textures/water.jpg"), device->getTimer());
...
with this new version, just took away the timer parameter:

Code: Select all

myRiverNode = new RealisticWaterSceneNode(smgr, 10000, 10000, 
		driver->getTexture("media/textures/water.jpg"));
...
Now the water doesn't show.

hanks!!!

same issue here, the onsceneregister() and animate functions never get called? anyone with the answer yet?

Posted: Wed May 11, 2011 10:44 am
by Virror
Bump!
Same problem : /

Also getting this:
HLSL pixel shader compilation failed:
(68): error X4523: cannot map this dependent texture read to ps_1_1
(63): error X4523: cannot map this dependent texture read to ps_1_1

Edit: Fixed the error by changing:

Code: Select all

_shaderMaterial = GPUProgrammingServices->addHighLevelShaderMaterialFromFiles(
		waterVertexShader.c_str(), "main", video::EVST_VS_1_1,
		waterPixelShader.c_str(), "main", video::EPST_PS_1_1,
		this);
to:

Code: Select all

_shaderMaterial = GPUProgrammingServices->addHighLevelShaderMaterialFromFiles(
		waterVertexShader.c_str(), "main", video::EVST_VS_2_0,
		waterPixelShader.c_str(), "main", video::EPST_PS_2_0,
		this);
But i still cant see anything. Using this:

Code: Select all

RealisticWaterSceneNode* pWater;
	pWater = new RealisticWaterSceneNode(smgr, 2100.0f, 2100.0f, driver->getTexture("waterbump.png"));
	pWater->setPosition(vector3df(0,200,0));

Posted: Wed May 11, 2011 6:19 pm
by stillfallen
RealisticWaterSceneNode020.zip
Looks like link died. Can someone make a mirror?

Posted: Thu May 12, 2011 1:38 pm
by Virror
I can share it with you for a short while if you try it as see if you can get it to work : p

http://dl.dropbox.com/u/1688685/Realist ... ode020.zip

Posted: Thu May 12, 2011 3:18 pm
by stillfallen
Virror wrote:I can share it with you for a short while if you try it as see if you can get it to work : p

http://dl.dropbox.com/u/1688685/Realist ... ode020.zip
Thanks! :)

Posted: Thu May 12, 2011 4:15 pm
by Virror
No problem, just tell me how it went for you ; )

Posted: Fri May 13, 2011 9:30 am
by stillfallen
RealisticWaterSceneNode* Water=new RealisticWaterSceneNode(Engine->smgr, 10000, 10000, Engine->driver->getTexture("data/waterbump.png"));
Didn't work for me (OpenGL renderer)

Posted: Fri May 13, 2011 9:58 am
by Virror
: (
We need elvman : p

Posted: Mon May 16, 2011 6:52 pm
by elvman
Sorry, the link is up again.

Posted: Mon May 16, 2011 7:39 pm
by Virror
But how to get it working? Several ppl have tried with latest version and no one has gotten any water at all...

Posted: Tue May 17, 2011 9:26 am
by Dennis
Does this work for anyone?

Code: Select all

water->setMaterialFlag(video::EMF_FOG_ENABLE, true);
If I use a plain blue cube I get a simple fog effect.
With RealisticWaterSceneNode I get no fog at all.


In one of my earlier posts I said that this water node does not work
with more than one camera (think fps camera and a view from the top as a live map view) - this has to do with OnAnimate(). If I add a flag so that OnAnimate() is not executed for the second camera then more cameras work although the water looks slightly wrong in the second camera.

Posted: Tue May 17, 2011 9:34 am
by Virror
But you get the latest version of the water to work at least?

Re: Realistic water scene node (updated)

Posted: Tue Jul 05, 2011 7:20 pm
by napeHeK
This class will only work if you specify a parent node...

Code: Select all

ISceneManager* smgr = CCore::app()->getSceneManager();
IVideoDriver* driver =  CCore::app()->getDriver();
 
RealisticWaterSceneNode* water = new RealisticWaterSceneNode(
      smgr, 512, 512, driver->getTexture("media/waterbump.png"),
      dimension2du(512, 512), smgr->getRootSceneNode(), 666);

Re: Realistic water scene node (updated)

Posted: Tue Jul 05, 2011 9:31 pm
by shadowslair
That`s right. It`s because the scenemanager does not know of its existence, as it is not created using smgr->addBlaBla, but using "new", and it needs to be rendered somehow.

Re: Realistic water scene node (updated)

Posted: Sat Jul 30, 2011 1:21 am
by Granyte
Image

i get this and lots of flikering any idea?