Author Topic: Why is the model of the 3D shockwave the way it is?  (Read 19974 times)

0 Members and 1 Guest are viewing this topic.

Re: Why is the model of the 3D shockwave the way it is?
I feel the Volition original style (2D) closely resembles a spherical shockwave to begin with.  Attempts at 3D-ifying it have merely made it look worse IMO.  This is some footage from some Star Trek Generations video game - skip around in the video.

It shows footage from the film of what the shockwave looks like as it gets closer.   It appears to use some sort of perspective / parallax effect, where the closer you are to the wave itself, the more invisible it is, but as you look out to its edge, it appears as a blue hue - brighter as its further away.  It actually acts exactly like a planetary atmosphere effect.  Another example.

I feel that shaders may allow us to achieve this effect, but exactly how, I have no idea.
« Last Edit: January 02, 2010, 09:16:35 pm by Gregster2k »

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: Why is the model of the 3D shockwave the way it is?
I wonder how that would look having 15 shockwaves like that spewing from Destroyers though.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Why is the model of the 3D shockwave the way it is?
Well, in FreeSpace (i.e. FS1, dunno about fsport) the shockwaves were a lot like that... less 'ripply' than the retail FS2 ones.

 
Re: Why is the model of the 3D shockwave the way it is?
Well, in FreeSpace (i.e. FS1, dunno about fsport) the shockwaves were a lot like that... less 'ripply' than the retail FS2 ones.
That's what I was getting at.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Why is the model of the 3D shockwave the way it is?
Well, I reckon shaders could somehow be employed to do that, yes...

The tricky part would be making the shockwave look like more than just an expanding uber-thin shell... possibly comparing the distance from the closest part of the shockwave to the first thing in the depth buffer, sort of like the idea behind 'soft particles' (which I hear Hery has an idea for, btw)

 

Offline Tomo

  • 28
Re: Why is the model of the 3D shockwave the way it is?
The tricky part would be making the shockwave look like more than just an expanding uber-thin shell...
Not really.

The techniques to implement the shader itself are very simple.
Create the 'sphere' model that is expanded for the shockwave, then in the shader compare the viewing angle to the normal. The closer they are to 90 degrees apart, the brighter the shockwave.
(Obviously tweak the constants in the comparison until it looks right.)

(It even works with non-spherical shockwaves, which is nice)

However, the hard part is letting the code choose which shader file to use, as at the moment there are no per-object-class shaders.
- Everything is rendered using the same set of shaders, (post-processing shaders are 'special')

Changing that is *very difficult* - and it would make the most sense for it to be a proper materials system instead of an ad-hoc extension just for shaders.
(If/when that's done, it should include flags stating what the ship is doing, such as warping in/out/exploding)

 

Offline Liberator

  • Poe's Law In Action
  • 210
Re: Why is the model of the 3D shockwave the way it is?
Once upon a time, a LOOOOONG time ago, GalEmp or someone that's been around as long as he has posted a 3d shockwave that worked semi-decently with no code updates.  It used the default .ani as a texture so you could make it look like whatever.  The actual .pof was something like a 5 or 7 layer sphere, sporting a grand total of around 3-500 triangles.  Looked pretty nice, honestly, I just can't be arsed to find it, prolly don't even have it any more honestly.
So as through a glass, and darkly
The age long strife I see
Where I fought in many guises,
Many names, but always me.

There are only 10 types of people in the world , those that understand binary and those that don't.

 

Offline Thaeris

  • Can take his lumps
  • 211
  • Away in Limbo
Re: Why is the model of the 3D shockwave the way it is?
the original was a 3d sphere, but as of now, it can't be done as a sphere in FS...
the 2d version I made looks also really good, as it always faces the camera :)
the duble layers is because the pof model is "fat" as in has depth and not ccompletly flat, its real simple to fix, can someone please edit that pof and upload the new one for me to test? :)
as for why, I assume because it looks good with the current one? that is also why when the shockwave is facing the player we always get that ugly 2 lines... instead of 1 ugly thin line :P

If you can get me a 3D shockwave, I'll love you forever...  :lol:
"trolls are clearly social rejects and therefore should be isolated from society, or perhaps impaled."

-Nuke



"Look on the bright side, how many release dates have been given for Doomsday, and it still isn't out yet.

It's the Duke Nukem Forever of prophecies..."


"Jesus saves.

Everyone else takes normal damage.
"

-Flipside

"pirating software is a lesser evil than stealing but its still evil. but since i pride myself for being evil, almost anything is fair game."


"i never understood why women get the creeps so ****ing easily. i mean most serial killers act perfectly normal, until they kill you."


-Nuke

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: Why is the model of the 3D shockwave the way it is?
Nighteyes's 2D shockwave is pretty good, it's a great fake sphere.

 

Offline DaBrain

  • Screensniper
  • Moderator
  • 212
    • Shadows of Lylat board
Re: Why is the model of the 3D shockwave the way it is?
There is a second layer to give the shockave some fake (parallax) depth. Also it prevents the effect from beeing invisible from the front.


Now the best way to do a new shockwave would be a simple sphere with a distortion (heat) effect. Along with a falloff (angle) surface shader.

Well... with the post processing, a distortion effect should be already possible. Maybe we won't even have to add a lot of frames to it, so we could put the saved memory of the shockwaves into something else.

Somewhat like this:
http://www.youtube.com/watch?v=CnURdy5ElD8&fmt=18
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Why is the model of the 3D shockwave the way it is?
My idea is basically this:

The shockwave is (geometrically) an expanding sphere. The shockwave 'glow' is drawn AFTER all the opaque stuff has been drawn, so that the z-buffer is already set up. The pixel shader would compare values in the depth buffer to the values it's going to draw; if the 'back' of the sphere is visible (i.e. nothing is in front of it), then it draws it with full brightness; otherwise, it draws it based on what fraction of the shockwave sphere is in front of the stored depth value. The brightest part of the shockwave is the thin outermost shell, but there would still be some thickness to it... this would provide a way to fake a volumetric effect quite nicely.

A final 'overall' texture could also possibly be applied, to make it not perfectly spherical.

One important note: if the viewpoint is inside the sphere of the shockwave, an accordingly modified approach would be necessary.

Oh, and there also could possibly be a distortion effect applied as post-processing for the stuff visible inside it.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Steam
    • Something
Re: Why is the model of the 3D shockwave the way it is?
Wonder how crappy all of this would look to my non-shader self. :p

(Man, I need a new card...)

 

Offline Kolgena

  • 211
Re: Why is the model of the 3D shockwave the way it is?
Sort of related to this, but I think that regardless of what type of shockwave we're using, it'd look cooler if there was a brief point flash (maybe with lens flare, like with missile thrusters) before dimming and expanding into the blue sphere.

Another thing to consider is that the primary 3 reasons a spherical shockwave is better are:
1. Looks good from all angles, unlike disc shockwaves.
2. Looks cooler when they clip into hulls or into each other
3. Looks good at very close distances (or inside the shockwave), unlike 2D shockwaves

That said, I think it's as important, if not more so, to consider how the shockwave looks when it's in your face, as well as when you're inside it. Getting knocked about by giant pixels is not exactly immersive, and neither is having a paper thin shell fly past your screen when you are hit broadside. Once inside the shockwave, it'd also be important to consider that there would be no extra darkening around edges, since there isn't really overlap visible when you are looking from the inside.

I know that's really finicky, but I figure if we want to do a good shockwave, we might as well make it extremely awesome.

 

Offline -Norbert-

  • 211
Re: Why is the model of the 3D shockwave the way it is?
I think it would also be nice, if the shockwave wouldn't be the same "intensity" all the way, but instead grows more transparent the further outwards it spreads.
If I remember correctly neither the original nor the current shockwaves have something like that in their graphical effect, while they do have something like it for the damage (high in the center and constantly weakening towards the edge).

 

Offline Nighteyes

  • 211
Re: Why is the model of the 3D shockwave the way it is?
Darain's suggestion about a heat distorshen effect is excellent, I would really like to see something like that make it in...
the other suggestions about an expanding sphere are good, but I don't think they are possible to make ingame with a good preformance, does the engine even support an expanding model? procedual calculations and falloff meterial are pretty demanding as well...
a heat distorshen effect would be pretty simple to implement right? it will also affect the vision of the player if he is inside the shockwave as half the screen will get blurred...
this is my 2D shockwave, made for ED:

By gbtf67 at 2009-11-24

this is the 3D version, as you can see I need a pof file with no depth as the shockwave dosn't look sharp...:(

By gbtf67 at 2010-01-04

 

Offline Sushi

  • Art Critic
  • 211
Re: Why is the model of the 3D shockwave the way it is?
That 3D one is gorgeous... I agree that all that's killing it is the double-layer thing.

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Re: Why is the model of the 3D shockwave the way it is?
 :eek: ... want... WANT...
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Why is the model of the 3D shockwave the way it is?
Is that for ED?

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Steam
Re: Why is the model of the 3D shockwave the way it is?
I see now why you wanted to change the pof file, BTW that looks really nice, good work.
el hombre vicio...

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: Why is the model of the 3D shockwave the way it is?