addHillPlaneMesh not visible?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
GiffE
Posts: 4
Joined: Sun Apr 02, 2006 12:54 pm

addHillPlaneMesh not visible?

Post by GiffE »

Hey, I'm trying to simply render a massive plane (the size of the skydome) which I can then later work on a water shader for.
So I wanted to start out making sure I can just the plane visible with a static water texture.

However this does not create any such mesh (atleast not one I can see)
(I've changed the sizes around to see if that was it but still no go) Is there something I'm missing when using addhillplanemesh that I don't know about?

Code: Select all

IAnimatedMesh *watermesh = scenemgr->addHillPlaneMesh( "water",
													core::dimension2d<f32>(20,20),
													core::dimension2d<u32>(40,40), 0, 0,
													core::dimension2d<f32>(0,0),
													core::dimension2d<f32>(10,10));

	water = scenemgr->addAnimatedMeshSceneNode(watermesh);
    water->setPosition(core::vector3df(0,7,0));
	water->setMaterialTexture(1, driver->getTexture("Game/Textures/water/water.jpg"));
CuteAlien
Admin
Posts: 9942
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Not sure right now. On a quick view the problem could be that you set texture with index 1 while you probably want to use index 0 (which is the first one).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
GiffE
Posts: 4
Joined: Sun Apr 02, 2006 12:54 pm

Post by GiffE »

CuteAlien wrote:Not sure right now. On a quick view the problem could be that you set texture with index 1 while you probably want to use index 0 (which is the first one).
I had thought of this too, tried it with both and no luck either way.

Also it shows up black when I use:

Code: Select all

water = scenemgr->addWaterSurfaceSceneNode(watermesh); 
instead of addAnimatedMeshSceneNode

But I do not want to use the built in water surface...
CuteAlien
Admin
Posts: 9942
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Maybe you have no light. Disable light in the material of the node with water->setMaterialFlag(EMF_LIGHTING, false);
Or just add a light.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
GiffE
Posts: 4
Joined: Sun Apr 02, 2006 12:54 pm

Post by GiffE »

CuteAlien wrote:Maybe you have no light. Disable light in the material of the node with water->setMaterialFlag(EMF_LIGHTING, false);
Or just add a light.
oh wow... I feel like such an idiot :oops: it WAS there, just perpendicular to the camera (right inside it) so it couldnt be seen...
Thanks anyway cutealien.
Post Reply