Page 12 of 18

Posted: Thu May 27, 2010 3:20 pm
by Insomniacp
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 :).

Posted: Tue Jun 29, 2010 9:27 pm
by blackMasoon
I was woundering how should be the shader modified to add this tipe of light reflection to water:

Image

Posted: Sun Oct 17, 2010 5:35 pm
by Josh1billion
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. :)

Posted: Thu Nov 04, 2010 3:03 am
by Josh1billion
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/

Posted: Sun Nov 14, 2010 12:30 pm
by BlindSide
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.

Posted: Mon Apr 04, 2011 9:17 pm
by elvman
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

Posted: Wed Apr 06, 2011 4:12 pm
by elvman
I would like to see some bug reports from you, so that I can fix them.

Posted: Sun Apr 10, 2011 3:24 pm
by elvman
Fixed problems with reflection and cleaned code a little bit.
http://www.gamedev.lv/files/RealisticWa ... ode017.zip

Here is the screenshot of new version:
Image

Posted: Sun Apr 10, 2011 3:31 pm
by Seven
adding to CobbleStones object database now. Nicely done!

Posted: Sun Apr 10, 2011 3:47 pm
by elvman
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.

Posted: Sun Apr 10, 2011 3:50 pm
by Seven
will do later today or tomorrow. for now, it's our first 80 degree day since last summer so I am off fishing :)

Posted: Mon Apr 11, 2011 2:36 am
by elvman
Just finished working on the new version. Here is the link: http://www.gamedev.lv/files/RealisticWa ... ode018.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

Posted: Mon Apr 11, 2011 11:04 pm
by Seven
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;
}

Posted: Tue Apr 12, 2011 2:41 am
by elvman
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?

Posted: Tue Apr 12, 2011 5:54 pm
by elvman
Tested on multiple machines and found some bugs in shaders. New URL:
http://www.gamedev.lv/files/RealisticWa ... ode019.zip