Hydrax v0.4 - New version released + Editor!

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Locked
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

@skwurp
Thanks:)!

You can edit this lines in MaterialManager.cpp to fix the CG(Cg bug I think...) reflection bug under OpenGL:

Code: Select all

"uniform sampler1D    uFresnelMap      : register(s" + Ogre::StringConverter::toString(TexNum) + ")";
by

Code: Select all

"uniform sampler2D    uFresnelMap      : register(s" + Ogre::StringConverter::toString(TexNum) + ")";
and:

Code: Select all

"float fresnel = tex1D(uFresnelMap,dotProduct);\n" +
by

Code: Select all

"float fresnel = tex2D(uFresnelMap,float2(dotProduct,dotProduct));\n" +
This must fix the reflections bug, try to change this lines, you must feel the difference :)!

P.D.: I'm going to update the demo project to allow linux support !

Xavi.
skwurp
Gnoblar
Posts: 4
Joined: Mon Apr 28, 2008 10:48 pm

Post by skwurp »

Hey Xavyiy,

I tried your fix for the Cg bug and it works great! :D

Before the fix:
Image
After the fix:
Image

By the way, compiling the Hydrax library with gcc in Linux gives a warning for some of the source code files:

Code: Select all

warning: no newline at end of file
It doesn't really matter (only a warning), but I thought I'd point it out anyway.
Last edited by skwurp on Sun Jul 20, 2008 7:29 am, edited 1 time in total.
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

Just wondering if you saw the long and rather well explained Screen Space Water shader topic on gamdev. Specially nice as it can be further accelearated cached using a Real-Time Reprojection Cache if performance begins to give problems.
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

@skwurp
Good :)!

@tuan kuranes
Yes, I've seen this topic on gamedev some time ago, but actually Hydrax approach is very very different from the Screen-Scace-Water approach.
Hoverwer I've thought some ways of improve performance like calculating normals on the GPU, in order to obtain same water quality with the 25/30% of actually vertex.
User avatar
captnoord
Halfling
Posts: 42
Joined: Wed Apr 30, 2008 11:01 am

Post by captnoord »

I don't want to spoil the fun but the CG fix it does'nt seem to work for me.
before
Image
after
Image

i'm running this on a Asus G1s
2.2 ghz dual core
NVIDIA GeForce 8600M GT 256Mb DDR3

and because I am relatively new to shaders I have no clue why this is happening.
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

@captnoord
Are you using OpenGL render plugin? this fix os only for Opengl, cg and directx works well without any fix.

If you're running it under OGL, try to update your card drivers.

I've tried it with your graphic card(only I've tried under DX) and it works pretty fine.

P.D.: Make sure you're using CG 2.0 and not 1.5!
User avatar
captnoord
Halfling
Posts: 42
Joined: Wed Apr 30, 2008 11:01 am

Post by captnoord »

Thanks for the quick reply
Yep I am using Opengl,
I updated my drivers ( first thing... )
and I updated my cg.dll
my version of the cg.dll is now 2.0.0.8
running vista sp1
nvidia driver version 174.74
ogre version 1.4.5
Hmmm I check some more....
maybe I just f*ucked up....
P.D.: Make sure you're using CG 2.0 and not 1.5!
with this you also mean that I should update Plugin_CgProgramManager.dll to that version?
I think so...... we will see...
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

Can you record a 20-30 sec video of the problem?
Are you using a precompiled SDK? just to check CG version, it seems very strange.
User avatar
captnoord
Halfling
Posts: 42
Joined: Wed Apr 30, 2008 11:01 am

Post by captnoord »

I can't seem to load the opengl version of the precompiled bins

But I can tell you this, directx stuff works proper... that is'nt the problem
its when I change to opengl these problems accur...
I will make you a movie...
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post by syedhs »

OpenGL on vista? Could it be the problem? Maybe you can check your log too, if you spot any peculiar error then the problem will be more descriptive.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

syedhs wrote:OpenGL on vista? Could it be the problem?
No, I use vista and it works pretty fine(With CG/OpenGL bug fix).

Extrange
User avatar
captnoord
Halfling
Posts: 42
Joined: Wed Apr 30, 2008 11:01 am

Post by captnoord »

syedhs wrote:OpenGL on vista? Could it be the problem? Maybe you can check your log too, if you spot any peculiar error then the problem will be more descriptive.
its one of the first things I do. Checking the log. But this one is'nt in the log. But atm i'm bussy with "work" I will get back on this in a few hours.
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

A little video that I've recorded some minutes ago, a little transition from overwater to underwater and vice versa.
Image
Download link: http://rapidshare.com/files/111575309/P ... 0.wmv.html

Hope you like it!
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

:shock:

So whats left to work on for the underwater portion?
Creator of QuickGUI!
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

KungFooMasta wrote::shock:

So whats left to work on for the underwater portion?
Uff.. for my expectatives, a lot lot lot of work, like god rays(I have found a solution for this, but it's only SM 3.0,no 2.0) underwater light scatering(I need a paper!!), variable visibility(no only based on depth, like fog visibility), etc... but for the moment the development status is good :)
juedno
Halfling
Posts: 77
Joined: Sat Mar 11, 2006 3:42 am

Post by juedno »

hi Xavyiy, can you make a Solution of vs2003(vc7), because my project is under vs2003 and update to vs8 is impossible for a long time, but i really want to use Hydrax, it's so cool :lol:
User avatar
captnoord
Halfling
Posts: 42
Joined: Wed Apr 30, 2008 11:01 am

Post by captnoord »

I will post my corrected vc8 sollution today.... I don't have vc7 here.....
but still working out a few things...
and I still have the opengl bug... i'm at a lan-party atm and I will get you your movie...
MessiahAndrw
Gnoblar
Posts: 24
Joined: Thu Jun 28, 2007 2:29 pm

Post by MessiahAndrw »

How do I delete Hydrax and clean up after a scene? I've tried:
delete m_hydrax;

but this causes a breakpoint in perlinpg.cpp in PerlinPG::~PerlinPG() at the delete line here:

Code: Select all

if (r_noise)
		{
			delete [] r_noise;
		}
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

MessiahAndrw wrote:How do I delete Hydrax and clean up after a scene? I've tried:
delete m_hydrax;

but this causes a breakpoint in perlinpg.cpp in PerlinPG::~PerlinPG() at the delete line here:

Code: Select all

if (r_noise)
		{
			delete [] r_noise;
		}
I haven't optimiced Hydrax destruction at the moment, only v0.1 works fine with a simple delete mHydrax; You can fix the bugs just following the breakpoints or wait for 0.4, It's on my plans fix al destructor bugs.

P.D.: I'm working on light shafts / god rays for underwater rendering, this night I'm going to post a simple demo application and after it, implement it in hydrax! Xavi.
User avatar
fifi
Gnoblar
Posts: 13
Joined: Wed Apr 16, 2008 6:20 pm

Post by fifi »

I can't wait for new demo! :) It will be great! :D
These are my principles. If you don't like them, I have others.
User avatar
Xavyiy
OGRE Expert User
OGRE Expert User
Posts: 847
Joined: Tue Apr 12, 2005 2:35 pm
Location: Albacete - Spain
x 87

Post by Xavyiy »

fifi wrote:I can't wait for new demo! :) It will be great! :D
It's just a simple demo application of volumetric light shafts with shadows support. I'm going to post it in showcase forum, it's non-hydrax related, but I've done it for understand the concept, give a little piece of software to Ogre community and, for sure, implement it in Hydrax!

Edit: http://www.ogre3d.org/phpBB2/viewtopic.php?t=41143 :)
User avatar
fifi
Gnoblar
Posts: 13
Joined: Wed Apr 16, 2008 6:20 pm

Post by fifi »

Yeah, great job, it's awesome! Light Shafts in Hydrax will be great! I can't wait for version 0.4!
These are my principles. If you don't like them, I have others.
User avatar
tdev
Silver Sponsor
Silver Sponsor
Posts: 244
Joined: Thu Apr 12, 2007 9:21 pm
Location: Germany
x 14

Post by tdev »

great progress Xavyiy! you are pretty fast :)

may i ask what GUI you are using in that example video? I really like its menu system.
dominic1988
Kobold
Posts: 29
Joined: Wed Jun 27, 2007 5:24 pm

Post by dominic1988 »

captnoord wrote:I don't want to spoil the fun but the CG fix it does'nt seem to work for me.
before
Image
after
Image

i'm running this on a Asus G1s
2.2 ghz dual core
NVIDIA GeForce 8600M GT 256Mb DDR3

and because I am relatively new to shaders I have no clue why this is happening.
are you updating your render target every frame? Cause that kind of problem seem to be caused by not updating your render target every frame, are you using the test app provided in hydrax. If not, try using this
Ogre::Root::getSingletonPtr()->renderOneFrame() before updating hydrax
dominic1988
Kobold
Posts: 29
Joined: Wed Jun 27, 2007 5:24 pm

Post by dominic1988 »

just a question, does my camera->lookAt actually affect how hydrax scene is rendered?
Locked