Hard Light Productions Forums

Community Projects => The FreeSpace Upgrade Project => Topic started by: Nighteyes on January 02, 2010, 04:04:35 pm

Title: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 02, 2010, 04:04:35 pm
is there a good reason why its not a flat disc shape? right now it has some depth to it, and it creates a duble image of the shockwave animation that is projected on it... dosn't look good with the shockwave I created...
(http://img693.imageshack.us/img693/2963/afsfas.png)
By gbtf67 (http://profile.imageshack.us/user/gbtf67) at 2010-01-02
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Titan on January 02, 2010, 04:33:08 pm
That actually looks kindof cool...
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 02, 2010, 04:36:08 pm
well if I wanted it to look like that I would have made it that way :P but I don't want it like that, it looks from afar like its not sharp, like its a bit fuzzy because of the duplicate rings... :(
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Rodo on January 02, 2010, 06:15:01 pm
is there a good reason why its not a flat disc shape? right now it has some depth to it, and it creates a duble image of the shockwave animation that is projected on it... dosn't look good with the shockwave I created...
(http://img693.imageshack.us/img693/2963/afsfas.png)
By gbtf67 (http://profile.imageshack.us/user/gbtf67) at 2010-01-02

I sence you did a texture for an spherical explotion... you trying to get that?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 02, 2010, 06:30:16 pm
If you can somehow get that to be spherical I'm totally going to use that shockwave.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 02, 2010, 06:34:06 pm
Good question. Why is it doubled?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Rodo on January 02, 2010, 06:40:16 pm
If you can somehow get that to be spherical I'm totally going to use that shockwave.

same here, though.... if it wasn't done so far,then it must be because that's too hard or impossible.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 02, 2010, 06:45:26 pm
Good question. Why is it doubled?
Every 3D shockwave I've seen is double-layered.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 02, 2010, 06:53:28 pm
Because they all use the same .pof. Now, the question is, why?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Zacam on January 02, 2010, 06:56:03 pm
Ask DaBrain or search out posts by him on the 3D Shockwave. Very OLD posts I might ad.

Somewhere around here, I have a non-double surfaced shockwave.pof. I'll see if I can find it.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 02, 2010, 06:57:09 pm
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
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 02, 2010, 07:00:29 pm
I'll also add, the 3d shockwaves are a simple animated texture on a spherical model, we can even save some memory and use a plane for it... the model dosn't expand for all I know, it just generates at the spot at lets the animated texture run its course...
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 02, 2010, 07:02:14 pm
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 :)
Is this your own version or the MediaVPs one?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 02, 2010, 07:08:15 pm
Nighteyes.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 02, 2010, 07:09:49 pm
The 2D shockwave.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 02, 2010, 07:18:13 pm
mine, I made 2 new shockwaves, roughly the same, one is to be used as a 2D shockwave, and one as a 3D, so people can choose what they like the best, IMO a combination of both is the best, as HUGE shockwaves are nicer in 3D as its higher rez, and the 2D ones are nicer for smaller and faster shockwaves...
now, back to topic, can I have a pof model of the shockwave.pof just squeezed on the Y axis so its paper thin? :D
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 02, 2010, 07:19:38 pm
The 2D shockwave.

Dude.

the 2d version I made

 :p

mine, I made 2 new shockwaves, roughly the same, one is to be used as a 2D shockwave, and one as a 3D, so people can choose what they like the best, IMO a combination of both is the best, as HUGE shockwaves are nicer in 3D as its higher rez, and the 2D ones are nicer for smaller and faster shockwaves...
now, back to topic, can I have a pof model of the shockwave.pof just squeezed on the Y axis so its paper thin? :D

Zacam is looking.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 02, 2010, 07:20:46 pm
The 2D shockwave.

Dude.

the 2d version I made

 :p

For all I know he could've made the MediaVP version, hence why I asked if was either that or a personal one.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 02, 2010, 07:21:52 pm
Nope, that was DaBrain's (or at least the 3D one was; can check the credits for the 2D one.)

I am currently trying to dig up old posts to figure out why the .pof is doubled like that.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Aardwolf on January 02, 2010, 08:49:11 pm
So what would an actual spherical shockwave be like? Why can't that be done?

I mean, it might look kind of funny, like it was 1997 again and we were playing Star Fox 64... but if it were done right...
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Gregster2k on January 02, 2010, 09:11:42 pm
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 (http://www.youtube.com/watch?v=AhqeMKf5adA) 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. (http://www.youtube.com/watch?v=bvcwQQ2wHts)

I feel that shaders may allow us to achieve this effect, but exactly how, I have no idea.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 02, 2010, 09:19:42 pm
I wonder how that would look having 15 shockwaves like that spewing from Destroyers though.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Aardwolf on January 02, 2010, 09:20:43 pm
Well, in FreeSpace (i.e. FS1, dunno about fsport) the shockwaves were a lot like that... less 'ripply' than the retail FS2 ones.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Gregster2k on January 02, 2010, 09:23:17 pm
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.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Aardwolf on January 02, 2010, 09:28:15 pm
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)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Tomo on January 03, 2010, 04:06:41 am
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)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Liberator on January 03, 2010, 04:19:09 am
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.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Thaeris on January 03, 2010, 03:05:17 pm
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:
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 03, 2010, 03:11:46 pm
Nighteyes's 2D shockwave is pretty good, it's a great fake sphere.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: DaBrain on January 03, 2010, 05:23:22 pm
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
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Aardwolf on January 03, 2010, 07:08:06 pm
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.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Mongoose on January 03, 2010, 09:47:52 pm
Wonder how crappy all of this would look to my non-shader self. :p

(Man, I need a new card...)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Kolgena on January 03, 2010, 11:44:36 pm
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.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: -Norbert- on January 04, 2010, 04:55:58 am
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).
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 04, 2010, 09:47:37 am
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:
(http://img4.imageshack.us/img4/5513/screen0603.jpg)
By gbtf67 (http://profile.imageshack.us/user/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...:(
(http://img709.imageshack.us/img709/1219/screen0642.png)
By gbtf67 (http://profile.imageshack.us/user/gbtf67) at 2010-01-04
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Sushi on January 04, 2010, 10:35:09 am
That 3D one is gorgeous... I agree that all that's killing it is the double-layer thing.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: MatthTheGeek on January 04, 2010, 10:37:20 am
 :eek: ... want... WANT...
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Dragon on January 04, 2010, 10:54:03 am
Is that for ED?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Rodo on January 04, 2010, 11:54:25 am
I see now why you wanted to change the pof file, BTW that looks really nice, good work.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Snail on January 04, 2010, 11:55:43 am
Is that for ED?
Yarp.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Fury on January 04, 2010, 12:06:22 pm
Gotta say that the 2D looks better.
*disables 3D shockwaves in his launcher*
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Snail on January 04, 2010, 12:07:00 pm
Well to each his own I guess.

*me turns on mv-cell*
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 04, 2010, 12:07:46 pm
You still have an mv-cell?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Snail on January 04, 2010, 12:09:53 pm
You still have an mv-cell?
nah, not really. It was a fun concept though. :)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 04, 2010, 12:56:07 pm
the thing is, I want to use the 2d one for small shockwaves like missiles, especially torpedows, u never want 2 c them as a flat shockwave, while capships should use the 3d one as its much higher rez :)
so.... who is making me the flattened pof file? :D
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Dragon on January 04, 2010, 01:14:38 pm
I have an idea which may help you or not, Nighteyes.
None of shockwave textures have alpha channel (they're all DXT1), so try removing it from your maps.
Also, on advanced version the wave itself is a glow texture, while the main one is the flash you see before wavefront starts to expand.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Aardwolf on January 04, 2010, 02:33:33 pm
I wouldn't be surprised if it were fairly trivial to mimic the old cell-shaded effect using the existing shader system... before Hery came along, even...
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 04, 2010, 02:43:38 pm
I have an idea which may help you or not, Nighteyes.
None of shockwave textures have alpha channel (they're all DXT1), so try removing it from your maps.
Also, on advanced version the wave itself is a glow texture, while the main one is the flash you see before wavefront starts to expand.
there is no alpha on my shockwave textures... it renders correctly its just the pof model that needs adjusting...
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 04, 2010, 06:35:50 pm
pof model fixed by me and converted by FUBAR, now it looks good :) thanks for the help guys!
(http://img163.imageshack.us/img163/5985/screen0647.png)
By gbtf67 (http://profile.imageshack.us/user/gbtf67) at 2010-01-04
(http://img705.imageshack.us/img705/5821/screen0648.png)
By gbtf67 (http://profile.imageshack.us/user/gbtf67) at 2010-01-04
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Thaeris on January 04, 2010, 08:32:48 pm
You still have an mv-cell?
nah, not really. It was a fun concept though. :)

I really wish they'd bring that back. That has to be one of the most interesting visual features I've ever seen for FSO.  :nod:
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: -Norbert- on January 05, 2010, 03:52:59 am
Kinda reminds me of the spell Holy from Final Fantasy. ^^
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Titan on January 05, 2010, 09:37:41 am
You still have an mv-cell?
nah, not really. It was a fun concept though. :)

I really wish they'd bring that back. That has to be one of the most interesting visual features I've ever seen for FSO.  :nod:

What is it?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: The E on January 05, 2010, 09:41:24 am
It was a rudimentary implementation of cell-shading. It was removed from the source quite some time ago (IIRC, 3.6.9 didn't have it). mv_cell was a package of textures optimized for that.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 05, 2010, 05:34:47 pm
In other words to actually give you an idea of how it looks it would look like XIII, Borderlands, Robotech Battlecry, having the exaggerated outlines on shapes and cartoony look.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Thaeris on January 05, 2010, 07:17:51 pm
Enabling that feature for cutscenes could be a lot of fun. TAP might actually benefit from that... I've never played any of the HW games, but I have watched a few of the cutscenes on YouTube.  :nod:
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Hades on January 05, 2010, 09:19:24 pm
Well, the cutscenes are 2D and actually do not look anything like what's in game, none of the textures in both games are even remotely like MV cell.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 08, 2010, 07:59:41 am
Just a thought I had in mind regarding spherical shockwaves... if we can make the game display both types of shockwaves (2D and 3D) at the same time, we will have one shockwave always facing the player and a 3D one that the player can pass through... can look pretty nice and would resolve completly the paper thin shockwave syndrome... what do you guys think?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Herra Tohtori on January 08, 2010, 08:29:57 am
If your shockwave is a planar projection of a spherical shockwave, you should use a planar texture for it.

In other words, if you have rendered the shockwave animation from an actual 3D explosion, you should use the 2D shockwaves to get it in FS2_Open. Those are always seem from normal direction, so they will look best in the game, much better than disk-shaped 3D shockwaves.

Now, if someone actually makes a spherical in-game expanding shockwave model with distortion and maybe some sort of fake fresnel effect/glow, then it would probably look better than the 2D shockwaves.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Fury on January 08, 2010, 08:37:57 am
Agreed, shockwave effects in current mediavps looks much better in 2D than 3D.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 08, 2010, 08:44:37 am
only problem IMO is that the 2D shockwaves are limited to 512x512 textures... that looks jaggey on the really big shockwave explosions... on the other hand the 3D shockwaves are MUCH more crisp, as they use (512x512)x4 textures... now, if we could make the pof of the 3D shockwave to always face the camera, I would be a happy man :)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: chief1983 on January 08, 2010, 10:17:45 am
why not allow a 1024x1024 texture for 2d shockwaves?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Spoon on January 08, 2010, 10:21:11 am
Am I the only one that thinks that 3D shockwaves looks way and waaaay better than 2D ones?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: chief1983 on January 08, 2010, 10:28:35 am
No, or else the mediavps wouldn't have both.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: MatthTheGeek on January 08, 2010, 10:38:22 am
Agreed with Spoon too.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Liberator on January 08, 2010, 12:13:37 pm
Like I said earlier and was promptly ignored, this has been done.

A true spherical explosion looks mahvelus!
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 08, 2010, 12:26:59 pm
I would love to see such a creature. Do you have any idea how we can track it down?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 08, 2010, 01:04:58 pm
why not allow a 1024x1024 texture for 2d shockwaves?

1024x1024 effects arn't possible right now with decent framerates... I tried once and it REALLY killed my framerate... I have a geforce 9600GT so it pretty nice, and if it can't render it good then a lot of users won't be able to use this effect...
on a personal note, I love 3D shockwaves :P I don't like the spherical ones, 2D ones are also really nice when not viewed from up close... thats why I made 2D and 3D, so people can choose what they like the most :P
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Commander Zane on January 08, 2010, 01:20:05 pm
Your 2D shockwave looks spherical though, and I thought it looked pretty good.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: S-99 on January 09, 2010, 04:32:08 am
The star trek explosion idea sounded pretty cool. And the original fs1 shockwaves already resemble that in a 2d way. I'd go for 3d spherical fs1 like shockwave with a flash point and 3d normal shockwaves along with. :yes:

Also, this is just getting plain old annoying. It's too much like dab's 3d shockwaves. It's annoying because shockwaves like this are popping up a little too often. It has no depth, and when multitudes of these shockwaves come flying out of a dying capship in all directions, it just looks like crap where one 3d shockwave would look better instead. This reminds me of two vinyls stacks on top of each other.
(http://img693.imageshack.us/img693/2963/afsfas.png)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 09, 2010, 09:29:12 pm
well if you took the time to read the thread I was trying to fix that stacking problem... I fixed it, it looks really nice to me... I will release it with ED and then you can choose to use it or not, I don't care :P the idea was not to make it a spherical shockwave, just a nice, high rez looking shockwave...
also, right now its not possible to have 3D spherical shockwaves, so we might as well make what we have nicer right?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 09, 2010, 09:42:23 pm
S-99 did not read the thread. Don't mind him.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: quadrophoeniX on January 15, 2010, 05:43:05 pm
Am I the only one that thinks that 3D shockwaves looks way and waaaay better than 2D ones?
No, or else the mediavps wouldn't have both.

Well, I'd rather say we do have both because neither is a perfect approach. You can easily tell that by everytime somebody makes some progress on the flawed shockwave system (and here we talk about a HUGE progress IMHO) everybody is mainly debating 2D versus 3D waves.
I have the feeling everyone has a quite similar concept of how it should[ look (see Gregster2k's & DaBrains linked videos and - not to go uncredited - Nighteyes' work.

I say that one her would be perfect if not for 2 things: one is the orientation of the 3D waves the other one is the excessive use of shockwaves. Me personally thinks multiple shockwaves even on an imploding capital ship destroy the illusion of the brute power. There  just should be one single wave on the final im/explosion and if the players ship passes the horizon it should be accompanied by a "swoosh" - that's it!


now the trivial question: what is actually preventing the engine to selectably force the normal of the wave pointing towards the player or not? Wouldn't that render the 2D wave completely obsolete?

Having said that it's a pity we have to wait for ED coming out to use it!
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Herra Tohtori on January 15, 2010, 06:26:19 pm
now the trivial question: what is actually preventing the engine to selectably force the normal of the wave pointing towards the player or not? Wouldn't that render the 2D wave completely obsolete?

Multiplayer comes to mind first and foremost.

Secondly, that is essentially the exact same thing as a 2D shockwave; a planar projection of a spherical shockwave.

Only difference is that it uses a POF model file as a method of showing the shockwave texture, whereas 2D shockwave texture is rendered as a sprite on the screen, which always faces the viewpoint automatically.


The best solution would be a volumetrically expanding shockwave, which could be achieved by an expanding sphere model with distortion/glow shaders.

Even better, particle-based volumetric shockwave model where stuff in the way of the particles would stop them or reflect them... which would lead to "shadows" in the shockwave, and the surfaces of objects facing the shockwave briefly glowing as the hot gas particles impact it. The lifetime of the particles would define the radius of the shockwave.

The problem with THAT is the sheer amount of particles such a thing would require; it will never work smoothly unless particles become GPU-accelerated in FSOpen.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: quadrophoeniX on January 16, 2010, 12:58:15 pm
Multiplayer comes to mind first and foremost.

Can you explain? Does Multiplayer only work with 2D?

Secondly, that is essentially the exact same thing as a 2D shockwave; a planar projection of a spherical shockwave.
Only difference is that it uses a POF model file as a method of showing the shockwave texture, whereas 2D shockwave texture is rendered as a sprite on the screen, which always faces the viewpoint automatically.

Which was exactly my point: A sphere, no matter what angle looked at from, will be projected as a circle. All references posted on discussion of the skockwaves show exactly this: an expanding circle. Using 3D waves with normal facing the player would look like expanding spheres while variable perspective would satisfy those who like disk-shaped waves (which btw. don't make much sense from a physical approach).
Also (aafik) using a .pof should give much more detailed results and blend better into the worls as sprites.

The best solution would be a volumetrically expanding shockwave, which could be achieved by an expanding sphere model with distortion/glow shaders.

Sorry for lacking the background here, is it possible or not to apply shadres to .pof models?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: The E on January 16, 2010, 01:02:47 pm
Can you explain? Does Multiplayer only work with 2D?

No, the 3d Shockwave works there just as well, but the orientation for the wave is chosen by the server, and is the same (or should be the same) for all players.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Herra Tohtori on January 16, 2010, 01:52:18 pm
Secondly, that is essentially the exact same thing as a 2D shockwave; a planar projection of a spherical shockwave.
Only difference is that it uses a POF model file as a method of showing the shockwave texture, whereas 2D shockwave texture is rendered as a sprite on the screen, which always faces the viewpoint automatically.

Which was exactly my point: A sphere, no matter what angle looked at from, will be projected as a circle. All references posted on discussion of the skockwaves show exactly this: an expanding circle. Using 3D waves with normal facing the player would look like expanding spheres while variable perspective would satisfy those who like disk-shaped waves (which btw. don't make much sense from a physical approach).

Yes.

Quote
Also (aafik) using a .pof should give much more detailed results and blend better into the worls as sprites.

No. The only reason why the "3D" shockwave looks sharper is it's mapping. It is using a quarter map sector tile as opposed to the full map used by the 2D, sprite shockwave. Because of this, the apparent resolution of the 3D shockwave can be the same as 2D shockwave, but with only 1/4 of memory usage (assuming both effects use similarly stored textures).

Or conversely, if the effects are the same resolution, the apparent resolution of the 3D shockwave can be doubled with same memory usage.

However, using a POF does NOT automatically guarantee any such thing as better blending to the world. In fact, quite the opposite is the case. If any hard edges are visible, they will not look natural at all. Even less if anti-aliasing is not used. Sprite is just an arbitrary plane in the space where the effect texture is drawn to; and a plane is technically a 3D object just as much as more complex model where the texture can be projected - like the 3D model.

The difference is, a plane only has two faces (two triangles) while a more complicated 3D model would have way more. And technically, if you use a model of a plane, the result would be the exact same as using an effect sprite. With the exception, of course, that it would probably use more resources than just using the effect as a sprite.


An interesting experiment would be to make a sprite shockwave that consists of four quarters expanding from the centre where their inner corners meet, and using the 3D shockwave's texture for it... By my estimation, the only problem would be to keep the individual quarters NOT facing the player but instead aligned with a common normal vector to form an univorm plane. This is necessary to match the edges of the textures. I'm relatively sure it can be done somehow, yet I would have no idea if the sprite system's drawing angles can be manipulated as such or would it indeed require a simple 3D model of a plane.

Which, as already stated, wouldn't work on multiplayer very well at all.

Personally I so far prefer the 2D shockwaves in MediaVP's as they are the closest high-res approximation of Volition shockwaves we have had yet.

Quote
The best solution would be a volumetrically expanding shockwave, which could be achieved by an expanding sphere model with distortion/glow shaders.

Sorry for lacking the background here, is it possible or not to apply shadres to .pof models?

Well, not as such. Parallax Object Files are used for many things but they don't support a full material system. This trickery should be done on code level or table level. The model should just be one simple primitive sphere mapped with a glow map, and the shaders specified in somewhere like shockwave.tbl would then take care of applying necessary effects to it to make it look like a shockwave. Heat distortion, motion blurring the expanding shockwave, convolution, bloom; these would work well to achieve a three-dimensional expanding shock front look. Particles could be spawned by the expanding sphere as well.

The thing is, I have no idea how to do this. I'm reasonably sure that someone will at some point do this, though.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: quadrophoeniX on January 16, 2010, 03:17:30 pm
Thanks for explaining, E and Herra.

The model should just be one simple primitive sphere mapped with a glow map...

That sounds very interesting indeed....
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: chief1983 on January 16, 2010, 05:22:25 pm
Why does the wave orientation matter in multiplayer?  Someone might unfairly see the wave coming because it's visible from a slightly different angle and react to it differently?  That's really that big of a deal?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: quadrophoeniX on January 16, 2010, 05:30:47 pm
As I understood the idea of having the normal of  a 3D shockwave facing the player would not work in multiplayer since the orientation of the wave is determined by the server - and thus seen differently by all players. If hte normal should allways face the player there would need to be one individual wave per player wich is impossible - or the orientation determined on the player's machine, or a  real spherical wave.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: chief1983 on January 16, 2010, 05:33:36 pm
I don't think a client side generated shockwave is illegal, the server wouldn't necessarily have to pick the normal.  But it's not the same for all players no matter what for 3d shockwaves, and never has been.  2d shockwaves are the same for every player, and always have been, so I'm a little confused now.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: TrashMan on January 17, 2010, 08:08:11 am
Meh.... those "3D" (READ: planar) shockwaves always looked terrible to me.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 17, 2010, 02:46:41 pm
now the trivial question: what is actually preventing the engine to selectably force the normal of the wave pointing towards the player or not? Wouldn't that render the 2D wave completely obsolete?

Having said that it's a pity we have to wait for ED coming out to use it!

I agree, making the shockwave pof always face the player will give us 2 main advantages over the 2D shockwaves...
1. higher rez shockwave with the same texture memory
2. the 2D plane won't turn(move to always face the player) as the player moves his ship, it will act as a 3D object, stationary and with depth... IMO a very nice tuch

why can't the host player in multiplayer be the one the shockwave normal is determined by? others players will view the shockwave from different angles, but when you think about it it won't be any different from what we have now(random shockwaves)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 17, 2010, 02:58:12 pm
2. the 2D plane won't turn(move to always face the player) as the player moves his ship, it will act as a 3D object, stationary and with depth... IMO a very nice tuch

While I'm with you on other points, this doesn't make any sense. Shockwaves are spherical.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 17, 2010, 03:26:33 pm
2. the 2D plane won't turn(move to always face the player) as the player moves his ship, it will act as a 3D object, stationary and with depth... IMO a very nice tuch

While I'm with you on other points, this doesn't make any sense. Shockwaves are spherical.

it does make sence, maybe I wasn't clear... were not discussing on how to make spherical shockwaves, as we all agree its currently not possible, what we are talking about is making the current ones look better, and using a pof model will achive this :)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 17, 2010, 03:27:55 pm
Right, but from a physical standpoint the shockwave should always face the observer.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: chief1983 on January 17, 2010, 05:05:50 pm
I don't think there's any reason the normal of an effect needs to be server controlled, the normal could just as easily be determined by the client side, so every client sees the same flat disc, if that were possible in single player.  I don't know why that would need to be server controlled.  Although, some people like their 3d shockwaves to be visible from different angles.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: quadrophoeniX on January 17, 2010, 06:26:43 pm
2. the 2D plane won't turn(move to always face the player) as the player moves his ship, it will act as a 3D object, stationary and with depth... IMO a very nice tuch

While I'm with you on other points, this doesn't make any sense. Shockwaves are spherical.

I think you actually are with him - somehow at least. He is talking about a circle of which the normal always faces the player - so he always will see the wave a circle which is the best simulation of a real sphere the engine could achieve at the moment. On the multiplayer issue, couldn't it be done to force the forced normal, while in single player people could choose between locked normal and free which would correspond to "3D in 2D manner" and "3D classic"?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: General Battuta on January 17, 2010, 06:33:00 pm
Nope, in that quote there, he specified a circle whose normal didn't always face the player.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 17, 2010, 06:56:49 pm
Nope, in that quote there, he specified a circle whose normal didn't always face the player.

No, with that quote I was refering to the way 2D planes always move with the camera, giving away the illusion of a 2D plane, I do want the shockwave always to face the camera, I just meant that having a pof model will work better then the 2D plane method
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: TrashMan on January 18, 2010, 03:00:39 am
The end effect is the same. It will look the same too.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: quadrophoeniX on January 18, 2010, 11:41:25 am
The end effect is the same. It will look the same too.
comparing the 2D variant on page 2 and the latest 3D version of him I beg to differ....
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: jr2 on January 18, 2010, 12:56:12 pm
the latest 3D version of him I beg to differ....

Screenies anyone?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 18, 2010, 07:39:03 pm
The end effect is the same. It will look the same too.
don't speak if you don't know what you'r talking about please, there is a huge difference, both in the resolution used for the effect and by the way it renders as well... :wtf:
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: TrashMan on January 19, 2010, 04:20:14 am
I mean the overall feel of it. The angled planar and the 2D one have completely different "feels".

a 3D one will look sharper, because of higher-res.
I'm using a 2D one exclusively, but I would switch to a 3D one if it was always facing the player.
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Spoon on January 19, 2010, 04:28:37 am
If the 3d shockwave was always facing the player like the 2d shockwave, it would kinda lose the purpose if you ask me
What makes 3d shockwaves so great is that you can actually 'ride the shockwave'
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: jr2 on January 19, 2010, 09:07:53 am
I mean the overall feel of it. The angled planar and the 2D one have completely different "feels".

a 3D one will look sharper, because of higher-res.
I'm using a 2D one exclusively, but I would switch to a 3D one if it was always facing the player.

Facing? As in the visible plane is perpendicular to your viewpoint? Or parallel to it?
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: DaBrain on January 19, 2010, 04:39:06 pm
Well, lets wait and see what the particle system rework will make possible.

If it has enough options, a spherical shockwave with particles would be awesome. (In combination with a PP distortion effect.)

Somewhat like this:
http://www.youtube.com/watch?v=LKK5gumNap8
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Kolgena on January 19, 2010, 05:09:24 pm
The end effect is the same. It will look the same too.

Are you sure about this? I thought the 2D ones always spawned behind ships, but if the 3D one spawns in the ships, there might be wonky clipping happening as you fly tight circles around the exploding ship.

Also, that Transformers explosion looks awesome, but would definitely rape my video card :)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: DaBrain on January 20, 2010, 03:52:49 pm
Also, that Transformers explosion looks awesome, but would definitely rape my video card :)

It's just particles, moving at the same speed away from the origin into random directions. I doubt a PC that can handle the current FSO version + MediaVPs will have any problems with an effect like that.

I'm pretty sure the new particle code will be way more efficient than the current one... cause that's not very difficult... :D
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: Nighteyes on January 20, 2010, 04:19:39 pm
a simple sphere of paricles won't look good, it will need special shades on them to add refraction/heat distorshen to them and of course a falloff so the ones right infront of you won't show up, only the outer ones will... :)
Title: Re: Why is the model of the 3D shockwave the way it is?
Post by: sigtau on February 06, 2010, 07:57:42 pm
...and then the falloff in multiplayer would have to be determined by the server, of course...