• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# dark regions without using volume shadow

## Recommended Posts

Hi, Suppose that you have a square surface up floor and there is a car passing below it. How to make the car become dark without using volume shadow? Note: I don''t want the shadow from the car on the floor. I only want the car become dark below the square. Thanks for the attention.

##### Share on other sites
Without actually using shadows I''m thinking some sort of detection on your part ala:

if(cCar.isUnder(cObject)){    cCar.darkenColorToFakeShadows();}

You get the idea. If you have collision or occlusion detection written then this should be a breeze to do. Otherwise, you would need to implement probably some sort of occlusion detection.

Alternatively, you can use collision detection. Suppose you have a bounding box representing the area of road UNDER the occluder. If your cCar intersects with that box then you darken it (or the parts of it that are inside the box).

Why not just use shadows on the car and turn them off for the floor and don''t let the car actually cast a shadow at all? Again, it''s extra code, but you gotta do something no?

Just some uneducated guesses,
Webby

##### Share on other sites
project the car using a matrix on a texture and then render it to the plane.

##### Share on other sites
quote:
Original post by mohamed adel
project the car using a matrix on a texture and then render it to the plane.

he wants the car to be dark because its under a bridge or something, and light is above the bridge...

its the same effect as if you are walking downtown in a city, and the sun is behind a building, you are now in "shade", and its darker than not being in "shade" (in front of a light source, instead of being in front of something that is larger than the light source, blocking light)

it has nothing to do with drawing the car's projection anywhere...

[edited by - fireking on November 14, 2003 5:48:37 PM]

##### Share on other sites
sorry,I misunderstod what he meant.

• ### Forum Statistics

• Total Topics
628285
• Total Posts
2981836

• 10
• 10
• 10
• 11
• 17