Anim8or Community

General Category => Anim8or v0.98 Discussion Forum => Topic started by: onespirit5777 on March 18, 2009, 08:26:49 pm

Title: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: onespirit5777 on March 18, 2009, 08:26:49 pm
This was drawn using the cube button - I'm thinking of redoing it and build each wall one at a time. No matter what I do the light shines through the walls around the bottom. I even dropped the floor below the green plane and have the same results. I went as far as shelling the cube to see if this would help. I also had to shell it so that the inside would would have front faces because the inside was back faces and the light would not be recieved.

I've even used spot light and have ray trace enabled.
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: headwax on March 18, 2009, 08:50:28 pm
hmm maybe shell the plane?
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: Tanzim on March 19, 2009, 05:25:31 am
It looks like your house is just above the ground plane.
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: onespirit5777 on March 21, 2009, 11:13:10 am
I have sunk it below the plane and got the same results
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: xalener on March 21, 2009, 09:47:27 pm
Shell the house?
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: Steve on March 22, 2009, 09:44:15 pm
The reason the shadow bias has to be set this high is because without it the flat faces polygons used in Anim8or could not be made to look smooth.  Smoothing out the normals introduces an inconsistency in the geometry.  The physical surface (perfectly flat faces) and the apparent surface (smoothly lit curved shapes) are not in agreement.  Ray traced shadows follow the true geometry and would make very ugly dark jagged edges where a curved surface goes from light to shadow.  Adding a disproportionally large shadow bias reduces the probelm so that it's seldom visible.

Here's an example of a default sphere and an infinite light.

To fix it simply increase the number of divisions used for the sphere.
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: Tanzim on March 23, 2009, 05:18:50 am
Hey Steve, is the huge shadow bias problem only something Anim8or has, or do all CG software have this problem?
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: onespirit5777 on March 24, 2009, 09:35:43 pm
Thank you - I'll see what I can figure out and find a way around this if possible.
Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: Steve on March 31, 2009, 12:39:56 am
It's fundamental to polygonal modeling and raytracing.  The way to get around it is to tesselate your model into more, smaller faces in the areas where the true geometrical normal differs more from then interpolated "smooth" normal.  The example I show above is a sphere with the default 8x12 faces.  The geometry is flat on each face but the smooth lighting tries to hide this.  The dark artifacts are in a geometric shadow but the interpolated (smooth) normal says it should be lit.  Increasing the shadow bias will make this go away but that would cause problems like onespirit5777 has to get much worse.  If you give the wall thickness it should help.

Note: this problem is also in the scanline shader.  But because the view point is known I can be a lot smarter about hiding it.  This is tricky code to write though.  Getting all these values right for the scanline renderer delayed it's release by well over 3 months and made my first attempt at a ray tracer useless (only about a year of coding thrown away, no big deal :-)


Title: Re: I've tried Vista and XP Professional - Light goes through the bottom edges
Post by: onespirit5777 on April 01, 2009, 08:41:04 pm
Ouch! That bites - What I haven't tried is make each wall by it's self but using a cube to set the depth. That should work and thanks again for the info. It really helps to understand certain things as it will help me be a better 3d artist. I still have a long way to go, but I'll be there some day if I stick to it.

This program is so easy to use and so powerful in its' simplicity. Truespace isn't too bad, but this program has spoiled me and I don't like to use the others because of you. With just a few simple clicks of the mouse and it's done. You just can't beat that!!!

They hate you - don't they. HA HA HA HA!