PDA

View Full Version : 9.6 Lighting/Shadow Oddness



aplear45
01-04-2010, 09:22 PM
Hi all,

This is my first few times posting to the forum but have been a LW user for many years at the hobby level. I am having a problem with something and was wondering if some of you more experienced people could maybe shed some LIGHT so to speak.

I recently purchased a tutorial from 3dgarage, Its the Broadcast package. I have a home theater downstairs and thought it would be neat to come up with a cool intro animation like at the movies and this tutorial has a section on just that. I will try my best to explain what is happening and maybe someone could tell me why its not working. Below is a rough sketch of starting the tutorial.

Basically, create a box in modeler, flip poly's so they are all faceing inwards like for a room. Delete the front side of the box (the one the camera is looking into). Next layer create a small disk in front view, extrude it, then use the array tool and clone it on the x axis say 40 times and have some jitter on the y axis. Maybe move and copy then a couple of times but keep them lined up on the x axis. Then center the box in perveous layer so the tubes intersect the ceiling. Basicall so when brought into layout and position the cameral looking into room you have a intersting looking pipe ceiling. Now some point lights with falloff are created inside the box for lighting. Ok all working fine, very easy stuff but this next part is where im not getting the same results.

Ok so with above done, now create another point light and position it above the box and pipes and watching the video tutorial you get nice cool looking, light beams coming thru the pipes from above casting shadows into the box, but in my re-creation no light is coming thru at all and no shadows. Yess, raytraceing shadows is turned on in render panel but no light is coming thru. Same thing with fprime. As a matter of fact with fprime running and i move the light, the only time it will actually light up the inside if the box is when it breakes thru the ceiling of the box. Now the box has all its poly normals flipped inwards even the top, i made sure, and double sided is not checked. Now I can get the light beams to show up if I delete the top poly's of the box or if i take the top poly's of the box and flip them so they are facing outwards. (But the tutorial clearly did not do this) Is it me or is this working totally opposite of the way it should? So i tried something a little different.

I created a box and flipped the poly's inwards and delete the front poly's, in another layer I created 3 small narrow boxes centered above the big one. then in another layer I created a box above all that for well lets just call it sky with the normal of it facing down towards all the others and sent it to layout. Start up fprime, just because its interactive. I place the camera so you can see into the box but pulled back enough you can see the 3 narrow boxes and sky as well. Take the default distant light and change to point, turn on raytrace shadows and place the light centered above everything in scene. Nothing lights up at all, other than feint ambient nothing. ok, so move light down so its inbetweet the sky and the 3 boxes i created. It now lights the sky poly and you can see some of the boxes but room is still dark. Now I move the light down further so its inbetween the 3 boxes and the room. It lights the bottom of the boxes and also casts shadows of those boxes onto the ceiling poly and room still dark. Ok, that part seems to works like its suppose to. So now I move the light down more into the room. The room now lights up AND the boxes that are above the ceiling are also lit AND they are casting their shdows onto the ceiling poly with the light inside the room. f9 render gives same results. I guess all of the above for, Is this right??

It seems to me its totally opposite of what it should be. If light hits a poly normal thats facing the light it should bounce the light right? Not pass the light thru?

Remeber, I am just a noob hobbist but in following the tutorial exactly, the light above is not casting the light beams into the room, but yet in the video, i can clearly see that his is. Is there a setting somewhere that may not be checked that Im missing?

Again sorry for this huge post but Im really scratching my head on this one and any help would be appreciated. I have included a zip file of the basic scene in case that may help. Thanks in advance for any friendly advice!!

IgnusFast
01-04-2010, 10:47 PM
I believe this is the culprit:

http://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29

"The next important research breakthrough came from Turner Whitted in 1979. Previous algorithms cast rays from the eye into the scene, but the rays were traced no further. Whitted continued the process. When a ray hits a surface, it could generate up to three new types of rays: reflection, refraction, and shadow. A reflected ray continues on in the mirror-reflection direction from a shiny surface. It is then intersected with objects in the scene; the closest object it intersects is what will be seen in the reflection. Refraction rays traveling through transparent material work similarly, with the addition that a refractive ray could be entering or exiting a material. To further avoid tracing all rays in a scene, a shadow ray is used to test if a surface is visible to a light. A ray hits a surface at some point. If the surface at this point faces a light, a ray (to the computer, a line segment) is traced between this intersection point and the light. If any opaque object is found in between the surface and the light, the surface is in shadow and so the light does not contribute to its shade. This new layer of ray calculation added more realism to ray traced images."

Ray Tracing is backward; the rays are fired from the camera to the inside of the box; since they can't make it back out to the upper light, they are determined to be in shadow.

An algorithm could be developed to trace from each light instead, which would be more "real world" realistic. Possibly some commercial rendering engines do; as a fellow hobbiest and mathematical idiot, I have no idea. Such an engine would be pretty, but incredibly slow unless there's some crazy mathematical shortcuts out there.

Or I could be wrong entirely. But that's how I understand it. :)

aplear45
01-05-2010, 06:32 AM
Ok that makes some sort of sense but what I cant figure out is why his worked and mine dosent. Ill check back at the video and see if I can tell what version of LW he was using. but his definitly had shadows coming thru the pipes in the scene. Could they have maybe changed the way LW traces between 9.5 and 9.6? Just checked the website and it says 9.5 Broadcast Courseware. BTW thank you for your reply!

Daniel

IgnusFast
01-05-2010, 11:34 AM
I'm sorry, beyond that I don't have an answer. I'm pretty sure Lightwave has used the standard Reverse Tracing since its inception. I've also never seen that tutorial. Are you sure he didn't make the ceiling surface transparent, or flip the polys?

Triodin
01-05-2010, 02:55 PM
Hey Daniel -

It looks like you might need to space those bars out a little more. I don't know if there's enough room for the light to seep through. I'm doing some tests with the 'ol discovery edition and things are a little wonky.

I also think that the ceiling to the room is blocking your toplight.

You can exclude toplight's interaction with Layer 2 by clicking on toplight > properties > objects tab > click the layer you want to exclude.

So I think it's that one two combo that's knocking you out. #1 the bars are too close together and #2 the ceiling polys are blocking your light.

Hope this helps!

Also, if you're looking at tutorials, I highly recommend Kurv Studios http://kurvstudios.com/ some very cool stuff there!

-Johnny-

aplear45
01-05-2010, 04:15 PM
well just following the tutorial all the poly's are fliped inwards with no transparency on them at all. The funny thing is, i can add like 5% transparency to the top of the box and they show thru fne or if I actually flip all the top poly's so they are facing outward (Towards the top light) they work as well. So basically i can get them to show up but just following the tutorial exactly and seeing his work and mine not is driving me bonkers lol. But thank you for all of your suggestions. I have pretty much submitted all of the problems I am having to the author of the tut but have not heard back from him yet.

toby
01-05-2010, 10:49 PM
The ceiling polys are facing the one direction that a single-sided poly will cast shadows. This is completely normal, and I'd be surprised if the guy in the tutorial got a different result doing the same thing, he may have done something like turning off self-shadow of the box, without telling you.

aplear45
01-06-2010, 08:46 AM
Toby thank you! Unchecking self shadow for the box worked like a charm. I know in the video he never checked it at all but will forward that info and see if it helps. Mainly I just want to make sure others that may purchase this series dont get stuck at the point I did. And its not like its a fly by night company, as the author has written quite a few popular LW books over the years. Thanks again for the help!


Daniel