Jump to content


Photo

Problem with alpha..


  • Please log in to reply
6 replies to this topic

#1 RevenantGhost

RevenantGhost

    GMC Member

  • GMC Member
  • 106 posts
  • Version:GM8

Posted 07 May 2012 - 06:50 AM

hey i got a weird problem, i have a floor under my terrain with an alpha of 0.2 to make water, but evrything i put under it is not visible from the top and same happens when you try to see something over it when you're under.. But it happens only with certain models, the terrain is perfectly visible under it..

SCREENSHOT:
Posted Image

d3d_set_hidden is to true, i tried to set it to false but the entire terrain messed up, it was just a nonsense mix of stuff...

Sorry for my english, is not my first language D:
  • 0

#2 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Member
  • 15784 posts
  • Version:GM:Studio

Posted 07 May 2012 - 07:17 AM

make sure the floor draws last (using depth) so it knows there are weeds to show through it.
  • 0

#3 RevenantGhost

RevenantGhost

    GMC Member

  • GMC Member
  • 106 posts
  • Version:GM8

Posted 07 May 2012 - 10:13 AM

make sure the floor draws last (using depth) so it knows there are weeds to show through it.

evrything has the depth of 0, so it should be -1,-2,-3,etc..?
EDIT: tried with -1 and 1, both cases nothing changed...

Edited by RevenantGhost, 07 May 2012 - 10:17 AM.

  • 0

#4 brac37

brac37

    GMC Member

  • GMC Member
  • 807 posts
  • Version:GM7

Posted 07 May 2012 - 08:21 PM

Draw water with lowest depth, e.g. -1000. Do not use d3d_set_depth for that, but set the depth in the object dialog.
  • 0

#5 RevenantGhost

RevenantGhost

    GMC Member

  • GMC Member
  • 106 posts
  • Version:GM8

Posted 08 May 2012 - 03:42 AM

Draw water with lowest depth, e.g. -1000. Do not use d3d_set_depth for that, but set the depth in the object dialog.

the water and the terrain are drawn from the same object, so i do depth=??; draw_terrain(); depth=??; d3d_draw_floor(blablabla); isn't this way the same of making another object with his own depth? Anyway evrything has the depth of 0 so even -1 would work but sadly im trying and nothing changes even with -1000 :(
  • 0

#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Member
  • 15784 posts
  • Version:GM:Studio

Posted 08 May 2012 - 03:52 AM


Draw water with lowest depth, e.g. -1000. Do not use d3d_set_depth for that, but set the depth in the object dialog.

the water and the terrain are drawn from the same object, so i do depth=??; draw_terrain(); depth=??; d3d_draw_floor(blablabla); isn't this way the same of making another object with his own depth?


No, so move it to it's own Water object. Each element has to draw in proper order from furthest to nearest when you have things that are alphaed. if the only thing that has alpha<1 is the water, you can get away with having only that element draw last.

depth defines when GM draws the object, so changing the depth value in code while the element has already been sorted and is currently being drawn has no effect.

Anyway evrything has the depth of 0 so even -1 would work but sadly im trying and nothing changes even with -1000 :(


then -1 should work, so show us the code.
  • 0

#7 RevenantGhost

RevenantGhost

    GMC Member

  • GMC Member
  • 106 posts
  • Version:GM8

Posted 08 May 2012 - 04:33 AM

YAY! it works!
Posted Image

Thank you icuurd and brac! <3
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users