Realistic water scene node

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Seven
Posts: 1030
Joined: Mon Nov 14, 2005 2:03 pm

Post 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?
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post 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));
stillfallen
Posts: 3
Joined: Wed May 11, 2011 6:16 pm

Post by stillfallen »

RealisticWaterSceneNode020.zip
Looks like link died. Can someone make a mirror?
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post 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
stillfallen
Posts: 3
Joined: Wed May 11, 2011 6:16 pm

Post 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! :)
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post by Virror »

No problem, just tell me how it went for you ; )
stillfallen
Posts: 3
Joined: Wed May 11, 2011 6:16 pm

Post by stillfallen »

RealisticWaterSceneNode* Water=new RealisticWaterSceneNode(Engine->smgr, 10000, 10000, Engine->driver->getTexture("data/waterbump.png"));
Didn't work for me (OpenGL renderer)
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post by Virror »

: (
We need elvman : p
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

Post by elvman »

Sorry, the link is up again.
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post by Virror »

But how to get it working? Several ppl have tried with latest version and no one has gotten any water at all...
Dennis
Posts: 3
Joined: Tue Apr 19, 2011 7:44 am

Post 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.
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post by Virror »

But you get the latest version of the water to work at least?
napeHeK
Posts: 4
Joined: Thu Sep 23, 2010 7:09 pm

Re: Realistic water scene node (updated)

Post 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);
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Re: Realistic water scene node (updated)

Post 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.
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Realistic water scene node (updated)

Post by Granyte »

Image

i get this and lots of flikering any idea?
Post Reply