shadow speckles

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.
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

just passing through *quickly* here is a screen of it in my case as the old one has gone
http://imagefoo.com/viewfull/speckles1159915121.png
(ignore the spaceships)

This is opengl, irrlicht 1.1, ati mobility radeon 9700
funcdoobiest
Posts: 48
Joined: Thu Jun 15, 2006 6:35 pm

Post by funcdoobiest »

yeah sorry bitplane, I meant to suply more info originally, just real busy.

Right...

~Irrlicht 1.0 (haven't tried svn version)
~ATI Radeon X800Pro
~DirectX (haven't tried OGL, though it seems xDan has)
~Ground and environment are not completely flat, though you will see in the screen that it happens on the surface of those test scene node cube things
~I have just noticed that I don't specifically set material types for any of the meshes yet, so I assume they use solid by default?
~Regular setup of diffuse specular etc per vertex lighting
~As I said its a 3ds model exported to .X (panda exporter, I think) and resaved in the mesh viewer.
~I have tried various combiantination of having textures on/off for both the mesh casting and receiving the shadow

I can email you the models if you want but I am just too tired right now to go and sign up for some filesahring thing, sorry (i hate filling in forms), I will at some point if needed.

screens, ignore the crappy lighting and textures (yeah that is Sydney thrown on to that model)

Image

Image

Image
funcdoobiest
Posts: 48
Joined: Thu Jun 15, 2006 6:35 pm

Post by funcdoobiest »

After a bit more playing I've noticed the speckles seem to appear along the line of adjoining tris (and it occurs on both unscaled and scaled models - though I kind of expected that).

it was hard to get a good screen but the one below is just a textured .x cube I placed in mid air.

http://img246.imageshack.us/img246/6136/shadow4ww1.png

PS Thi s has also been tesetd on an nVidia card now, same problem. And I tried it with the Sydney model as well, seeing as it works in the demo, same problem again.
sgt_pinky
Posts: 149
Joined: Sat Oct 14, 2006 11:20 am
Location: Melbourne, Australia

Post by sgt_pinky »

Same problem here, but a bit different.

In my shadow, I can clearly see a silhouette of my world! All the little shapes of the objects in my world are cut out of the shadow.

I made a simple model, with only one lightmaped *.my3d scene imported. I will attach a screenshot when I get home.

8<----- Edit ------

Here's the screenshots I promised 8)

http://img207.imageshack.us/img207/6489/farxa3.jpg
http://img206.imageshack.us/img206/6448/closeyd0.jpg

So you can see in the second one how the silhouette of the whole scene (except for the ground), is excluded in the shadow.
Last edited by sgt_pinky on Mon Oct 16, 2006 8:23 am, edited 2 times in total.
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
Enceup09

Post by Enceup09 »

sgt_pinky
Posts: 149
Joined: Sat Oct 14, 2006 11:20 am
Location: Melbourne, Australia

Post by sgt_pinky »

I do believe sir, that is spam. I challenge you to a duel.
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
nFec
Posts: 5
Joined: Thu Oct 12, 2006 5:43 pm

Post by nFec »

sgt_pinky wrote:Same problem here, but a bit different.

In my shadow, I can clearly see a silhouette of my world! All the little shapes of the objects in my world are cut out of the shadow.

I made a simple model, with only one lightmaped *.my3d scene imported. I will attach a screenshot when I get home.

8<----- Edit ------

Here's the screenshots I promised 8)

http://img207.imageshack.us/img207/6489/farxa3.jpg
http://img206.imageshack.us/img206/6448/closeyd0.jpg

So you can see in the second one how the silhouette of the whole scene (except for the ground), is excluded in the shadow.
I'm experiencing the same problem as stated here: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=16271

Perhaps a mod, can merge this two threads or problems so that it gets the needed attention ;)

Best regards,
nFec
sgt_pinky
Posts: 149
Joined: Sat Oct 14, 2006 11:20 am
Location: Melbourne, Australia

Post by sgt_pinky »

Indeed. Yes, it is only when the camera is in the shadow. Interesting.
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
funcdoobiest
Posts: 48
Joined: Thu Jun 15, 2006 6:35 pm

Post by funcdoobiest »

Well I don't think you are really having the same problem and I think to describe your problem as a bug in the engine is a little bit unfair on Irrlicht. The problem you are encountering is simply a (well documented) limitation of the z-pass (or depth-pass) method of doing shadow volumes. I didn't see any code but I am assuming youset the zfailmethod parameter of your addShadow... to false (it is true by default) which forces the use of the the z-pass method, it is faster but does produce the artifacts you are seeing when the camera enters a shadow volume.

z-pass may be fine for you depending on your game, if you can be sure your cam won't enter a shadow volume its the one I would go with!

I think this is mentioned in the documentation and for more information just do a google, there is plenty of stuff on this issue out there. I guesss the speckles may be related in some way but yours definitely seems like the z-pass limitation.

PS if you haven't changed the zfailmethod param then I apologise and I don't know how the hell you are getting that problem =)
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

funcdoobiest, zfail is not implemented in irrlicht. Whether you set zfailmethod or not, zpass is done. But if you set zfailmethod=true then the zpass shadow volume is capped.

I haven't figured yet out what the capping does for zpass, as I only know it from zfail. Though I guess it fixes the shadow such, that it only shows the artifacts seen on the pics, instead of screwing the shadow up completely.
funcdoobiest
Posts: 48
Joined: Thu Jun 15, 2006 6:35 pm

Post by funcdoobiest »

oh okay thanks Saturn, sorry guys!! Guess I misread the docs :oops: it gave me the impression both methods were available...
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

You didn't really misread it. The docs state it, but they are wrong. ;)
sgt_pinky
Posts: 149
Joined: Sat Oct 14, 2006 11:20 am
Location: Melbourne, Australia

Post by sgt_pinky »

Ok, thanks. Will have to read up a bit more on shadow volumes obviously! :D
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
Post Reply