Realistic water scene node

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

Postby Insomniacp » Thu May 27, 2010 3:20 pm

exciting I may have to use this if it gets updated :) I had issues before with the water turning a solid blue and didn't know how to fix it at the time but I am close to needing to add water again to the new map editor so this is definitely going to be in the test group for water :).
Insomniacp
 
Posts: 288
Joined: Wed Apr 16, 2008 1:45 am

Postby blackMasoon » Tue Jun 29, 2010 9:27 pm

I was woundering how should be the shader modified to add this tipe of light reflection to water:

Image
User avatar
blackMasoon
 
Posts: 149
Joined: Wed Sep 09, 2009 4:57 pm

Postby Josh1billion » Sun Oct 17, 2010 5:35 pm

I ran the demo, and it looks absolutely amazing! My new Irrlicht project will most likely include this (with credit given, of course). Since my next project is written in Java with Jirr, I'll have to port the code from C++ to Java; I'll post the resulting code for all to use when that happens. :)
www.JoshForde.com

Latest release: Super Orbulite World.
In development: Season of Dreams and others
User avatar
Josh1billion
 
Posts: 125
Joined: Thu Dec 11, 2008 9:50 pm
Location: Wisconsin

Postby Josh1billion » Thu Nov 04, 2010 3:03 am

Update: I tried to port it to Jirr/Java, and just when I had almost gotten it to compile, I found that RealisticWaterSceneNode uses plane3d, which is a class that Jirr apparently doesn't have implemented. Was plane3d added after version 1.4.1 (the current Jirr version)? If so, that would explain it.

Here's what I came up with, anyway. Aside from the plane3d issue, only a few more lines of code would need to be changed to get it to compile:

http://www.copypastecode.com/49458/
www.JoshForde.com

Latest release: Super Orbulite World.
In development: Season of Dreams and others
User avatar
Josh1billion
 
Posts: 125
Joined: Thu Dec 11, 2008 9:50 pm
Location: Wisconsin

Postby BlindSide » Sun Nov 14, 2010 12:30 pm

blackMasoon wrote:I was woundering how should be the shader modified to add this tipe of light reflection to water:

Image


It's just bumpmapped specular lighting, you can google for the shader code.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2801
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby elvman » Mon Apr 04, 2011 9:17 pm

After a long break, I finally updated Realistic Water Scene Node. This update mostly contains code cleanup and one shader fix (commented the View).

The URL is: http://www.gamedev.lv/files/RealisticWa ... ode016.zip
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

Postby elvman » Wed Apr 06, 2011 4:12 pm

I would like to see some bug reports from you, so that I can fix them.
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

Postby elvman » Sun Apr 10, 2011 3:24 pm

Fixed problems with reflection and cleaned code a little bit.
http://www.gamedev.lv/files/RealisticWaterSceneNode017.zip

Here is the screenshot of new version:
Image
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

Postby Seven » Sun Apr 10, 2011 3:31 pm

adding to CobbleStones object database now. Nicely done!
Seven
 
Posts: 599
Joined: Mon Nov 14, 2005 2:03 pm

Postby elvman » Sun Apr 10, 2011 3:47 pm

Seven wrote:adding to CobbleStones object database now.

Sorry, but haven't heard of this project. Maybe you could post some screenshots with the water.
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

Postby Seven » Sun Apr 10, 2011 3:50 pm

will do later today or tomorrow. for now, it's our first 80 degree day since last summer so I am off fishing :)
Seven
 
Posts: 599
Joined: Mon Nov 14, 2005 2:03 pm

Postby elvman » Mon Apr 11, 2011 2:36 am

Just finished working on the new version. Here is the link: http://www.gamedev.lv/files/RealisticWaterSceneNode018.zip

This version contains fully functional GLSL shader, so that now you can use Realistic Water Scene Node with OpenGL. Also cleaned up shader code.

Here is a screenshot with RWSN running on OpenGL:
Image
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

Postby Seven » Mon Apr 11, 2011 11:04 pm

all i get is a blue square...........no errors, image loads fine....directx or opengl same situation.... any thoughts?

Code: Select all
#include "stdafx.h"
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#include "realisticwater.h"

#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
//#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif
int main()
{
   IrrlichtDevice *device =
      createDevice( video::EDT_OPENGL, dimension2d<u32>(640, 480), 32, false, true, true, 0);
   if (!device) return 1;

   device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
   IVideoDriver* driver = device->getVideoDriver();
   ISceneManager* smgr = device->getSceneManager();
   IGUIEnvironment* guienv = device->getGUIEnvironment();
   ICameraSceneNode* camera = smgr->addCameraSceneNode();
   camera->setPosition(vector3df(200,200,200));

   RealisticWaterSceneNode* water = new RealisticWaterSceneNode(smgr,512,512,driver->getTexture("..\\media\\waterbump.png"),device->getTimer());
   smgr->addLightSceneNode(0,vector3df(0,50,0));

   while(device->run())
   {
      driver->beginScene(true, true, SColor(255,100,101,140));
      smgr->drawAll();
      guienv->drawAll();
      driver->endScene();
   }

   device->drop();
   return 0;
}
Seven
 
Posts: 599
Joined: Mon Nov 14, 2005 2:03 pm

Postby elvman » Tue Apr 12, 2011 2:41 am

You haven't added any other objects to scene. What do you expect for water to look like if it has nothing to reflect and it has nothing under the surface?
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

Postby elvman » Tue Apr 12, 2011 5:54 pm

Tested on multiple machines and found some bugs in shaders. New URL:
http://www.gamedev.lv/files/RealisticWaterSceneNode019.zip
elvman
 
Posts: 228
Joined: Sun Sep 17, 2006 9:37 am

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 0 guests