Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Shadows goes through objects

Author
Message
Fane
13
Years of Service
User Offline
Joined: 9th May 2012
Location:
Posted: 30th Mar 2013 15:57
Hello,
I have a problem that I cant solve. I made a cube and a plane.
I set the cube so that it cast a shadow. Why the shadow goes though the plane?

I add a picture to show the problem. I apologize for my bad english.

Attachments

Login to view attachments
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Mar 2013 22:01
I'm guessing it's because the shadow is being applied to the texture channel of the object. Because the object is infinitely thin, you'll see the texture of the shadow on both sides.

The quick fix would be to use a box instead of a plain, and then scale the box to be very thin.

TheComet

Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 31st Mar 2013 02:37
Indeed, the plain there is a series of pixels taken from the shadowed texture projected by the camera; regardless of which side you look at the plain it will have to use one texture for both sides which means a shadow on both sides.

Fane
13
Years of Service
User Offline
Joined: 9th May 2012
Location:
Posted: 31st Mar 2013 18:20
Okay I solve the problem by using another cube and scale it.
Thanks for this helpful answers.

Login to post a reply

Server time is: 2025-05-17 12:46:11
Your offset time is: 2025-05-17 12:46:11