Water has gone

Swinely

18-11-2009 15:12:12

Hi there,

I've just searched and seen other people with similar problems and some have suggested to disable stencil shadows, how is this done?

The weird thing is running the hydrax demo still works perfectly but my own creation has stopped rendering the water entirely, this happened about the time I tried running it on full screen mode (and running it on non fullscreen doesn't anti this affect)

Any ideas what I can do?


Thanks!

Gemberkoekje

18-11-2009 15:50:29

The code you should look for is
"setShadowTechnique"

First make sure you either don't have it in your code at all, or if it's in your code already, just change it... If it isn't, add it with some other shadow technique:
http://www.ogre3d.org/docs/api/html/nam ... 6f183715d6
Best is to start with SHADOWTYPE_NONE, make sure the water works, then change the shadowtype to something that both works with Hydrax and looks good on your particular project.

Example:
m_SceneMgr->setShadowTechnique(SHADOWTYPE_NONE);

My personal initializing code:
m_SceneMgr = m_Root->createSceneManager( Ogre::ST_EXTERIOR_CLOSE, "DefaultSceneManager" );

// create camera
m_Camera = m_SceneMgr->createCamera( "DefaultCamera" );
m_Camera->setPosition( Ogre::Vector3( 0, 20, -90 ) );
m_Camera->setDirection( Ogre::Vector3( 0, 0, 1 ) );
m_Camera->setNearClipDistance( 1 );
m_Camera->setFarClipDistance( 1e5f );
m_Camera->setFOVy(Ogre::Degree(45));

// create viewport
Ogre::Viewport* vp = m_Window->addViewport( m_Camera );
vp->setBackgroundColour( Ogre::ColourValue( 0.3, 0.1, 0.1, 1 ) );

// lighting
m_SceneMgr->setAmbientLight( Ogre::ColourValue( .5f, .5f, .5f ) );
m_SceneMgr->setShadowTechnique( Ogre::SHADOWTYPE_NONE );

m_Root->addFrameListener( new Ogre::FrameListener() );

Swinely

18-11-2009 22:25:58

Hmm it wasn't mentioned anywhere in the code and i've added the line to enforce no shadows now just to make sure, but it still doesn't show any water.


Nothing at all appears to be different in the ogre.txt file from when I run my version compared to the demo either? Its as if its all being made properly but not showing for no reason? I've tested this on my laptop and the same thing happens :\

Gemberkoekje

19-11-2009 01:05:01

Do you get fog when you're 'underwater'? Did you check way below you, in case the water has, for some reason, decided to sink a whole lot? Are you absolutely sure hydrax is running?

Swinely

19-11-2009 19:22:56

Nope no fog at all, just the blue from the sky everywhere.
Just gone down a long way and theres still nothing anywhere, can just see the trees on the island above.

It must be running because the sky etc works perfectly? and all the code to make the hydrax scene is identical to the Demo version :\

WesleyByrd

09-01-2015 11:53:52

Hello there Xavier as well as Community, around my task the in place work well way with Unces of course, if now i'm not completely wrong Hydrax uses B since in place, their legitimate?

We have tried to alter work well technique simply by changing b together with z . even so the planes presents itself even so the material on there can be completely wrong?

May this specific imply i need to change likewise the Hydrax Materials?
I think i discovered in certain wrinkles that there's inverting the work well technique, could you remember to help me personally?

Appreciate it,
as well as sorry intended for my own the english language.