Skip to main content
gamedev.net
🔒 Locked

Really Simple Shadows

Started by psyjax Aug 31, 2006 at 10:28 PM 4 replies 1.4k views
Original Post
psyjax
psyjax
Hey Folks, I know shadows get brought up alot, but I don't wanna do realistic shadows, or anything real fancy. I wan't to simply have a dark circle at the characters feat that deform acording to the geometry they are walking on. Take this screenshot of Zelda 64, and note the area I circled: Image Hosted by ImageShack.us That's basically all the shadows for the game. But as the sun moves around, or as characters move about on various surfaces, the shadow deforms acordingly. I have tried to simulate this on my own project. Note a screenshot from my game:  I acomplish it thrugh alpha blending and it works fairly well, only thing is, it works well on flat surfaces and with very careful tweaking of draw-orders. Things higher than shadows, for example, are rendered after the shadows are rendered. This causes unwanted effects should, say, a character cross a bridge above another character, the shadows aren't guaranteed to show correctly. Further, if the character climbs a hill, or a stairwell, the shadow remains horizontal, it doesn't deform to the hillside. I don't like this at all. Anyway, I'm damn sure the zelda programmers, and other folks who have done this, are using some sort of stencil buffer effect. Most stencil shadow tutorials concentrate on complex shadow rendering, I simply want a dark spot. Can anyone point me in the right direction?
paulshady
paulshady
The game looks pretty sweet man......I like the look of it. I was trying to do this a while ago, I'm pretty sure you use some type of texture-projection or maybe it's called "decalling" - maybe that isnt much help and from the looks of your game you probably already know as much as i know, but maybe its a point in the right direction!

Good luck!
paulshady
paulshady
I guess heres what I'm trying to say since youre using OGL:

http://www.codesampler.com/usersrc/usersrc_6.htm#oglu_projtexture
psyjax
psyjax
Quote:
Original post by paulshady
The game looks pretty sweet man......I like the look of it. I was trying to do this a while ago, I'm pretty sure you use some type of texture-projection or maybe it's called "decalling" - maybe that isnt much help and from the looks of your game you probably already know as much as i know, but maybe its a point in the right direction!

Good luck!


Hey thanks :)

It was project of the day about a weak ago if you wanna see some more recent screens.

Man... making games is a hard ;) 7 months of blood, sweat, and tears. I figure about 7 months left to go.

I'll def. look into that article.
psyjax
psyjax
Texture projection looks like it just may be the key, If anyone else wants to chime in with any tutorials, samples, or other suggestions of perhapse simpler techniques, please do.

I am a one man show, and I really wanna finish this damn game and get on with my life ;)
Digitalfragment
Digitalfragment
Projection is pretty much it, if you want it to stick to the geometry well. Its also good because you can tilt the axis of projection and do what it does in zelda as time changes (stretch the circle out etc)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.