Jump to content


Photo

3D Alpha Issue


  • Please log in to reply
6 replies to this topic

#1 Rion

Rion

    GMC Member

  • New Member
  • 82 posts

Posted 19 March 2011 - 04:29 PM

I was trying to make simple Ambient Occlusion around the walls. But then I got stuck. Here is the screen:

Posted Image

The shadow that I drawed with expression d3d_draw_floor (the shadow image has alpha) in rectangle num 1. is not correct. I think it should be as it is in rectangle 2. I tried draw lower shadows higher and then alpha was working. I really do not know what the hack is going on.
Here is the image of the shadow:

Posted Image

Thanks for help.
  • 0

#2 orange451

orange451

    GMC Member

  • GMC Member
  • 993 posts
  • Version:GM8

Posted 19 March 2011 - 05:54 PM

I was trying to make simple Ambient Occlusion around the walls. But then I got stuck. Here is the screen:

Posted Image

The shadow that I drawed with expression d3d_draw_floor (the shadow image has alpha) in rectangle num 1. is not correct. I think it should be as it is in rectangle 2. I tried draw lower shadows higher and then alpha was working. I really do not know what the hack is going on.
Here is the image of the shadow:

Posted Image

Thanks for help.


If I am correct, the depth of the shadow needs to be less than the block forcing it to draw first (or the other way around). It's all about depth when it comes to alpha in 3d :P



  • 0

#3 Rion

Rion

    GMC Member

  • New Member
  • 82 posts

Posted 19 March 2011 - 06:06 PM

Yes, that is it! I figured out after few minutes.
But anyway, thanks :)
  • 0

#4 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 19 March 2011 - 07:21 PM

Nice looking 3d platformer by the way. :) Is there a demo yet?
  • 0

#5 Rion

Rion

    GMC Member

  • New Member
  • 82 posts

Posted 19 March 2011 - 07:27 PM

No, not yet. But actually it will be some kind of zombie shooter game ;)
  • 0

#6 Drandula

Drandula

    Mister Pixel

  • GMC Member
  • 269 posts

Posted 19 March 2011 - 07:45 PM

Change objects depths depending on their distance of camera.

But screenshot reminds one of my experiements with light:
http://www.zfgc.com/...5.0;attach=9226

Edited by Drandula, 19 March 2011 - 07:46 PM.

  • 0

#7 Rion

Rion

    GMC Member

  • New Member
  • 82 posts

Posted 19 March 2011 - 10:26 PM

I forgot add screenshot ^_^ . Here it is:

Posted Image
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users