Hard Light Productions Forums

Community Projects => The FreeSpace Upgrade Project => Topic started by: Krelus on May 17, 2009, 04:20:19 pm

Title: "Softer" warp clip?
Post by: Krelus on May 17, 2009, 04:20:19 pm
One thing that kind of bothers me is how when a ship warps in / out, there's a hard edge to it, no transition at all between the ship's hull and the subspace opening. My question is, is there some way to somehow soften that transition with existing graphics elements? A 50% transparent surface just in front of the portal's event horizon, maybe?

(Anyone who mentions Bloom will be smacked.)
Title: Re: "Softer" warp clip?
Post by: Snail on May 17, 2009, 04:23:49 pm
I'm assuming it could be done with particles.
Title: Re: "Softer" warp clip?
Post by: blackhole on May 17, 2009, 05:12:06 pm
BLOOOOOOOM!

A series of nebula-esque transparent planes would soften the clipping problem, yes. If we were really smart, we could code a vertex shader that faded the hull's texture to white in proximety to a given plane.
Title: Re: "Softer" warp clip?
Post by: Nighteyes on May 18, 2009, 04:17:32 am
BLOOOOOOOM!

A series of nebula-esque transparent planes would soften the clipping problem, yes. If we were really smart, we could code a vertex shader that faded the hull's texture to white in proximety to a given plane.

probably easier to code in some screen filters like bloom  :D
Title: Re: "Softer" warp clip?
Post by: Aardwolf on May 18, 2009, 09:53:33 am
Something I'd like--but which probably isn't very easily doable, particularly for a system like mine--would be:

Viewed from the front (i.e. the side the ship comes out or goes in on when in-game):
The parts of the ship passing through the warp mesh look like normal (from the front), but show a subspace background around it (like how it looks in "Mission takes place in subspace" missions), and have the background fade to into the normal warp effect the closer to the edge it is.

From the back
It would look fairly similar to the existing effect.
Title: Re: "Softer" warp clip?
Post by: DaBrain on May 19, 2009, 04:51:31 pm
BLOOOOOOOM!

A series of nebula-esque transparent planes would soften the clipping problem, yes. If we were really smart, we could code a vertex shader that faded the hull's texture to white in proximety to a given plane.

I guess we'd like to stop all particles from intersectin the hulls, so softparticles would be needed anyway. We might as well use them here.
However, the plane sounds pretty cool.

If we had a material system, I'd demand this vertex shader from you now, which would be entirely your fault for suggesting it. :p


Anyway, more particles + bloom, sounds like a decent solution as well.
Title: Re: "Softer" warp clip?
Post by: Krelus on May 19, 2009, 11:03:28 pm
BLOOOOOOOM!

A series of nebula-esque transparent planes would soften the clipping problem, yes. If we were really smart, we could code a vertex shader that faded the hull's texture to white in proximety to a given plane.

I guess we'd like to stop all particles from intersectin the hulls, so softparticles would be needed anyway. We might as well use them here.
However, the plane sounds pretty cool.

If we had a material system, I'd demand this vertex shader from you now, which would be entirely your fault for suggesting it. :p


Anyway, more particles + bloom, sounds like a decent solution as well.

Hell, you could just bloom the event horizon and that'd solve the problem.
Title: Re: "Softer" warp clip?
Post by: Tomo on May 20, 2009, 01:37:59 pm
Something I'd like--but which probably isn't very easily doable, particularly for a system like mine--would be:

Viewed from the front (i.e. the side the ship comes out or goes in on when in-game):
The parts of the ship passing through the warp mesh look like normal (from the front), but show a subspace background around it (like how it looks in "Mission takes place in subspace" missions), and have the background fade to into the normal warp effect the closer to the edge it is.

From the back
It would look fairly similar to the existing effect.
Actually, that is quite easy to do. (Once you know how)

The 'perfect haze' vertex shader I wrote a few years ago does something very similar - haze is different depending on the direction you're looking at it relative to the direction of the light.

So, a question:
Does the shader handling code expose the fact of warp and the vanishing point?

The ship model already exposes the direction of warp, so the two above pieces of data are all that are needed to make warp look similar to described.

The 'easy' way to do it is to switch out the shader for a vessel when it starts to warp out, and give the new shader a constant matrix defining the vanishing point.
The 'smart' way to do it is to set a flag for the shader - as otherwise it's too easy for the two shaders to be different.