🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Previous Entry
Screen Shots
Next Entry
w00tles?
Comments
May 07, 2006 08:47 AM
I think she's wondering if she's just encountered that umbrella and realized that it doesn't give shade to the chair.
Greatest question of life... move the umbrella, or move the chair?
What's a girl to do.
-IV
Greatest question of life... move the umbrella, or move the chair?
What's a girl to do.
-IV
May 07, 2006 10:22 AM
I don't think the umbrella in that situation should shade the chair.., i think she is wondering is she should take her clothes and take a swim naked :P
May 07, 2006 12:29 PM
EDI, how are you making the shadows? Are they not the original sprite, blended, blackened, rotated and skewed? Why not simply draw each shadow at the same time as its parent object? As in during the same run.
What I mean is, you have sorting done so images are placed based on their y value, creating the illusion of depth. Since this is so, drawing the object and its shadow at the same time should have the tree cast a shadow on ontop of the building.
Sometimes though, situations arise where this is not a viable solution. For example, the situation with the chair. But that case is a case of extreme illusion. If you were to move the chair a bit to the left such that the chair obscured the pole then it would make sense that the umbrella did not cast a shadow.
Nonetheless, one way would be to introduce another variable to the position state. A v for visibility order ? Essentially you would sort and draw by the order of the v variable. But you place the image by their usual x by y values. Thusly that chair would have a lower v value than the umbrella and be drawn before and hence be in the shade of the umbrella but still be in the same place. Also by default the obj.v = obj.y and only changes in special cases such as this.
What I mean is, you have sorting done so images are placed based on their y value, creating the illusion of depth. Since this is so, drawing the object and its shadow at the same time should have the tree cast a shadow on ontop of the building.
Sometimes though, situations arise where this is not a viable solution. For example, the situation with the chair. But that case is a case of extreme illusion. If you were to move the chair a bit to the left such that the chair obscured the pole then it would make sense that the umbrella did not cast a shadow.
Nonetheless, one way would be to introduce another variable to the position state. A v for visibility order ? Essentially you would sort and draw by the order of the v variable. But you place the image by their usual x by y values. Thusly that chair would have a lower v value than the umbrella and be drawn before and hence be in the shade of the umbrella but still be in the same place. Also by default the obj.v = obj.y and only changes in special cases such as this.
May 07, 2006 02:11 PM
Looking good, though I have to agree with the other guys about the shadows.
To me, it just looks like the sun is really, really low...in which case, the shadows should stretch further, I think. I dunno, shadows are hard to get to look right (as I am sure you know)
To me, it just looks like the sun is really, really low...in which case, the shadows should stretch further, I think. I dunno, shadows are hard to get to look right (as I am sure you know)
May 07, 2006 02:14 PM
@ Daerax:
we dont sort, we rely on the Z-Buffer,
also shadows and entities use two different shaders.
to render them 'together' would require a lot of 'needless' shader switching (expensive). plus I doubt it would work given that the shadows are alpha blanded, and it is important to draw alpha blended things last.
but it's good food for thought.
we dont sort, we rely on the Z-Buffer,
also shadows and entities use two different shaders.
to render them 'together' would require a lot of 'needless' shader switching (expensive). plus I doubt it would work given that the shadows are alpha blanded, and it is important to draw alpha blended things last.
but it's good food for thought.
May 07, 2006 02:39 PM
@Daerax: Objects are billboards so they're sorted z-component wise. But even so, I think that having the shadow cast on top of the other objects would look bad (as it wouldn't bend accordingly.) Maybe if the system split the shadow into 2 quads and skewed part of it, but that would be a ton of work. (This is just my opinion, its up to Raymond.)
I myself think it looks incredible as it is. The building do seem to look like they're floating, but meh, its not perfect =D (and I believe that he plans to put pushes or something around the edges.) The water is beautiful when its animated (the static water does look kind of weird.)
I myself think it looks incredible as it is. The building do seem to look like they're floating, but meh, its not perfect =D (and I believe that he plans to put pushes or something around the edges.) The water is beautiful when its animated (the static water does look kind of weird.)
May 07, 2006 02:50 PM
Shadows fixeed! [wink]... is it just me or is there a black pixels blended outline around objects?
May 07, 2006 05:16 PM
EDI: Ok. I have 2 questions though, that is if you dont mind my asking ofcourse. why are there two different shaders, one for the shadow and one for the sprite? I dont understand.
Also the idea will work using the z buffer, why not make the z value of the chair be lower than that of the umbrella?
@programmer16
It does look good when things fall under other things shadows, it looks more natural. I did something like this one but dont have a screen readily avialable.
Also the idea will work using the z buffer, why not make the z value of the chair be lower than that of the umbrella?
@programmer16
It does look good when things fall under other things shadows, it looks more natural. I did something like this one but dont have a screen readily avialable.
May 07, 2006 07:58 PM
the primary different is that the shadow is rendered using a downsample to blur it.
i guess this could be achived with branching but, iiii dunno.
i am still not sure your asumption is correct on the rendering of shadows not being last (due to alpha blending).
if i am correct in certain cases it is liable to lay the shadows down before it lays somthing the shadow would be casting over, down, which would look... bad heh.
for this reason it is important in 3D to always draw alpha objects last, after everything non-alpha has been contributed to the z-buffer.
but somone correct me if I'm wrong.
to give you a better idea of things, the 'ground' lies on the X,Z plane with Y being up, all of what you see, save for terrain is a billboard, angled to camera.
i guess this could be achived with branching but, iiii dunno.
i am still not sure your asumption is correct on the rendering of shadows not being last (due to alpha blending).
if i am correct in certain cases it is liable to lay the shadows down before it lays somthing the shadow would be casting over, down, which would look... bad heh.
for this reason it is important in 3D to always draw alpha objects last, after everything non-alpha has been contributed to the z-buffer.
but somone correct me if I'm wrong.
to give you a better idea of things, the 'ground' lies on the X,Z plane with Y being up, all of what you see, save for terrain is a billboard, angled to camera.
May 07, 2006 08:12 PM
@Daerax: Sorry, I wasn't trying to sound rude. After experimenting a little I have to agree that it doesn't look as bad as I thought it would.
May 07, 2006 08:25 PM
Advertisement
Latest Entries
Whoa, it's dusty in here
2323 views
Porting Static:IT - C++ to HTML5
3602 views
What am I up to?
3158 views
96 Mill is now on Steam!
3414 views
First Youtube Review of 96 MILL
3621 views
First Youtube Review of 96 MILL
3616 views
96 MILL Released!
3319 views
96 Mill Nearing Completion
2932 views
Advertisement
Things were just so chaotic before we were able to modify our physical laws. I only hope the other societies in the universe can appreciate it.