Author Topic: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes  (Read 16398 times)

0 Members and 1 Guest are viewing this topic.

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
A split could indeed be beneficial, but I don't think the split off thread should go to modding, as currently, there's no way to create the effect I wanted with SEXPs, contrary to what everyone seems to think (unless fancy transitions when changing ship classes and adding kills to player's scoreboard via SEXPs have been implemented and I haven't heard of it). Debris piece approach also has it's own problems.

As for OT, well, it's so awesome I don't have too many suggestions how to improve it. Kolgena already suggested the only improvement I can think of. Defining the noise texture on a per-ship basis would also be helpful.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
This is a thread for discussion of this badass amazing effect Valathil has created, not how to achieve black hunkage.

(easy enough to add kills to the player scoreboard on demand though)

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
But how do we discuss something everybody agrees on? :) The effect is awesome, the only possible suggestion had already been made on page 1 and seconded a hundred times. It's difficult to discuss something people seem to have consensus on (an amazingly rare occurance, but it happens). I could repost it on the Polish forum for FS though, then you'll get a heated discussion, tons of complaints and flaming in no time (I don't know how Poles do this, so don't ask me about it). :)
BTW, PM me about this scoreboard hack. It sound handy.

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
I know i said we cant replace the ship breaking up thing and all cause of legacy BUT: http://youtu.be/aSxQL-Qb8Y0?t=2m55s

dunno maybe hybrid break the ship in half for some time then blow up the 2 chunks?

DISCUSS!

PERFORMANCE ISSUES ? : -awesomeshipbooms
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
i brought this up already but is there a way you could superimpose a cross section model into the gaping hole during the destruction sequence. im just seeing bits of space behind the explosions where bits of hull should be and it kinda looks odd. maybe render that section of the model to the stencil buffer in solid white with the polys flipped. and then maybe render some stuff (i mean it could just be a noise map, or geometry whatever) in the masked areas (probibly also checking the z buffer to differentiate foreground from background), so it doesnt look like space. maybe alternate a series of cross sections, and have it switched and repositioned with each large eruption, so it looks like the internal structure is getting blown out revealing another layer of destruction.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
I know i said we cant replace the ship breaking up thing and all cause of legacy BUT: http://youtu.be/aSxQL-Qb8Y0?t=2m55s

Heck yes. :yes:

Also, here's what I posted as a comment to your video, for the rest of the forumites to see:

Quote
Now that's neat! Like IC said, though, it is a bit clean for an explosion... hmm... is there anyway for an initial, rapid-travelling shockwave to do the peel effect, with the explosions following along slowly afterwards? The explosion in the Mythbuster's episode with the cement truck comes to mind (http://www.youtube.com/watch?v=Gxm_qpKh7Jw), where the initial blast is near-instant it's so fast, but the billowing cloud of dust expands slowly afterwards.
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline Valathil

  • ...And I would have had a custom title if it wasn't for you meddling kids!
  • 29
  • Custom Title? Wizards need no Custom Title!
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
i brought this up already but is there a way you could superimpose a cross section model into the gaping hole during the destruction sequence. im just seeing bits of space behind the explosions where bits of hull should be and it kinda looks odd. maybe render that section of the model to the stencil buffer in solid white with the polys flipped. and then maybe render some stuff (i mean it could just be a noise map, or geometry whatever) in the masked areas (probibly also checking the z buffer to differentiate foreground from background), so it doesnt look like space. maybe alternate a series of cross sections, and have it switched and repositioned with each large eruption, so it looks like the internal structure is getting blown out revealing another layer of destruction.

we could theoretically turn off culling for the blow up models so you get the reversed polies as well
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Kolgena

  • 211
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
I think the only way to actually get good looking interior sections is to have tightly packed/large debris pieces with girders and superstructure as was suggested on page 2.

Yeah, that's a crapton of remodeling to do for every cap ship.

(Is there any way to make debris invulnerable, or at least with orders of magnitude more HP? It seems a big problem with tightly packed debris is that they bump into each other and blow each other up)

Does the erase effect have to start in the middle and work towards the front and back, or can its axis or orientation be different/randomized/scripted?

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
Is it impossible to generate the effect of interior structure on the fly, as part of the shader somehow?
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
DANGER! DANGER!

This is where we start asking for variations of geomod, right?
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
yus yus

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
To be fair, there were some quite serious discussions going quite far beyond "implement GeoMod somehow", so we may someday reach the point where it stops being just a running joke.
Is it impossible to generate the effect of interior structure on the fly, as part of the shader somehow?
AFAIK, shaders mostly affect textures and lighting, I'm not sure if they can change the actual mesh.

 

Offline sigtau

  • 29
  • unfortunate technical art assclown
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
AFAIK, shaders mostly affect textures and lighting, I'm not sure if they can change the actual mesh.

http://en.wikipedia.org/wiki/Displacement_mapping

Scroll to the bottom.  If HLSL shaders can do displacement mapping, it is therefore possible for mesh modifications to be made via shaders.
Who uses forum signatures anymore?

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
Something like this has been discussed in a recent brainstorm on #scp. And yes, displacement mapping is trivial to implement in a shader.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
So, you're saying SCP could use this technology? That would be really, really interesting. Seems I keep underestimating shaders. :)

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
To be fair, there were some quite serious discussions going quite far beyond "implement GeoMod somehow", so we may someday reach the point where it stops being just a running joke.
Is it impossible to generate the effect of interior structure on the fly, as part of the shader somehow?
AFAIK, shaders mostly affect textures and lighting, I'm not sure if they can change the actual mesh.

there are geometry shaders actually, but they are fairly new, and i dont think the engine is set up for them just yet. we have given geomod some serious thought though, there was a thread in modding about it. the idea was to log your gashes to a data structure containing the dynamically generated gash mesh (this is just a few polies from the model and remapped), the position and normal of impact, what hole model to use, its transform data, etc. you use independent hole models, which could be defined by ship, by species, by weapon, etc.

a gash would contain a small subset of the surface polies that were intersected by the damage radius of a weapon, with a greyscale damage texture and planner uv projections (projected along the impact normal) applied. this would be rendered to the stencil buffer (i thought about using a sprite but it would look crappy). you would render the ship normally, and then you would render to the stencil buffer, and then you would place hole models in the logged impact locations, and using the stencil buffer as a mask, render the holes. the result is a composite of ship and hole models.

the holes would be manifold meshes, so when rendering them you would need some way to clip them, as parts would be sticking out of the model. i figure theres is some fragment shader magic that solves this problem. all i could think of was to use a second z buffer when rendering the holes (as you dont want to overwrite the z values for the hull). toss fragments behind closest hole model fragment (as usual) using the value from the second z buffer, but also toss fragments that are in front of the hull fragments (value from main z buffer). if these two conditions are met, render the fragment to the frame buffer, with regards to the stencil buffer. after ships and their holes are rendered, you somehow need to copy the second z buffer data into the stenciled area, after that you can reallocate the stencil and second z buffer to other uses. i dont know the details well enough to know if this will work, my opengl skills are still in the stone age, everything ive done thus far has been fixed function stuff.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
*watches Nuke's post fly far, far above head*

Erm, yes, that. In any case, my thought regarding having the internal decks melting away was simply to have a cross-section surface that moved along the ship with the melting hull plating and explosions, and have the "texture" of said surface be a dynamically-generated mesh of glowing horizontal (and some vertical) lines.
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
One issue with procedurally generating interior structure is that the actual interior structure of a ship can vary widely. An Orion could be modeled as just a box frame with hull plating and decks stacked atop each other, but the Karuna, for instance, would have large voids, support structures that are completely solid, etc.
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Minecraft
    • Steam
    • Something
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
Yes, but you're talking about a region that's going to be mostly covered up by explosion animations and only visible for a few seconds anyway; I don't think anyone would begrudge structure that might not make sense for the specific class of ship.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Shader Based Dissolve as Enhancement for Capship Explosion Clipplanes
it can be a pre-modeled set specific to whatever ship (or species of ship) happens to be blowing up. not necessarily part of the ship model. i mean this cross section can have girders sticking out, split open decks, etc, and can be textured and glow mapped as if it was melting or whatever. you use a set so you dont get bored looking at the same cross section each time another section of ship blows up. of course they would be visible for a very short period of time and you might not even notice with all the explosion goodness going on.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN