ed_mack at July 11th, 2004 19:45 — #1
Hi, I just want to know something before I waste my time on a perhaps pointless implimentation:
I currently have a nice little scene, with alpha blended clouds in the sky and some landscape ect.. you know the drill. Anyway, I draw the clouds (with depth-test off due to blending), then the ground. Because of this, when you view the ground from above the clouds (billboarded) the clouds are behind the ground -> not good
To fix this, must I have the engine do its own depth testing to draw the sprites and normal objects in the correct order? Or should I draw the sprites in the correct z depth order with depth-testing on?
Or am I missing another way to solve this?
(Life was nicer when things were more simple )
anubis at July 11th, 2004 20:19 — #2
first of all... depending on the kind of scene you have this is not a problem at all. ask yourself if in your game or whatever you are doing somebody will ever see the ground from the air through the clouds. if that's really happening.... how many clouds are there ? can you sort them in reasonable time ?
*yawn* i'll try to dream of some elegant way i'm too tired to think right now
noor at July 11th, 2004 23:05 — #3
Welcome back Ed Mack! long time no see
jsoftware at July 12th, 2004 12:58 — #4
couldn't you just see when your height is over the height of the cloud then you draw the cloud before the ground?
ed_mack at July 12th, 2004 13:01 — #5
Well, sometimes you will see from above the clouds. However, the same cloud drawing class is used for drawing other specialFX, so it matters then. If I impliment octrees soon, that'll allow me to sort quickly. That's once I get my recently crippled model loading working
Hi nkharrat, I missed this place - I have been lurking from time to time. Now summers upon me, I've been furiously hacking at my little C++ engine project, growing from 639 lines to 2571 in the last few weeks (which is good for me). If only the tri-effect competition had been on now!
Nice to see you all, anubis too I'm now waiting for dave permen to bring along a wonder solution. Love the fast reply function btw.
anubis at July 12th, 2004 13:48 — #6
Love the fast reply function btw.
yeah, what a great invention
Well, sometimes you will see from above the clouds
what is it exactly you are coding ?
ed_mack at July 12th, 2004 17:59 — #7
what is it exactly you are coding ?
Well, right now not much. It's at this point a generic engine, really a testbed for things I want to code up (that is further features for it). The aim is to add features in a non dirty-hacklike manner. It's mainly set outside... here
I'm about to model better tents in 3dMax (I have just added support for multiple textures per model )
Anyway, the 'clouds' are also the flames, the misty effect, the plauge of locusts ect.. This gives a problem I'll soon conjure some sort of particle engine *yawn*.
BTW, just to add to my happy long post, I've got a GeForce 6800 in the mail from Dabs, for the first time I'll not have a crappy gfx card. So, I can soon go vertex and fragment shader mad! I'm soo excited. I had to buy a newer motherboard just to have AGP 8x (don't even say PCX).. it was cheap, and has lots of slots! (Smiles, beamingly)
ed_mack at July 13th, 2004 15:29 — #8
Ok, My use of blending is to get transparent parts on my quads/triangles. When you specify a texture as GL_RGBA, does that cause anything to happen then?
I got my tents sorted
anubis at July 13th, 2004 15:36 — #9
When you specify a texture as GL_RGBA
the "alpha" in alpha blending means something different. it's just the blending parameter, which is why you can specify the pixels alpha value, color or something else (0, 1)
ed_mack at July 13th, 2004 18:58 — #10
Ah, good - thanks for that