Parallax mapping and Shadow

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
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Parallax mapping and Shadow

Post by magisterrivus »

Hello to all,

i'm in love with a new problem :twisted: .

I found a post about that, but without an answer, so i'm asking this "again".

I created a tangentMesh for Parallaxmapping and everything is fine. But as soon as i add an ShadowVolumeSceneNode the whole Scene is messed up.

Take a look:

Image

I thought that i better add an AnimatedMeshSceneNode to the tangentMesh not the actual Mesh

Code: Select all

IAnimatedMeshSceneNode* anode = pCore->getSceneMgr()->addAnimatedMeshSceneNode(IAnimatedMesh*(tangentMesh));
but this code crashes my Application, although my it compiles fine. I'm clueless what to do.

Any suggestions?

Thanks in advance.
under construction
Mikenoworth
Posts: 78
Joined: Sat May 27, 2006 9:24 pm
Location: Logan, UT

Post by Mikenoworth »

Hey hey buckaroo. You're encountering two awesome Irrlicht shadow issues.

First one: "gods shadow" - Shadow over everything. When a shadow gets too far away from the camera, it covers everything in the scene. Don't know why, bad coding, who cares - there is a fix. Set the shadow color to r 0, g 0, b 0. You can add your own distance checks to make sure which nodes _should_ have shadows. (I'm curious as to if shadows are still being drawn for a node even if the node's visiblity is set to false)

Second: Ahh, z-fail method. Set it to false when adding shadows to your nodes. (check the addShadowNode(..) method, it's something like that). With z fail method set to true, only one node per mesh (for some diddly reason) can use a shadow, any other nodes using the same mesh will crash your app.

But hey, what are problems if there are work-arounds for them? I consider these issues fixed. :)

Hope this helps and makes some sense, I've been drinking for my late-dog-friend Cujo. :) He liked beer, as long as it was in his dogbowl.


EDIT: Just took a much better look at your second screenie and noticed the artifacts, still try disabling z-fail method for shadows, it may help.
Stout Beer
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post by magisterrivus »

No it didn't help :cry:.
From my superknowledged view, it looks like a problem with the tangent mesh, but i don't know how to fix it.

Here's a link to a video i have taken to show the artifacts

http://www.megaupload.com/de/?d=O6KQDTF9


Bye
under construction
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post by magisterrivus »

Arggh. This is driving my crazy.

OK, is it actually possible at all to have Parallaxmapping and dynamic Shadows at one time?

I tried disabling z-fail method, changed Materialflags, changed Parameters of the light (size) and a lot more. No change.

:cry:
under construction
Mikenoworth
Posts: 78
Joined: Sat May 27, 2006 9:24 pm
Location: Logan, UT

Post by Mikenoworth »

Your problem is completely unknown to me, the artifacts and so on, I would suggest reporting it as a bug (use a link to this topic) so that the devs will check it.

You should also try different renders, ie. OpenGl if you use Direct3D, in case one acts differently.
Stout Beer
magisterrivus
Posts: 33
Joined: Sat Aug 05, 2006 9:46 pm

Post by magisterrivus »

Hi Mikenoworth,

thanks for your answer.
I already tried changing the renderer, but no luck.

Let's see if the devs can tell me whats wrong

Bye
under construction
Post Reply