View Full Version : "Shadow linking"/ avoiding shadows?
Randolph 12-20-2003, 10:10 PM Okay, here's my problem.
I've got three objects A, B and C and a light. Now I want to make the light cast its shadow from A to B, and from B to C, but not directly from A to C. Look at the attatchment pic if you don't know what I mean (or what I'm too dumb to describe).
The solution could be some kind of mixture of use background shader, casts shadows/recieve shadows attributes etc. but I don't get it.
| |
lazzhar
12-20-2003, 10:25 PM
If you render each object in separate layers and each layer in multi passes you could do that easly in Photoshop or whatever you're using.
I find it's a "casse-tête" in Maya ;)
brunner
12-20-2003, 10:55 PM
Do two renders: one with the object A fully transparent, then only the object A (opaque, of course), and composite it in photosop.
If you want to do it in a single pass, then make sure you have "shadows obey light linking" in render globals. Then duplicate the light. Link one of the lights to A and B, and link the other light to B and C.
Of course now B is lit by two lights - but you could possibly compensate for that in B's shader
or
you could also duplicate B, so you now have light1, light2, A, B1, B2 and C.
So the set up would be:
Link light1 to A and B1. Turn off primary visibility of B2 and link light2 to B2 and C.
Firas
02-18-2004, 05:47 AM
its stupide that maya cannt do that in one pass..
does anyone find a solution :hmm:
Randolph illustration image explane it..
lazzhar
02-18-2004, 09:28 AM
Hi Firas
I bet trying to render this in one pass would take time and pain more than doing it in two passes. And dont forget that tweaking in post is faster and easier though.
Or I'd use 3 lights:
1 light for the global lighting that doesnt cast shadows.
2 lights that only cast shadows and dont illuminate at all, then link the first to A and B, and the second to B and C.
The 3 lights should be in the same position and direction of course.
For the lights that dont cast shadows, just using a very low intensity and a negative shadow color( like -1000) would do the trick.
Hope this helps.
alexx
02-18-2004, 09:36 AM
you need 4 lights and some light linking to get that:
light1:
- cast shadow, only linked to the cubes
light2:
- only linked to the floor
light3:
- cast shadow. only linked to the second cube and the floor
light4:
- no shadow, intensity -1 and linked to second cube and floor.
all lights are duplicated and have the same position
cheers
alexx
lazzhar
02-18-2004, 09:52 AM
Hi Alex,
Your trick should work, but the floor will be lit by light2+light3+light4 and we're getting its surface over exposed.
How did you do to reduce the illumination in your example?
alexx
02-18-2004, 10:37 AM
that trick does work ;)
the floor is only lit by light 2
light 3 and 4 have a combined intensity of 0
(3 has int=1 and 4 has int=-1)
like that only the shadow is left over.. they dont really "light" anything
cheers
alexx
lazzhar
02-18-2004, 11:09 AM
Oops, I missed to read that light4 has a negative intensity :shrug:
Yes it's the trick to lights that only cast shadows.
I hope oneday we could find this feature in the light attributes instead of this extra work.
Thanks.
lazzhar
02-18-2004, 08:11 PM
Here is the maya scene if someone wants try my idea.
Firas
02-19-2004, 06:27 AM
thankx for help..
but my problem isnt as simple as 2 objects and a floor.
i'll try to find if mental ray can solve it
btw this is the scene am working on:
CGTalk Moderation
01-17-2006, 12:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.