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 / Help with shadows

Author
Message
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 31st Aug 2014 23:04 Edited at: 31st Aug 2014 23:41
Hi , I have a problem with shadows:

My game runs in a .x format ground. Up this ground there\'s a 3D .x format grass. Can you tell me how to apply even a static shadow in my character that is up this ground ? He runs.

Thanks for your patience .
Example:
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 1st Sep 2014 03:01
DBPro native shadows use LIGHT 0 in conjunction with SET SHADOW SHADING ON. Have you tried this already?

666GO†O666
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 1st Sep 2014 03:13
Yes!
i've done already but it's not working DBpro crash!
chafari
Valued Member
19
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Sep 2014 11:32
Hi there.
As Derek Darky said, you could use shadow shading commands to get this effect, but if it crash in your PC, maybe your graphic card doesn't support it . We could use an old trick that came in old Darkbasic Clasic in "Room " Demo, that consists in duplicate your character and make it flat and colour it to black . Attached complete example .



Cheers.

I'm not a grumpy grandpa

Attachments

Login to view attachments
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 1st Sep 2014 23:02
thank you very much chafari!
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 1st Sep 2014 23:55
But i need that the character's shadow must

be seen even in the grass

( ground and shadow are two different objects )
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 2nd Sep 2014 00:38
I sow something about shaddes you

can use a second camera positioned is a this

seeing is recorded into an image and is projected to be seen from

the first camera using shadow to the objects you want to apply it.
Attila
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 2nd Sep 2014 21:26 Edited at: 2nd Sep 2014 21:27
look at:

[link]http://forum.thegamecreators.com/?m=forum_view&t=211183&b=10[/link]

There are examples and code to copy...

a.e.

Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 2nd Sep 2014 23:51
thank you attila!
wattywatts
15
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 3rd Sep 2014 01:32
Quote: "look at:

[link]http://forum.thegamecreators.com/?m=forum_view&t=211183&b=10[/link]"

I believe that's the same technique Chafari posted above you.

@Benigno yes, you will probably want to use a shader. You can find some great ones here: http://www.evolved-software.com/shaders/shadowing
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 3rd Sep 2014 02:39
WattyWatts!

thanks maybe 'what i need
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 6th Sep 2014 11:30 Edited at: 6th Sep 2014 11:55
Thans to all for your help!



wattywatts
15
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 6th Sep 2014 22:44
Which method did you end up using?
Benigno Filippo
11
Years of Service
User Offline
Joined: 13th Feb 2014
Location: Italy
Posted: 6th Sep 2014 23:04 Edited at: 6th Sep 2014 23:26
i used the 'SimpleShadow.fx' applying to the soil and the grass shadow

using additional camera that fits everything that needs to be projected

sorry for my bad english.

the following list:




z#=object position z(1) 1=pos.character
make object 65001,10:yrotate object 65001,180:rem object 65001=light pos.



object 2,3,4 terrain





click for download fx..

Attachments

Login to view attachments

Login to post a reply

Server time is: 2025-05-14 16:23:32
Your offset time is: 2025-05-14 16:23:32