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

Title: Idea to improve graphical appearance
Post 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.
Title: Re: Idea to improve graphical appearance
Post by: WMCoolmon on February 02, 2008, 03:40:27 pm
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.
Title: Re: Idea to improve graphical appearance
Post by: Nuke on February 03, 2008, 12:27:27 am
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).
Title: Re: Idea to improve graphical appearance
Post by: taylor on February 04, 2008, 06:12:13 pm
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.
Title: Re: Idea to improve graphical appearance
Post by: Aardwolf on February 06, 2008, 07:10:50 pm
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.
Title: Re: Idea to improve graphical appearance
Post by: Turambar on February 15, 2008, 01:22:03 pm
rather than be wasteful and start my own thread, i thought i'd ask here:

When do we get engine glows back?
Title: Re: Idea to improve graphical appearance
Post by: Zacam on February 18, 2008, 09:25:09 pm
Are you running any shaders packages? I'm going to leap to the conclusion that you're using an XT build.
Title: Re: Idea to improve graphical appearance
Post by: wolf on June 12, 2008, 04:43:20 am
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).