Artifacts

Thrakbad

16-10-2008 13:30:57

Great to see that Hydrax now has it's own Addons Forum :D

I tried debugging with the RTTs as you suggested, Xavi, but I only get crap. Don't know if I'm doing something wrong or if the maps are really that messed up:

RefractionMap
ReflectionMap
DepthMap

The other three maps are not even found by their defined names :?

Netskate

16-10-2008 14:06:01

if it can make you better, I also don't see water..

Netskate

16-10-2008 14:19:45

I change my farclipdistance from 0 to 99999*6

and then I can see water, but, I se also a square of fog over me that follow the camera O_O

http://www.netskate.site90.net/download/Movie.rar

--EDIT--

The problem seems to be only with projected grid, that square is the infinite plane I think, however I don't know how to solve this problems.

ps: have you tried to change clip distance?

Thrakbad

16-10-2008 15:23:37

Damn it. I just tried to run Hydrax in a basic Ogra application that only sets up a camera, loads the skybox and the water. And that worked perfectly. But the same code imported into our main game framework gives me the artifacts again. So something apart from the graphics engine in our game is messing up the maps. Problem is: that could be almost anything, from OIS over the Dynamics Engine to our own Logger, but those are all components I can't simply remove for testing. :x

Netskate

16-10-2008 15:33:08

same situation, in another blank ogre application it works.

when porting it into my framework it don't work as should be.

maybe try to find something common... but it's only an idea, I don't have problem with simple grid.

Xavyiy

16-10-2008 18:04:28

@Thrakbad
I think that the only problem that you've is that Hydrax dynamic texture maps are corrupted for some reason(Memory leaks?), I think you can post the problem in Ogre Help forum and waiting for more opinions.

Netskate
It's VERY important to have a farclipdistance != 0 with projected grid, because vertex positions are calculated depending of the camera view matrix.
Another thing that you've to be sure is to move/rotate your camera before calling Hydrax->update(...).
Finally I think that caelus fog is the problem of your visual artefacts.

Thrakbad

16-10-2008 18:11:44

Yes and no...after trying to isolate the parts of the program that cause the corruption I am almost certain that it is not caused by our graphics engine. But I can't just publish our whole game framework here in the forum and wait for oppinions.
As of right now it could be anything except from CEGUI and our Ogre related code, which is bad, because those are the parts I could actually publish here :wink:

Xavyiy

16-10-2008 18:17:47

Yes and no...after trying to isolate the parts of the program that cause the corruption I am almost certain that it is not caused by our graphics engine. But I can't just publish our whole game framework here in the forum and wait for oppinions.
As of right now it could be anything except from CEGUI and our Ogre related code, which is bad, because those are the parts I could actually publish here :wink:

I meant you can post your issue and the screenshots(No your code ;)) for sinbad/nulls/tuan/etc opinion.
Another possibility is an Hydrax memory leak, but I've revise all the code and all seems to be ok.

Netskate

17-10-2008 11:50:27

I have disabled all my game manager, caelum, sound, weather, etc...

The only two thing in the demo now are:
hydrax
input manager...

The damned square that follow the camera is always here, so it isn't caelum scene fog.

I really don't know what's the problem, hydrax is updated after the input manager frame listener as you wrote. I'll download new package of hydrax but I don't hope in it so much.

--EDIT--

After some debug, I think that the problem is how I move the camera...

because in your demo, and in an ogre test application I've created seems to works fine. Both application extend the exampleapplication, that move camera with ->yaw; ->pitch; ->translate;

In my demo I attach the camera to a scene node, and I move the scene node... can be this the problem?



what do you think?

Xavyiy

17-10-2008 13:04:15

@Netskate
About your camera artifact, the problem is that you have to move your camera BEFORE calling Hydrax->updatre(...), actually you're updating your camera position/orientation after calling Hydrax->update(...) and if your camera movement is fast, the edges of the projected grid must 1 frame decaled.

--- edit ---

If you're updating your camera position before calling Hydrax->update(...) I don't know how the problem is, because I've tried Hydrax 0.4 with cameras attached to scene nodes and works for me, I'm going to looking into it this night(currently I'm in the university).

Xavi

Netskate

17-10-2008 13:17:30

university... I'm graduating in computer science... and this is my thesis :P

but with this step I can't finish for december, sigh

Netskate

17-10-2008 13:44:58

I found the problem, into my game I have a list of framelistener

at every frame I scroll out this list and make start each framestarted method of every framelistener in the list.

in this way I can have separate framelisteners for separate components.

Before, I have disabled any component (and the relative framelistener), leaving only inputManager and hydraxmanager, that I have keep in two different class that extend OgrE::Framelistener. But the problems still remains.

So I made the trying of making the hydrax main reference static, so I can call hydrax->update from framestarted method of input manager, immediately after my move camera function.

the result is that now it works... I don't understand why I have this problem. each framestarted method is called in the same frame, so why there's this problem?


this is the code:
bool GameFrameListener::frameStarted(const FrameEvent& evt) {
bool result = true;
// call frameStarted on all frame listeners registered
for (Ogre::FrameListener* listener = gListeners.begin(); listener = gListeners.next();) {
result = listener->frameStarted(evt);
// if the current frame listener returns false, exit the loop
if (!result) break;
}
return result;
} // end frameStarted

Xavyiy

17-10-2008 21:11:41

Mmm if you have more than one listener you've to be sure that the OIS listener is called before the Hydrax listener, I think your listeners do something like:

FRAME START
{
LISTENER 1...
LISTENER 2...
LISTENER HYDRAX
LISTENER 4
LISTENER OIS
...
}
FRAME END


So.. all listeners are updated in the same frame, but not in the correct order, you have to put the hydrax listener after the ois(or the frame listener where you change camera position/orientation) listener.

Xavi

Netskate

17-10-2008 21:23:54

obviously I already make this.

Framelistener are scrolled so each is called in the order they are inserted and I inserted first inputmanager (that move the camera) and after hydrax, however I have also done the opposite, but the problem remain.

the only solution, for now, is to call hydrax into input manager framelistener, but is a very very bad thing

Xavyiy

17-10-2008 21:35:19

obviously I already make this.

Framelistener are scrolled so each is called in the order they are inserted and I inserted first inputmanager (that move the camera) and after hydrax, however I have also done the opposite, but the problem remain.

the only solution, for now, is to call hydrax into input manager framelistener, but is a very very bad thing

That's very extrange, Hydrax calcules the projected grid corners(And with information all vertex positions) using the current camera matrix, so, if you're sure of updating your camera pos/orientation before Hydrax, I don't know what the problem is...

Netskate

17-10-2008 21:54:04

is how it is updated later but they are in the same frame, this has no-sense.

Question no.1:
Do you think that, as told before, moving the camera by a scene node can cause problems for I don't know why?

Question no.2:
as I wrote in another thread, it's possible to split the update function of project grid, in other two? one that update the camera, and one that update vertex? Always keeping the all-in-one update method.

Question no.3:
with simple grid, how can I make hydrax merging with orizon? some trick?

ps 1:
I have updated the pu thread with debugging texture

Xavyiy

18-10-2008 13:30:03

1- I don't think, for me is something wrong with listeners list, or something like that... you can try to debub it with some std::couts, in order to be sure of what listener is executed before.

2- You can try to modiffy a little the ProjectedGrid::update(...) funtion, it will be esay for you I think(just some conditions for update eights each X seconds).

3- It's not possible, simple grid is not infinite, anyway you can use RTT normals generation with projected grid(Plays with the editor, see GPUWater.hdx example).

Xavi

Netskate

18-10-2008 14:00:24

1- I don't think, for me is something wrong with listeners list, or something like that... you can try to debub it with some std::couts, in order to be sure of what listener is executed before.

2- You can try to modiffy a little the ProjectedGrid::update(...) funtion, it will be esay for you I think(just some conditions for update eights each X seconds).

3- It's not possible, simple grid is not infinite, anyway you can use RTT normals generation with projected grid(Plays with the editor, see GPUWater.hdx example).

Xavi


1- I verified this a lot of times, hydrax is called after input manager, but plane isn't update in time, I don't know what happened, if you can try this...

2- I ask if you could make this, because I don't know exactly what I have to update, I think you can do this in some minutes, and this could be useful also for other people. Then I don't have to re-code this, when new version of hydrax are released. valutate this opportunity

3- I think I'll use projected grid, now that seems I have resolved my problem with it, however there's another one...

look at the horizon:



after a few minutes that black row disappear, but is not good in any case...

my camera : gCamera->setFarClipDistance(99999*6);
file loaded has position -5000x100x-5000

I don't know what this problems is connected

Netskate

19-10-2008 11:29:20

little update regarding my framelistener list:



I insert the framelistener in this order:
input
hydrax
weather
sound
caelum


but they are scrolled in this order, starting from the beginning:

caelum
hydrax
input
sound
weather


I think this can have sense if they are in reverse order, but they seems extremely random O_o

so the problem seems to be that hydrax was called before input manager.

However I check it more and more, it's a simple list...

In any order I insert them, their index in the list is always the same -.-'

oh my god! the list sort my listener in alphabetical order... :shock:

another problem is gone... :)

Xavyiy

19-10-2008 14:03:40

;)

Azgur

19-10-2008 15:00:53

I'm having some issues with artifacts aswell.

The demo and editor run just fine. However, when I implemented Hydrax into our game, we're running into a few issues.

The issue is as following. When using the "Depth" module, the depth effect isn't consistent across the water. Some parts will appear to have depth and other parts will appear as if depth was disabled.
When the camera moves the different parts will move/change pretty much every frame given a very noticeable flickering.
The visuals are very similar to the effect of overlapping faces being rendered in a different order each frame.

The main differences between the demo and our situation are the following.
- We're not using a terrain. Our world currently is 1 big mesh which will be partially intersected by the water.
- Our scale is alot smaller. 1 ogre unit is 1 meter in our case.

The issue is visible when using: Components=Smooth|Depth (Or any other combination including Depth)
The issue is not visible when using: Components=Smooth
I've tried both HLSL and CG. (We're using DirectX)

Any suggestions? I have the feeling it's just some values that need tweaking due to our huge scale difference.
Though, it might also be related to using a mesh as environment. Though, the part of the mesh where the water is located (a lake) is pretty similar to that of a heightmap. Not too complicated or anything.

My init code:

mHydrax = new Hydrax::Hydrax(
mOgreSceneManager,
mOgreCamera,
mOgreWindow->getViewport(0)
);
Hydrax::Module::ProjectedGrid* hydraxModule = new Hydrax::Module::ProjectedGrid(
mHydrax, new Hydrax::Noise::Perlin(),
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)),
Hydrax::MaterialManager::NM_VERTEX,
Hydrax::Module::ProjectedGrid::Options(264)
);
mHydrax->setModule(static_cast<Hydrax::Module::Module*>(hydraxModule));
mHydrax->loadCfg("Default.hdx");
mHydrax->create();


Config file

#Hydrax cfg file.

#Hydrax version field
HydraxVersion=0.4.0

#Main options field
<vector3>Position=0x9x0
<float>PlanesError=10.5
#Shader mode: 0=HLSL, 1=CG, 2=GLSL
<int>ShaderMode=0
<float>FullReflectionDistance=50000
<float>GlobalTransparency=0
<float>NormalDistortion=0.075
<vector3>WaterColor=0.139765x0.359464x0.425373

#Components field
#Components=Sun|Foam|Depth|Smooth|Caustics
Components=Smooth

#Sun parameters
<vector3>SunPosition=0x10000x0
<float>SunStrength=1.75
<float>SunArea=150
<vector3>SunColor=1x0.9x0.6

#Foam parameters
<float>FoamMaxDistance=7.5e+007
<float>FoamScale=0.0075
<float>FoamStart=0
<float>FoamTransparency=1

#Depth parameters
<float>DepthLimit=5

#Smooth transitions parameters
<float>SmoothPower=5

#Caustics parameters
<float>CausticsScale=5
<float>CausticsPower=10.5
<float>CausticsEnd=0.8

#God rays parameters
<vector3>GodRaysExposure=0.76x2.46x2.29
<float>GodRaysIntensity=0.015
<float>GodRaysSpeed=5
<int>GodRaysNumberOfRays=100
<float>GodRaysRaysSize=0.03
<bool>GodRaysIntersections=false

#Rtt quality field(0x0 = Auto)
<size>Rtt_Quality_Reflection=0x0
<size>Rtt_Quality_Refraction=0x0
<size>Rtt_Quality_Depth=0x0
<size>Rtt_Quality_URDepth=0x0
<size>Rtt_Quality_GPUNormalMap=0x0

#Module options
Module=ProjectedGridVertex

<float>PG_ChoopyStrength=3.75
<bool>PG_ChoppyWaves=false
<int>PG_Complexity=256
<float>PG_Elevation=0.4
<bool>PG_ForceRecalculateGeometry=false
<bool>PG_Smooth=false
<float>PG_Strength=1

#Noise options
Noise=Perlin

<int>Perlin_Octaves=8
<float>Perlin_Scale=0.85
<float>Perlin_Falloff=0.49
<float>Perlin_Animspeed=1.4
<float>Perlin_Timemulti=1.27
<float>Perlin_GPU_Strength=2
<vector3>Perlin_GPU_LODParameters=0.5x50x150000

Xavyiy

19-10-2008 15:18:59

First of all, re-download the 0.4 package and recompile it, I've uploaded the package with some minnor bugfixes this morning.

About your artifacts, I think that the depth issue is due to your world is not an Ogre::Entity and you need to add hydrax depth technique manually to your worlw material(s).

It's quite easy:
mHydrax->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("Your_World_Material"))
->createTechnique());

(Do the same for all materials that are used in object that aren't Ogre::Entity and are in the scene, like billboards, etc.)

Also you can play with Hydrax::setPlanesError(...) parameter.

If problems persists, record a little video to show me what artifacts appear.

Xavi.

P.D.: (World scale mustn't be an issue).

Azgur

19-10-2008 15:28:49

I downloaded Hydrax at around 12:00 CET. Eitherway, it was after your post of an updated version.
My world is a StaticGeometry (which is an Entity afaik).
I'll try to tweak that error value a bit.

I'll see about the video, but it might be a few screenshots will be the best I can do. (Our current version already runs terribly slow as it is. Been putting off on optimizations)

Xavyiy

19-10-2008 15:31:15

Okey, no problem, screenshots must be sufficient.
I'll check the forum tonight(GTM+1).

Xavi

Azgur

19-10-2008 16:05:06

Got it fixed. It you were right.
It seems StaticGeometry isn't automatically picked up by Hydrax, so I applied the manual fix you provided.
Thanks for everything.

Netskate

19-10-2008 17:01:12


look at the horizon:



the black row depends on the distance from camera to horizon.

my camera : gCamera->setFarClipDistance(99999*6);
file loaded has position -5000x100x-5000

I don't know what this problems is connected


to resolve this problem I had to increment the farclipdistance? how much? is this the right way? :?:

Xavyiy

19-10-2008 18:18:12

Mmm you say that incrementing the far clip distance the black line disappears?
I don't know what the problem could be, if you've some time send to my email ( xavyiy_@_gmail_._com ) a binary of your app with the problem.
With some screenshots I haven't enough info.

Xavi.

Netskate

19-10-2008 18:21:10

my demo app is updated at this url

www.netskate.site90.net

Xavyiy

19-10-2008 18:38:53

Can you debug Hydrax reflection map? 4 or 5 screenshots must be sufficiente. I think I know what the problem is, but I need to be sure.

Xavi

Netskate

19-10-2008 18:52:10

I made only two screenshot because honestly I don't see difference between them :?

Xavyiy

19-10-2008 19:02:33

It's Caelum problem, the fact is that in the horizont caelum changes of colour and due to this, sometimes some pixels of the dark zone are reflected and produces this black line.
The only way to avoid this is modiffying Caelum, anyway have a look to Nature demo configuration, I think that in nature demo there wasn't this artifact.

Xavi

Netskate

19-10-2008 19:10:19

this is how really nature is made...



in source he use a projected grid, but in the demo I don't think that is a pg..

Xavyiy

19-10-2008 19:21:23

Mmm you can modiffy a little caelum and set it's scene node height some units under your camera position, in order to minimice/avoid the line problem.
Just a suggestion, or ask in Caelum's thread for other ideas about how to solve it.

Xavi

Netskate

19-10-2008 19:26:54

uhm, I'm interested to this because when the sun sets it fall into the water plane, this is not good.

I thought hide sun with a bright bloom light to avoid this, but if there's a way to move it over (and I think there isn't because I'm using an infinite plane), it will not bad. but this is another story....

I tried to get up water plane:
-5000x1000x-5000

and this is the result:



then the problem seems to be the reflection map that is displayed where it shouldn't be.

I don't have any idea to how (and if it's possible) to move the caelum scene node (if it have one). but I think that in any case it doesn't work, else getting up the water plane, should have the same effect.

Xavyiy

20-10-2008 09:12:41

I've tried it in your rush demo(Changing water preset position) and it seems like a bug to me(Seems that in reflection/refraction rtt caelum is different that in the main viewport...), It will be useful if you can debug reflection and refraction textures with hydrax position in 0x1000x0.

Netskate

20-10-2008 11:06:53

instead of screenshot, download this two package:

www.netskate.site90.net/download/debug/ ... ection.rar

www.netskate.site90.net/download/debug/ ... action.rar

change the position in *.hdx file into your media folder, and replace your system folder with one of them to debugging in real time ^^

Xavyiy

20-10-2008 12:14:34

I'll loking into tonight, I've to go to the university at the moment.
But I think is a Caelum's problem... related with different render queues...

Xavi

Netskate

20-10-2008 12:21:21

In every case if you can't individuate the problem (I don't know how :( ) maybe we can solve it :)

take your time and thanks

Xavyiy

21-10-2008 09:33:59

I've to look into more, but I think it's due to caelum renders in differents render queues the sky.
In order to prevent these kind of artefacts, Hydrax disables the custom near clip plane for skyboxes:
void RttManager::CReflectionListener::CReflectionQueueListener::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation)
{
if ((queueGroupId == Ogre::RENDER_QUEUE_SKIES_EARLY || queueGroupId == Ogre::RENDER_QUEUE_SKIES_LATE)
&& mActive)
{
mRttManager->mHydrax->getCamera()->disableCustomNearClipPlane();
Ogre::Root::getSingleton().getRenderSystem()->_setProjectionMatrix(mRttManager->mHydrax->getCamera()->getProjectionMatrixRS());
}
}

But seems that caelum renders its parts in differents render queues, so you've to modiffy a little caelum sources(Setting all caelum parts in the same render queue) to get it working correctly.

Netskate

21-10-2008 09:38:27

uhm, I start to working on it. thanks

Netskate

21-10-2008 09:59:59

I've done a search into caelum projects files, this is the result:



seems to be that caelum use a different render queue for each subcomponent.

unfortunately I don't know much about that, maybe can you tell me more on this?

another way could be modify hydrax to disable clip plane for caelum skydome component if is it present?

ps: but if we disable the clipplane for sky dome, then we can't see sky reflect on water?

ps2: there's a way to do this into my code to don't modify either caelum and hydrax?

--EDIT--

disabling clippanel also for rendered queues of sun and moon, could solve this problem?

Netskate

21-10-2008 10:48:30

oooooooooooooooooooooh

I change hydrax code in this:

if ((queueGroupId == Ogre::RENDER_QUEUE_SKIES_EARLY || queueGroupId == Ogre::RENDER_QUEUE_SKIES_LATE || queueGroupId == (Ogre::RENDER_QUEUE_SKIES_EARLY + 2))

and it works perfectly, I don't know how thank you :D

can you still answer my question ?

Xavyiy

21-10-2008 10:58:15

oooooooooooooooooooooh

I change hydrax code in this:

if ((queueGroupId == Ogre::RENDER_QUEUE_SKIES_EARLY || queueGroupId == Ogre::RENDER_QUEUE_SKIES_LATE || queueGroupId == (Ogre::RENDER_QUEUE_SKIES_EARLY + 2))

and it works perfectly, I don't know how thank you :D

can you still answer my question ?

Cool ;)

What's your current question?

EDIT:

Can you try one thing:
In Caelum/Prerequisites.h change all render queues to Ogre::RENDER_QUEUE_SKIES_EARLY, recompile caelum and undo the last change in Hydrax/RttManager.cpp.

If it works you must do that, caelum allows you to change render queues as needed, so this is the best option, when you'll have finished integrating caelum/hydrax can you open a little post with instructios?

Xavi

Netskate

21-10-2008 11:03:17

I would know a lot of thing :P

1. There's another way to solve this through my code to don't modify either caelum and hydrax library? (or this that I've done can be integrated in official release of hydrax lol)

2. What you suggest to solve my last two problem with caelum and hydrax?
actually sun fall into water, cause I use projected grid with infinite plane (I've try disable customnearclipplane but nothing to do).

3. the other problem is when sun fall into water is visible a square of the texture, see the screenshot.

4. what lead disable custom clip plane for caelum sky dome?

Netskate

21-10-2008 11:06:20

oooooooooooooooooooooh

I change hydrax code in this:

if ((queueGroupId == Ogre::RENDER_QUEUE_SKIES_EARLY || queueGroupId == Ogre::RENDER_QUEUE_SKIES_LATE || queueGroupId == (Ogre::RENDER_QUEUE_SKIES_EARLY + 2))

and it works perfectly, I don't know how thank you :D

can you still answer my question ?

Cool ;)

What's your current question?

EDIT:

Can you try one thing:
In Caelum/Prerequisites.h change all render queues to Ogre::RENDER_QUEUE_SKIES_EARLY, recompile caelum and undo the last change in Hydrax/RttManager.cpp.

If it works you must do that, caelum allows you to change render queues as needed, so this is the best option, when you'll have finished integrating caelum/hydrax can you open a little post with instructios?

Xavi


yes I'll do it.
it is the least thing I can do for you :)

Xavyiy

21-10-2008 11:06:22

1 - See my last edit.
2/3 - The problem is that caelum sun is very near to the camera, you've just to set the distance longer, I don't know how(I haven't seen caelum source) but it must be easy, just post it in caelums thread.
4 - Nothing, only no artifacts on water :)

Netskate

21-10-2008 11:31:25

changing the caelum prerequisites cause a lot of artifacts.

so I think the best solution is add to Hydrax prerequisites the type of renderqueues to which disable custoclipplane, you can then you can change the "iff" in rttmanager with a for that disable custoclipplane for each render queues there's in hydrax prerequisites.


so, in my opinion the best solution is make in hydrax prerequisites an enum group:

RENDER_QUEUES_TO_DISABLE_CUSTOM_CLIP_PLANES :P

and insert into them SKY_EARLY, SKY_LATE, so who want can add his render group to disable.

in rtt manager scroll this group and disable customclipplane for each.

can you do it?

ps: I have a problem when launching my game in debug mode, it crash when hydrax is created, if I disable hydrax all works :?:

Xavyiy

21-10-2008 12:08:47

I think I'm going to do something like this for next release.

I haven't tested Hydrax in debug mode for time, where it crashes?

Netskate

21-10-2008 12:21:26

I think I'm going to do something like this for next release.

I haven't tested Hydrax in debug mode for time, where it crashes?


it crashes on creatingm when put to hydrax log this string "Hydrax created"


uhm, I need this update more early of your next release, so if you can't release a patch I'll go back to the trick of one page ago, or implement my own version of this.

Make me know what you want to do

Xavyiy

21-10-2008 12:28:32

Just use your temporal fix ;),
0.5 version must have some method like:
Hydrax::RttManager::addDisabledClipRenderQueue(...);

---

I'll look into the debug problem as soon as I finish the radial grid module(30% done).

Netskate

21-10-2008 13:38:40

there's a way to make sun/moon not rendered under water plane?

Xavyiy

21-10-2008 19:18:50

You can set invisible the scene node where calum's sun is attached when the sun y position is under the water plane.

Netskate

21-10-2008 19:53:44

the problem is that I would hide only the sun's part that are under the water plane.

if I hide all the scene node sun disappears. :?

--EDIT--

I think I need something to tell hydrax when sun go under water plane to don't reflect or refract it, but only cover it

Xavyiy

21-10-2008 21:29:07

the problem is that I would hide only the sun's part that are under the water plane.

if I hide all the scene node sun disappears. :?

--EDIT--

I think I need something to tell hydrax when sun go under water plane to don't reflect or refract it, but only cover it

I think you can disable depth writte in caelum sun material, render it but not affect to others objects.

Netskate

21-10-2008 21:32:26

depth write is already disable:

material CaelumSphereSun
{
technique Defaulto
{
pass Main
{
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
}
}
}

material CaelumSpriteSun
{
receive_shadows off
technique Default
{
pass Main
{
lighting off
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
scene_blend src_colour one_minus_src_colour
alpha_rejection greater_equal 128
emissive vertexcolour
texture_unit Texture0
{
texture sun_disc.png 2d 0
}
}
}
}

Xavyiy

21-10-2008 21:44:05

In what render queue is caelum sun?

Netskate

21-10-2008 21:46:38

Sky_early + 4 , I tried to disable custom clip plane also for it, but I have no result :(

Xavyiy

21-10-2008 21:52:41

Update the rush.rar package, I want to try it and try to identificate the problem in order to find a good solution.

Xavi

Netskate

21-10-2008 22:00:44

what do you need?

Xavyiy

21-10-2008 22:03:36

what do you need?
Your current binary, for seeing what happen with the sun.

Netskate

21-10-2008 22:20:46

I've update it, you can download rush.rar

I solve the problem of the square around the sun's disc changhing this:

with this:

I don't know if this is a good solution, but it works.

The only problem, now, are sun and moon under the water plane, I can create a mesh plane under water to hide this problem, but I don't think this is a good solution.

Xavyiy

21-10-2008 22:35:04

If you want that the sun won't refract, it's so simple, just create a technique in sun material with the scheme name set as "HydraxDepth" and black colour(no lighting, etc) ;)

Netskate

21-10-2008 23:06:09

can I ask you an example? :(

Xavyiy

21-10-2008 23:13:57

material CaelumSphereSun
{
technique Defaulto
{
pass Main
{
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
ambient 0 0 0
diffuse 0 0 0
lighting off
}
}
}


Something like this:)

Netskate

21-10-2008 23:20:45

unfortunately I don't know much about ogre materials (I know that I should...), your code don't seems to give the hoped results, and I don't have idea how make it works.

I know I'm annoying and I'm sorry for this. Maybe you can try it with demo simply editing the material files?

Xavyiy

21-10-2008 23:26:31

I don't know why but unfortunlately latetests versions of your demo crashes my old nvidia driver(It's out of date) and sometimes I've to reboot my system.

This is the idea: Add a technique on caelum sun material with scheme "HydraxDepth" with black colour, in order to avoid it in the refraction colour calculation.

Are you sure that you're adding this code in the good material? I'm not very familiariced with ogre material scripts(I do it directly in code), but las post code, or very similar, must works.

Netskate

21-10-2008 23:42:58

yes I adding it in sun.material but the square around the spheresun came back.

I've uploaded another version of the demo, with only input, caelum and hydrax manager enables, in this away I hope to avoid crash on your pc.

you can download it from:
www.netskate.site90.net/download/debug/rushtest.rar

Xavyiy

22-10-2008 00:01:12

It crashes again, I don't know why... but my old drivers must be the reason.

Media/Caelum/Sun.material seems not to be modified,

Try with:

//
//This file is part of Caelum.
//See http://www.ogre3d.org/wiki/index.php/Caelum
//
//Copyright (c) 2008 Caelum team. See Contributors.txt for details.
//
//Caelum is free software: you can redistribute it and/or modify
//it under the terms of the GNU Lesser General Public License as published
//by the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//Caelum is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU Lesser General Public License for more details.
//
//You should have received a copy of the GNU Lesser General Public License
//along with Caelum. If not, see <http://www.gnu.org/licenses/>.
//

material CaelumSphereSun
{
technique Defaulto
{
pass Main
{
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
ambient 0 0 0
diffuse 0 0 0
lighting off
}
}
}

material CaelumSpriteSun
{
receive_shadows off
technique Default
{
pass Main
{
lighting off
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
scene_blend src_colour one_minus_src_colour
alpha_rejection greater_equal 128
emissive vertexcolour
texture_unit Texture0
{
texture sun_disc.png 2d 0
}
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
ambient 0 0 0
diffuse 0 0 0
lighting off
}

}
}

Netskate

22-10-2008 00:06:43

here what I mean:



:cry:

Xavyiy

22-10-2008 12:25:44

Seems that the material is not compilable by Ogre and sets the default white material on the sun, check the Ogre log or post it.

Netskate

22-10-2008 12:28:38

here the log:

13:28:01: Creating resource group General
13:28:01: Creating resource group Internal
13:28:01: Creating resource group Autodetect
13:28:01: SceneManagerFactory for type 'DefaultSceneManager' registered.
13:28:01: Registering ResourceManager for type Material
13:28:01: Registering ResourceManager for type Mesh
13:28:01: Registering ResourceManager for type Skeleton
13:28:01: MovableObjectFactory for type 'ParticleSystem' registered.
13:28:01: OverlayElementFactory for type Panel registered.
13:28:01: OverlayElementFactory for type BorderPanel registered.
13:28:01: OverlayElementFactory for type TextArea registered.
13:28:01: Registering ResourceManager for type Font
13:28:01: ArchiveFactory for archive type FileSystem registered.
13:28:01: ArchiveFactory for archive type Zip registered.
13:28:01: FreeImage version: 3.10.0
13:28:01: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
13:28:01: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
13:28:01: DDS codec registering
13:28:01: Registering ResourceManager for type HighLevelGpuProgram
13:28:01: Registering ResourceManager for type Compositor
13:28:01: MovableObjectFactory for type 'Entity' registered.
13:28:01: MovableObjectFactory for type 'Light' registered.
13:28:01: MovableObjectFactory for type 'BillboardSet' registered.
13:28:01: MovableObjectFactory for type 'ManualObject' registered.
13:28:01: MovableObjectFactory for type 'BillboardChain' registered.
13:28:01: MovableObjectFactory for type 'RibbonTrail' registered.
13:28:01: Loading library .\plugins\..\ParticleUniverse
13:28:01: Installing plugin: ParticleUniverse
13:28:01: MovableObjectFactory for type 'PUParticleSystem' registered.
13:28:01: MovableObjectFactory for type 'BoxSet' registered.
13:28:01: MovableObjectFactory for type 'SphereSet' registered.
13:28:01: ParticleUniverse: Particle Renderer Type 'Billboard' registered
13:28:01: ParticleUniverse: Particle Renderer Type 'Box' registered
13:28:01: ParticleUniverse: Particle Renderer Type 'Sphere' registered
13:28:01: ParticleUniverse: Particle Renderer Type 'Entity' registered
13:28:01: ParticleUniverse: Particle Renderer Type 'RibbonTrail' registered
13:28:01: ParticleUniverse: Particle Renderer Type 'Light' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Point' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Line' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Box' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Circle' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'SphereSurface' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Vertex' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'MeshSurface' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Position' registered
13:28:01: ParticleUniverse: Particle Emitter Type 'Slave' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Dummy01' registered
13:28:01: ParticleUniverse: Particle Affector Type 'LinearForce' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Gravity' registered
13:28:01: ParticleUniverse: Particle Affector Type 'ParticleFollower' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Vortex' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Randomiser' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Line' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Scale' registered
13:28:01: ParticleUniverse: Particle Affector Type 'GeometryRotator' registered
13:28:01: ParticleUniverse: Particle Affector Type 'TextureRotator' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Jet' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Align' registered
13:28:01: ParticleUniverse: Particle Affector Type 'FlockCentering' registered
13:28:01: ParticleUniverse: Particle Affector Type 'CollisionAvoidance' registered
13:28:01: ParticleUniverse: Particle Affector Type 'VelocityMatching' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Colour' registered
13:28:01: ParticleUniverse: Particle Affector Type 'SineForce' registered
13:28:01: ParticleUniverse: Particle Affector Type 'Dummy02' registered
13:28:01: ParticleUniverse: Particle Affector Type 'SphereCollider' registered
13:28:01: ParticleUniverse: Particle Affector Type 'PlaneCollider' registered
13:28:01: ParticleUniverse: Particle Affector Type 'BoxCollider' registered
13:28:01: ParticleUniverse: Particle Affector Type 'InterParticleCollider' registered
13:28:01: ParticleUniverse: Particle Affector Type 'PathFollower' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnExpire' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnEmission' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnCount' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnEventFlag' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnCollision' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnVelocity' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnTime' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnPosition' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnClear' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnQuota' registered
13:28:01: ParticleUniverse: Particle Observer Type 'OnRandom' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoExpire' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoFreeze' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoPlacementParticle' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoStopSystem' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoEnableComponent' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoAffector' registered
13:28:01: ParticleUniverse: Particle EventHandler Type 'DoScale' registered
13:28:01: ParticleUniverse: Particle Extern Type 'Gravity' registered
13:28:01: ParticleUniverse: Particle Extern Type 'SphereCollider' registered
13:28:01: ParticleUniverse: Particle Extern Type 'BoxCollider' registered
13:28:01: ParticleUniverse: Particle Extern Type 'Vortex' registered
13:28:01: ParticleUniverse: Particle Behaviour Type 'Slave' registered
13:28:01: Plugin successfully installed
13:28:01: Loading library .\plugins\Plugin_CgProgramManager
13:28:01: Installing plugin: Cg Program Manager
13:28:01: Plugin successfully installed
13:28:01: Loading library .\plugins\Plugin_OctreeSceneManager
13:28:01: Installing plugin: Octree & Terrain Scene Manager
13:28:01: Plugin successfully installed
13:28:01: Loading library .\plugins\RenderSystem_Direct3D9
13:28:01: Installing plugin: D3D9 RenderSystem
13:28:01: D3D9 : Direct3D9 Rendering Subsystem created.
13:28:02: D3D9: Driver Detection Starts
13:28:02: D3D9: Driver Detection Ends
13:28:02: Plugin successfully installed
13:28:02: Loading library .\plugins\RenderSystem_GL
13:28:02: Installing plugin: GL RenderSystem
13:28:02: OpenGL Rendering Subsystem created.
13:28:02: Plugin successfully installed
13:28:02: *-*-* OGRE Initialising
13:28:02: *-*-* Version 1.4.9 (Eihort)
13:28:02: Creating resource group Caelum
13:28:02: Added resource location '../media/Caelum' of type 'FileSystem' to resource group 'Caelum'
13:28:02: Added resource location '../media' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/fonts' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/gui' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/materials/programs' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/materials/scripts' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/materials/textures' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/models' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/models/characters' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/overlay' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/packs' of type 'FileSystem' to resource group 'General'
13:28:02: Added resource location '../media/particle' of type 'FileSystem' to resource group 'General'
13:28:02: Creating resource group Hydrax
13:28:02: Added resource location '../media/Hydrax' of type 'FileSystem' to resource group 'Hydrax'
13:28:02: Creating resource group ParticleUniverse
13:28:02: Added resource location '../media/ParticleUniverse' of type 'FileSystem' to resource group 'ParticleUniverse'
13:28:02: Added resource location '../media/ParticleUniverse/material' of type 'FileSystem' to resource group 'ParticleUniverse'
13:28:02: Added resource location '../media/ParticleUniverse/scripts' of type 'FileSystem' to resource group 'ParticleUniverse'
13:28:02: Added resource location '../media/ParticleUniverse/models' of type 'FileSystem' to resource group 'ParticleUniverse'
13:28:02: Added resource location '../media/ParticleUniverse/textures' of type 'FileSystem' to resource group 'ParticleUniverse'
13:28:02: Creating resource group Sounds
13:28:02: Added resource location '../media/sounds/weather' of type 'FileSystem' to resource group 'Sounds'
13:28:02: D3D9 : RenderSystem Option: Allow NVPerfHUD = No
13:28:02: D3D9 : RenderSystem Option: Anti aliasing = Level 2
13:28:02: D3D9 : RenderSystem Option: Floating-point mode = Fastest
13:28:02: D3D9 : RenderSystem Option: Full Screen = No
13:28:02: D3D9 : RenderSystem Option: Rendering Device = Radeon X1950 Pro
13:28:02: D3D9 : RenderSystem Option: VSync = No
13:28:02: D3D9 : RenderSystem Option: Video Mode = 1280 x 800 @ 32-bit colour
13:28:03: CPU Identifier & Features
13:28:03: -------------------------
13:28:03: * CPU ID: AuthenticAMD: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
13:28:03: * SSE: yes
13:28:03: * SSE2: yes
13:28:03: * SSE3: yes
13:28:03: * MMX: yes
13:28:03: * MMXEXT: yes
13:28:03: * 3DNOW: yes
13:28:03: * 3DNOWEXT: yes
13:28:03: * CMOV: yes
13:28:03: * TSC: yes
13:28:03: * FPU: yes
13:28:03: * PRO: yes
13:28:03: * HT: no
13:28:03: -------------------------
13:28:03: D3D9 : Subsystem Initialising
13:28:03: D3D9RenderSystem::createRenderWindow "Rush", 1280x800 windowed miscParams: FSAA=2 FSAAQuality=0 colourDepth=32 useNVPerfHUD=false vsync=false
13:28:03: D3D9 : Created D3D9 Rendering Window 'Rush' : 1280x800, 32bpp
13:28:03: D3D9 : WARNING - disabling VSync in windowed mode can cause timing issues at lower frame rates, turn VSync on if you observe this problem.
13:28:03: Registering ResourceManager for type Texture
13:28:03: Registering ResourceManager for type GpuProgram
13:28:03: RenderSystem capabilities
13:28:03: -------------------------
13:28:03: * Hardware generation of mipmaps: yes
13:28:03: * Texture blending: yes
13:28:03: * Anisotropic texture filtering: yes
13:28:03: * Dot product texture operation: yes
13:28:03: * Cube mapping: yes
13:28:03: * Hardware stencil buffer: yes
13:28:03: - Stencil depth: 8
13:28:03: - Two sided stencil support: yes
13:28:03: - Wrap stencil values: yes
13:28:03: * Hardware vertex / index buffers: yes
13:28:03: * Vertex programs: yes
13:28:03: - Max vertex program version: vs_3_0
13:28:03: * Fragment programs: yes
13:28:03: - Max fragment program version: ps_3_0
13:28:03: * Texture Compression: yes
13:28:03: - DXT: yes
13:28:03: - VTC: no
13:28:03: * Scissor Rectangle: yes
13:28:03: * Hardware Occlusion Query: yes
13:28:03: * User clip planes: yes
13:28:03: * VET_UBYTE4 vertex element type: yes
13:28:03: * Infinite far plane projection: yes
13:28:03: * Hardware render-to-texture: yes
13:28:03: * Floating point textures: yes
13:28:03: * Non-power-of-two textures: yes (limited)
13:28:03: * Volume textures: yes
13:28:03: * Multiple Render Targets: 4
13:28:03: * Point Sprites: yes
13:28:03: * Extended point parameters: yes
13:28:03: * Max Point Size: 256
13:28:03: * Vertex texture fetch: no
13:28:03: ***************************************
13:28:03: *** D3D9 : Subsystem Initialised OK ***
13:28:03: ***************************************
13:28:03: ResourceBackgroundQueue - threading disabled
13:28:03: Particle Renderer Type 'billboard' registered
13:28:03: SceneManagerFactory for type 'OctreeSceneManager' registered.
13:28:03: SceneManagerFactory for type 'TerrainSceneManager' registered.
13:28:03: Parsing scripts for resource group Autodetect
13:28:03: Finished parsing scripts for resource group Autodetect
13:28:03: Parsing scripts for resource group Caelum
13:28:03: Parsing script GroundFog.program
13:28:03: Parsing script Haze.program
13:28:03: Parsing script MinimalCompositorVP.program
13:28:03: Parsing script DepthComposer.material
13:28:03: Error at line 43 of DepthComposer.material: Invalid param_named attribute - you need 6 parameters for a parameter of type float4x4
13:28:03: Error at line 63 of DepthComposer.material: Invalid param_named attribute - you need 6 parameters for a parameter of type float4x4
13:28:03: Error at line 81 of DepthComposer.material: Invalid param_named attribute - you need 6 parameters for a parameter of type float4x4
13:28:03: Error at line 104 of DepthComposer.material: Invalid param_named attribute - you need 6 parameters for a parameter of type float4x4
13:28:03: Parsing script GroundFog.material
13:28:03: Parsing script LayeredClouds.material
13:28:03: Parsing script moon.material
13:28:03: Parsing script PointStarfield.material
13:28:03: Parsing script Precipitation.material
13:28:03: Parsing script SkyDome.material
13:28:03: Parsing script Starfield.material
13:28:03: Parsing script Sun.material
13:28:03: Parsing script DepthComposer.compositor
13:28:03: Parsing script Precipitation.compositor
13:28:03: Finished parsing scripts for resource group Caelum
13:28:03: Parsing scripts for resource group General
13:28:03: Parsing script fade.material
13:28:03: Parsing script piano.material
13:28:03: Parsing script Scene.material
13:28:03: Parsing script fade.overlay
13:28:03: D3D9 : ***** Dimensions altered by the render system
13:28:03: D3D9 : ***** Source image dimensions : 23x23
13:28:03: D3D9 : ***** Texture dimensions : 32x32
13:28:03: Texture: black.png: Loading 1 faces(PF_R8G8B8,23x23x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,32x32x1.
13:28:03: D3D9 : ***** Dimensions altered by the render system
13:28:03: D3D9 : ***** Source image dimensions : 23x23
13:28:03: D3D9 : ***** Texture dimensions : 32x32
13:28:03: Texture: white.png: Loading 1 faces(PF_R8G8B8,23x23x1) with 5 generated mipmaps from Image. Internal format is PF_X8R8G8B8,32x32x1.
13:28:03: Finished parsing scripts for resource group General
13:28:03: Parsing scripts for resource group Hydrax
13:28:03: Parsing script debug.material
13:28:03: Finished parsing scripts for resource group Hydrax
13:28:03: Parsing scripts for resource group Internal
13:28:03: Finished parsing scripts for resource group Internal
13:28:03: Parsing scripts for resource group ParticleUniverse
13:28:03: Parsing script Lightning.material
13:28:03: Parsing script Weather.material
13:28:03: Parsing script generic.pua
13:28:03: ParticleUniverse: Alias '$defaultBillboardRenderer' registered
13:28:03: ParticleUniverse: Alias '$flatBillboardRenderer' registered
13:28:03: ParticleUniverse: Alias '$simpleEmitter' registered
13:28:03: Parsing script lightning.pu
13:28:03: ParticleUniverse: Particle System Template 'electricBeamSystem' registered
13:28:03: D3D9 : ***** Dimensions altered by the render system
13:28:03: D3D9 : ***** Source image dimensions : 20x64
13:28:03: D3D9 : ***** Texture dimensions : 32x64
13:28:03: Texture: pu_lightning.png: Loading 1 faces(PF_A8R8G8B8,20x64x1) with 6 generated mipmaps from Image. Internal format is PF_A8R8G8B8,32x64x1.
13:28:03: Parsing script weather.pu
13:28:03: ParticleUniverse: Particle System Template 'rainSystem_pioggia' registered
13:28:03: D3D9 : ***** Dimensions altered by the render system
13:28:03: D3D9 : ***** Source image dimensions : 32x1050
13:28:03: D3D9 : ***** Texture dimensions : 32x2048
13:28:03: Texture: pu_rain_01.png: Loading 1 faces(PF_L16,32x1050x1) with 11 generated mipmaps from Image. Internal format is PF_L16,32x2048x1.
13:28:03: Texture: flare.png: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
13:28:03: ParticleUniverse: Particle System Template 'rainSystem_splash' registered
13:28:03: Texture: pu_mist_01_128x128.png: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:03: ParticleUniverse: Particle System Template 'rainSystem_hail' registered
13:28:03: Finished parsing scripts for resource group ParticleUniverse
13:28:03: Parsing scripts for resource group Sounds
13:28:03: Finished parsing scripts for resource group Sounds
13:28:03: TerrainSceneManager: Registered a new PageSource for type Heightmap
13:28:03: Creating viewport on target 'Rush', rendering from camera 'Camera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
13:28:03: Texture: grass_1024.jpg: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
13:28:03: Mesh: Loading obj0_boots.mesh.
13:28:03: Texture: Untitled.tga.png: Loading 1 faces(PF_R8G8B8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
13:28:03: Caelum: Initialising Caelum system...
13:28:03: Caelum: Creating caelum sub-components.
13:28:03: Texture: EarthClearSky2.png: Loading 1 faces(PF_A8R8G8B8,64x64x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,64x64x1.
13:28:03: Texture: AtmosphereDepth.png: Loading 1 faces(PF_R8G8B8,32x1x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,32x1x1.
13:28:03: Caelum: Creating CaelumSphericDome sphere mesh resource...
13:28:03: WARNING: Mesh instance 'CaelumSphericDome' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:28:03: Caelum: generateSphericDome DONE
13:28:03: Texture: sun_disc.png: Loading 1 faces(PF_A8R8G8B8,256x256x1) with 0 generated mipmaps from Image. Internal format is PF_A8R8G8B8,256x256x1.
13:28:03: D3D9 : Loading 2D Texture, image name : 'moon_disc.dds' with 2147483647 mip map levels
13:28:03: D3D9 : Loading 2D Texture, image name : 'noise1.dds' with 2147483647 mip map levels
13:28:03: D3D9 : Loading 2D Texture, image name : 'noise2.dds' with 2147483647 mip map levels
13:28:03: D3D9 : Loading 2D Texture, image name : 'noise4.dds' with 2147483647 mip map levels
13:28:03: Caelum: DONE initializing
13:28:03: GAMEAPP: Creating Caelum Manager
13:28:04: GAMEAPP: Creating Input Manager
13:28:04: [Hydrax] Hydrax created.
13:28:04: [Hydrax] goodPreset.hdx loaded.
13:28:04: [Hydrax] Creating module...
13:28:04: [Hydrax] Creating ProjectedGridVertex module.
13:28:04: [Hydrax] ProjectedGridVertex created.
13:28:04: [Hydrax] Module created.
13:28:04: [Hydrax] Initializating RTT Manager...
13:28:04: Creating viewport on target 'rtt/103924320', rendering from camera 'Camera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
13:28:04: Creating viewport on target 'rtt/103926528', rendering from camera 'Camera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
13:28:04: Creating viewport on target 'rtt/103957248', rendering from camera 'Camera', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
13:28:04: [Hydrax] RTT manager initialized.
13:28:04: [Hydrax] Registring device restored listener...
13:28:04: [Hydrax] Device restored listener registred.
13:28:04: [Hydrax] Creating materials...
13:28:04: [Hydrax] Creating water material...
13:28:04: WARNING: Texture instance 'HydraxReflectionMap' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:28:04: WARNING: Texture instance 'HydraxRefractionMap' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:28:04: WARNING: Texture instance 'HydraxDepthMap' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:28:04: Texture: Fresnel.bmp: Loading 1 faces(PF_L8,256x1x1) with 8 generated mipmaps from Image. Internal format is PF_L8,256x1x1.
13:28:04: Texture: Foam.png: Loading 1 faces(PF_R8G8B8,512x512x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,512x512x1.
13:28:04: [Hydrax] Water material created.
13:28:04: [Hydrax] Creating depth material...
13:28:04: Texture: Caustics_0.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_1.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_2.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_3.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_4.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_5.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_6.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_7.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_8.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_9.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_10.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_11.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_12.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_13.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_14.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_15.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_16.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_17.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_18.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_19.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_20.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_21.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_22.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_23.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_24.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_25.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_26.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_27.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_28.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_29.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_30.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: Texture: Caustics_31.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:28:04: [Hydrax] Depth material created.
13:28:04: [Hydrax] Materials created.
13:28:04: [Hydrax] Creating water mesh...
13:28:04: WARNING: Mesh instance 'HydraxMesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:28:04: [Hydrax] Water mesh created.
13:28:04: GAMEAPP: Creating Hydrax Manager
13:28:04: Caelum: Recomputing starfield geometry.

Xavyiy

22-10-2008 12:32:50

Seems to be fine, can you post a screenshot of hydrax depth rtt with the sun middle-in the water? (To see what is really happend).

Netskate

22-10-2008 12:52:26

I hope I've catched the right moment:

Xavyiy

22-10-2008 13:03:15

I think I know what's happen, I'll try to config it this night(I've to go to the university right now).

Netskate

22-10-2008 13:06:44

ok, thanks another time ^^

Xavyiy

22-10-2008 22:49:43

material CaelumSphereSun
{
technique Defaulto
{
pass Main
{
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
colour_op_ex source1 src_manual src_current 0 0 0
}
}
}

material CaelumSpriteSun
{
receive_shadows off
technique Default
{
pass Main
{
lighting off
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
scene_blend src_colour one_minus_src_colour
alpha_rejection greater_equal 128
emissive vertexcolour
texture_unit Texture0
{
texture sun_disc.png 2d 0
}
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
colour_op_ex source1 src_manual src_current 0 0 0
}

}
}


Try with this materials.

Netskate

22-10-2008 22:55:43

some progress:

Xavyiy

22-10-2008 23:00:34

Debug the depth texture in the same situation of last screenshot.

Netskate

22-10-2008 23:06:14

Xavyiy

22-10-2008 23:12:03

Ghhh we need a totally black material, try with: lighting off in the pass of the HydraxDepth technique.

Netskate

22-10-2008 23:15:48

with lighting off in each depth technique:



I tried it for each sun image, background black and background trasparent, same result.

Xavyiy

22-10-2008 23:20:20

and with lighting off and:

ambient 0 0 0
diffuse 0 0 0

?

Netskate

22-10-2008 23:25:46

nothing to do:



:cry:

Xavyiy

22-10-2008 23:33:52

material CaelumSphereSun
{
technique Defaulto
{
pass Main
{
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
colour_op_ex modulate src_manual src_current 0 0 0
}
}
}

material CaelumSpriteSun
{
receive_shadows off
technique Default
{
pass Main
{
lighting off
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
scene_blend src_colour one_minus_src_colour
alpha_rejection greater_equal 128
emissive vertexcolour
texture_unit Texture0
{
texture sun_disc.png 2d 0
}
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
colour_op_ex modulate src_manual src_current 0 0 0
}

}
}

Netskate

22-10-2008 23:38:01

Xavyiy

22-10-2008 23:44:54

material CaelumSphereSun
{
technique Defaulto
{
pass Main
{
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
lighting off
texture_unit
{
colour_op_ex modulate src_manual src_current 0 0 0
}
}
}
}

material CaelumSpriteSun
{
receive_shadows off
technique Default
{
pass Main
{
lighting off
depth_check off
depth_write off
fog_override true none
ambient 0 0 0
diffuse 0 0 0
scene_blend src_colour one_minus_src_colour
alpha_rejection greater_equal 128
emissive vertexcolour
texture_unit Texture0
{
texture sun_disc.png 2d 0
}
}
}

technique HydraxDepth
{
scheme HydraxDepth

pass
{
lighting off
texture_unit
{
colour_op_ex modulate src_manual src_current 0 0 0
}

}

}
}


One more try...^^

Netskate

22-10-2008 23:56:08

this deserves a video:

www.netskate.site90.net/download/stuff/Movie.wmv


finally... I'm so happy, thanks

tomorrow I'll begin to write a little how to for your forum :D

it works perfectly also for moon, but... what was the problem?

Xavyiy

23-10-2008 00:05:20

The problem was that the sun(And all caelum components in general) aren't Entities and it's render queues aren't the default ogre skyboxe queue.

You have to do the same(Copy the HydraxDepth tehcnique) in ALL Caelum materials(Sun, Mon, Starfields, Clouds, etc..xD) in order to "ignore" caelum in depth RTT, render all caelum components with black colour.

Edit all materials and check that all works as expected ;).

Xavi

Netskate

23-10-2008 00:08:26

I edited sun and moon material and all works.

don't need other like starfield, but this is good to know :)

(why I should edit all materials for those objects that don't go underwater?)

thanks for your help, you're so patience and gentle.

In what are you graduating?

Xavyiy

23-10-2008 00:17:31

This is my first year in the university(I'm 18 ). I'm studying(starting...:)) engineering of communications(5 years).

I suggest you adding the HydraxDepth technique to other Caelum components because as far as I can see, seems that Caelum geometry is not clippled by custom near clip plane(? And it must... I'll look into this...) and if you're under a wave but over the water, the wave must dissapear due to the depth map is "red" and it must be black(See the editor debug window to compare it).

Xavi

Netskate

23-10-2008 00:30:33

I understand, this is not my problem because water in my game is only an "eye-candy" object, you can't interact with it, but I wrote about this in the little "how to" I'll write tomorrow.

thanks another time and good luck for your study :)

Xavyiy

23-10-2008 00:33:32

Okey :)
A how-to will be very useful for users!

Thanks ;)

shokelafch

14-04-2011 17:42:06


P.D.: (World scale mustn't be an issue).


Nice masterpiece!
I love the way your waves tide over the terrain in the demo.
But I have two points:
1) The scale is an issue for me too. When I move my car near the hudrax water, it looks as small as an ant! :lol: , my world scale is also 1 unit equals 1 meter. I have chosen it because of physics limitation. Therefore if there is a way to change the world scale, please, please let me know.
2) When I add shadow to the scene, either the water disappears or it only mirrors the skybox and starts flickering. I have test CG and HLSL Shaders but no success.

infos:
hydrax : 1.5.1 patched for Ogre 1.7.1
renderSystem: DirectX 9
Platform: windows 7
Graphic Card: NVidia GeForce 425M on Sony laptop

thanks in advance.