Realistic water scene node

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

Realistic water scene node

Postby elvman » Fri Aug 17, 2007 5:34 pm

Water scene node with reflections and refractions.

Screenshot:
Image

Download:
GitHub

Usage on Windows:
cpp Code: Select all
water = new RealisticWaterSceneNode(SceneManager, width, height);

Usage on OSX:
cpp Code: Select all
std::string resourcePath()
{
    NSString* path = [[NSBundle mainBundle]resourcePath];
   
    return [path cStringUsingEncoding:NSASCIIStringEncoding];
}
 
water = new RealisticWaterSceneNode(SceneManager, width, height, resourcePath().c_str());
 

Future plans:
Support fog in HLSL
Tessellated look
Caustics
Light support
Optimization in render count

License
Realistic water scene node is released under BSD license. It means that you can use Realistic water scene node in any commercial or noncommercial product, but you (the licensee) must mention my name in the credits of your product and the credits must stay in the source code of the Realistic water scene node.
Last edited by elvman on Tue Aug 20, 2013 5:49 pm, edited 28 times in total.
elvman
 
Posts: 237
Joined: Sun Sep 17, 2006 9:37 am
Location: Latvia

Postby christianclavet » Fri Aug 17, 2007 6:10 pm

Hi!

Cool. Just what I needed to put in my demo!

Do you have a quick example to how to use your code?

From what I saw from the source code It need the shader v2, but you have made the code for DirectX9 and OpenGl. That's very good.
User avatar
christianclavet
 
Posts: 1518
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA

Postby JP » Fri Aug 17, 2007 10:01 pm

I think that's the most beautiful irrlicht project i've ever seen! Well done! I think i'll have to take a sneaky peak at your code as the water in my project isn't working quite right.. the reflections and refractions are a bit messed up probably due to me having limited shader knowledge and having nicked the shaders from PS3 tutorials :lol:
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby Virion » Sat Aug 18, 2007 6:11 am

It would be great if irr developers can add this into the engine core.
User avatar
Virion
 
Posts: 2109
Joined: Mon Dec 18, 2006 5:04 am
Location: Malaysia

Postby arras » Sat Aug 18, 2007 6:45 am

Looks realy good ...keep it up :)
arras
 
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia

Postby elvman » Sat Aug 18, 2007 7:00 am

Corrected some problems with reflection.
elvman
 
Posts: 237
Joined: Sun Sep 17, 2006 9:37 am
Location: Latvia

Postby BlindSide » Sat Aug 18, 2007 7:08 am

Hey good job, looks like your skill with shaders is improving! :D
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2812
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby elvman » Sat Aug 18, 2007 9:13 am

Added OpenGL support (at least tried) and made some minor changes.
There is a problem with OpenGL render targets: it logs the following string to a log: "FBO has one or several image attachments with different dimensions
FBO error", I looked up for this error and found out, that this is OpenGL's GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT error. I tried changing the dimensions of the render target, but had no success. Can anybody test this on your computer and post the results here, please?
elvman
 
Posts: 237
Joined: Sun Sep 17, 2006 9:37 am
Location: Latvia

Postby BlindSide » Sat Aug 18, 2007 5:19 pm

Hey wait a second, is DDS already supported in irrlicht? :? Thats good to hear :D (Seems to me I keep learning of new features in your threads :P )

PS: Have you thought about moving all the update() stuff over to onprerender() (I think thats what its called they may have changed the name) considering that you are already inheriting the scene node interface? This will help it integrate more smoothly with Irrlicht if need be.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2812
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby christianclavet » Sat Aug 18, 2007 9:16 pm

Excellent! Thanks for the example! I'll try this.

Thanks.
User avatar
christianclavet
 
Posts: 1518
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA

Postby benny53 » Sat Aug 18, 2007 10:42 pm

so does this have refraction as well?

ps: I can't test until my new computer arrives with my 8600gts... so thats why I'm asking here.
benny53
 
Posts: 131
Joined: Fri May 26, 2006 10:21 pm
Location: Ohio

Postby Monochrome » Sun Aug 19, 2007 12:24 am

holy poop, this is made of win and god \o/
Monochrome
 
Posts: 122
Joined: Thu Oct 19, 2006 11:43 am

Postby elvman » Sun Aug 19, 2007 6:09 pm

Released a new version. The first post was edited.
  • Removed the update function (everything is now done in OnAnimate function).
  • Added the water color (setWaterColor, setColorBlendFactor) so the water now looks more realistic


Screenshot:
Image

P.S. Why does OnAnimate starts with a capital letter? Shouldn't it be onAnimate?
elvman
 
Posts: 237
Joined: Sun Sep 17, 2006 9:37 am
Location: Latvia

Postby benny53 » Sun Aug 19, 2007 11:21 pm

@ elvman - does this have refraction?
benny53
 
Posts: 131
Joined: Fri May 26, 2006 10:21 pm
Location: Ohio

Postby krama757 » Mon Aug 20, 2007 1:13 am

Damn this looks beautiful! Elvman I'm going to try to implement this into my game. Thanks a bunch for the code!

There are some problems though. Firstly, we dont have a "setClipPlane()" function in irrlicht 1.3.1. Also, reflection in the water shows the borders between the skybox planes. Any plans on fixing these errors?
krama757
 
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Next

Return to Project Announcements

Who is online

Users browsing this forum: juanjpro, Yahoo [Bot] and 1 guest