Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Aardwolf on February 02, 2008, 02:17:06 pm
-
I had an idea. For blended polygons (explosions, shockwaves, etc.), if they intersect something, instead of just doing a standard depth test, could we not somehow make the blended object less opaque the farther behind the next opaque object it is?
This way, you won't have a sharp line where, say, a blast intersects a hull.
I've seen it done in Direct3D, but I imagine it is just as doable in OpenGL (tho it might require GLSL, which wouldn't please me very well, as I can't run that stuff).
(http://www.game-warden.com/masterpokey/DepthBlended.png)
Concept, created in GIMP. The exact blending function would probably take some trial-and-error to get it to look right.
-
I think you could manually work around the GLSL limitation.
- Check for intersections along along all of the lines that make up the particle polygon
- Compute the position of those intersections.
- Cut the particle up based on those intersections.
- Set the 'inside' points to be completely transparent
- Let OpenGL's blending do all the work.
Seems like it'd add a hell of a lot of calculations, but OTOH that's only if particles are close enough to a ship.
-
this gives me an idea for scripting. a function where i can specify a vector in world space, and then it checks if its inside another model, returning a bool (or possible a handle to the ship that its in).
-
This is just the so-called "soft particles" that gets thrown around these days (as a selling point of DX10 mainly, though it's nothing special to D10). This requires SM3.0 support or greater, which means that it's just a high-end shader thing. Eventually we'll be able to support that as well, but we really need a material system first to make it easier and more flexible to actually do such things.
-
Yeah I know, I just had forgotten the name and wasn't sure other people knew it anyway.
Also I figured it might be doable with GLSL, even tho my pathetic Intel graphics card can't run the stuff.
-
rather than be wasteful and start my own thread, i thought i'd ask here:
When do we get engine glows back?
-
Are you running any shaders packages? I'm going to leap to the conclusion that you're using an XT build.
-
There's an interesting article about this: http://www.gamasutra.com/view/feature/3680/a_more_accurate_volumetric_.php (http://www.gamasutra.com/view/feature/3680/a_more_accurate_volumetric_.php).