Realistic water scene node

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby Seven » Sat Apr 30, 2011 1:44 am

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?
Seven
 
Posts: 873
Joined: Mon Nov 14, 2005 2:03 pm

Postby Virror » Wed May 11, 2011 10:44 am

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

Postby stillfallen » Wed May 11, 2011 6:19 pm

RealisticWaterSceneNode020.zip


Looks like link died. Can someone make a mirror?
stillfallen
 
Posts: 3
Joined: Wed May 11, 2011 6:16 pm

Postby Virror » Thu May 12, 2011 1:38 pm

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

Postby stillfallen » Thu May 12, 2011 3:18 pm

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

Postby Virror » Thu May 12, 2011 4:15 pm

No problem, just tell me how it went for you ; )
Virror
 
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Postby stillfallen » Fri May 13, 2011 9:30 am

RealisticWaterSceneNode* Water=new RealisticWaterSceneNode(Engine->smgr, 10000, 10000, Engine->driver->getTexture("data/waterbump.png"));



Didn't work for me (OpenGL renderer)
stillfallen
 
Posts: 3
Joined: Wed May 11, 2011 6:16 pm

Postby Virror » Fri May 13, 2011 9:58 am

: (
We need elvman : p
Virror
 
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Postby elvman » Mon May 16, 2011 6:52 pm

Sorry, the link is up again.
elvman
 
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia

Postby Virror » Mon May 16, 2011 7:39 pm

But how to get it working? Several ppl have tried with latest version and no one has gotten any water at all...
Virror
 
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Postby Dennis » Tue May 17, 2011 9:26 am

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.
Dennis
 
Posts: 3
Joined: Tue Apr 19, 2011 7:44 am

Postby Virror » Tue May 17, 2011 9:34 am

But you get the latest version of the water to work at least?
Virror
 
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Re: Realistic water scene node (updated)

Postby napeHeK » Tue Jul 05, 2011 7:20 pm

This class will only work if you specify a parent node...
cpp 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);
napeHeK
 
Posts: 4
Joined: Thu Sep 23, 2010 7:09 pm

Re: Realistic water scene node (updated)

Postby shadowslair » Tue Jul 05, 2011 9:31 pm

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..."
User avatar
shadowslair
 
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Re: Realistic water scene node (updated)

Postby Granyte » Sat Jul 30, 2011 1:21 am

Image

i get this and lots of flikering any idea?
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest

cron