Author Topic: Soft Particles  (Read 17002 times)

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Let's try this again. This time I'm lucid enough to include a patch. The last soft particles build didn't work so well because the unified shaders kept overriding my soft particle shaders. Hopefully this fixes things.

UPDATED: http://www.mediafire.com/?gcd7nfhb85n1htt

Soft sphere quad rendering has been extended to most effects. The only things left that this shader can be applied to are beam muzzle glows and glow points.

Example screenshots here: http://imgur.com/a/zv3ox

« Last Edit: August 09, 2011, 01:17:24 pm by Swifty »

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
I'm definitely seeing the soft particles now. Looks pretty nice 'cept for all the artifacts I'm getting:

White squares around the borders on some effects and a few (really hard to screencap those) green and yellow circles around a few explosions that just flash by during the first few frames

And when beam piercing start happening...
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Kolgena

  • 211
Omg, those fireball artifacts fit right in with WoD!

I'll be sure to test this when it's more complete (with fireballs support, which may/may not be this weekend)

 

Offline sigtau

  • 29
  • unfortunate technical art assclown
Dunno if this applies to FSO in the way it applied to the game engine I'm accustomed to working with, but when you get white borders around billboards and so forth, it's fixable by clamping the textures to the edge of the billboard (rather than have them use the same repeat mode as the other shaders).

Does that help at all?
Who uses forum signatures anymore?

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature

So far, this has been working out really well. (I'm using the suggested modifications as proposed by Valathil via IRC)

Code: (soft-f.sdr) [Select]
float depthOffset = radius - sqrt(
pow( radius * ( abs(0.5 - gl_TexCoord[0].x) * 2 ), 2 ) +
pow( radius * ( abs(0.5 - gl_TexCoord[0].y) * 2 ), 2 )
);

Sadly, the nVidia Cg Compiler loves being phenomenally stupid and thinks the instance of "2" in the shader are being declared as INT causing stupid warnings about implicit casting.
We know that it's not, obviously, but it would probably be bad for it to assume it's treating it like an INT rather than a float, so I turned the 7 occurrences of "2"  into "2.0" to make it shut up.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

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!
Sadly i found a problem yesterday but couldnt get swifty to respond. This radius based approach is really a great idea no doubt. BUT the geometry batcher in use for particles only saves the radius per particle texture. So what you get is everytime a new particle is drawn you overwrite the radius and use it for all other particles with the same texture. Its almost like a random number generator for the radius ergo you get horribly flickering particles which is kinda sad cause there is no way to fix it without forgetting the geometry batcher alltogether and porting it over to a geometry instancing framework or vertex attributes which i heard he is working on.
« Last Edit: August 06, 2011, 01:55:47 pm by Valathil »
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline Sushi

  • Art Critic
  • 211
Yet another reason why using particles for explosions is a bad idea...

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Yet another reason why using particles for explosions is a bad idea...
Err, what? What Valathil brought up is being fixed right now.

 

Offline Sushi

  • Art Critic
  • 211
Yet another reason why using particles for explosions is a bad idea...
Err, what? What Valathil brought up is being fixed right now.

The fact that we use particles for a lot of explosions (such as missile and flak explosions) has a number of annoying consequences. Ship explosions cast light, for example, but missile explosions do not (no particles cast light). Particles are orientation-less: if you are rolling while viewing them, the explosion rolls with you. I think particles also don't render if they are just barely off the edge of the screen, so they can sort of "pop" into existence in an odd-appearing way.

That said, last time I looked at particles was about a year ago, so perhaps some of those annoyances have already been fixed (or will be soon).  :yes:

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
you have implemented this on thrusters, right?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
The fact that we use particles for a lot of explosions (such as missile and flak explosions) has a number of annoying consequences. Ship explosions cast light, for example, but missile explosions do not (no particles cast light). Particles are orientation-less: if you are rolling while viewing them, the explosion rolls with you. I think particles also don't render if they are just barely off the edge of the screen, so they can sort of "pop" into existence in an odd-appearing way.

That said, last time I looked at particles was about a year ago, so perhaps some of those annoyances have already been fixed (or will be soon).  :yes:

Funny, while looking through the fireballs rendering code right before I read your response, I noticed that explosions and shockwaves were intended to rotate independently of the player's orientation. That has definitely not been happening. A simple one line change seems to have fixed it. But it involves adding the negative value of the Physics_view_bank angle value to the rotation of the bitmap. Which is weird because nebula bitmaps are oriented just fine when adding the positive value of Physics_viewer_bank. They're definitely calculating their orientations differently...

But yes, particles don't have their own orientation or up vector. The geometry batcher that the particle system uses has support for rotated billboards but I don't think anything is using it. We could possibly code in weapon hit explosions to exclusively have orientations while leaving the less noticeable smoke/fire/spark particles to share their up vector with the player.

you have implemented this on thrusters, right?

Not yet but I can do that real quick.

 
Ooh, particle thrusters and Valathil's refraction shader allows for http://www.youtube.com/watch?v=PC4y2T0-skM&feature=player_embedded#at=33

*Edited link for better timing
« Last Edit: August 07, 2011, 11:56:37 am by BlasterNT »

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
You mean the distortion at the start? That would indeed be great.

 
I do mean that.  And all other sorts of haze effects*.  Ahh, the possibilities! 



*haze in vacuum, lol

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
It could be a great addition to atmospheric mods, as well as to normal FS (if you're willing to stomach the lack of realism).

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
REALISM ?

IN MAH FREESPACE ?
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 Jeff Vader

  • The Back of the Hero!
  • 212
  • Bwahaha
23:40 < achillion > EveningTea: ass
23:40 < achillion > wait no
23:40 < achillion > evilbagel: ass
23:40 < EveningTea > ?
23:40 < achillion > 2-letter tab complete failure

14:08 < achillion > there's too much talk of butts and dongs in here
14:08 < achillion > the level of discourse has really plummeted
14:08 < achillion > Let's talk about politics instead
14:08 <@The_E > butts and dongs are part of #hard-light's brand now
14:08 <@The_E > well
14:08 <@The_E > EvilBagel's brand, at least

01:06 < T-Rog > welp
01:07 < T-Rog > I've got to take some very strong antibiotics
01:07 < achillion > penis infection?
01:08 < T-Rog > Chlamydia
01:08 < achillion > O.o
01:09 < achillion > well
01:09 < achillion > I guess that happens
01:09 < T-Rog > at least it's curable
01:09 < achillion > yeah
01:10 < T-Rog > I take it you weren't actually expecting it to be a penis infection
01:10 < achillion > I was not

14:04 < achillion > Sometimes the way to simplify is to just have a habit and not think about it too much
14:05 < achillion > until stuff explodes
14:05 < achillion > then you start thinking about it

22:16 < T-Rog > I don't know how my gf would feel about Jewish conspiracy porn

15:41 <-INFO > EveningTea [[email protected]] has joined #hard-light
15:47 < EvilBagel> butt
15:51 < Achillion> yes
15:53 <-INFO > EveningTea [[email protected]] has quit [Quit: http://www.mibbit.com ajax IRC Client]

18:53 < Achillion> Dicks are fun

21:41 < MatthTheGeek> you can't spell assassin without two asses

20:05 < sigtau> i'm mining titcoins from now on

00:31 < oldlaptop> Drunken antisocial educated freezing hicks with good Internet == Finland stereotype

11:46 <-INFO > Kobrar [[email protected]] has joined #hard-light
11:50 < achtung> Surely you've heard of DVDA
11:50 < achtung> Double Vaginal Double ANal
11:51 < Kobrar> ...
11:51 <-INFO > Kobrar [[email protected]] has left #hard-light []

 

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!
You do know that thrusters exhaust gas as a means to generate thrust dont you. So having thrusters with heat distortion in vacuum is perfectly realistic btw

REALISM ?

IN MAH FREESPACE ?

It's more likely than you think!
« Last Edit: August 07, 2011, 01:10:26 pm by Valathil »
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
Aww come on. It was cooler when it wasn't realistic.
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 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!
You still have perfectly contained cylindrical beams and non newtonian physics dont cry.
┏┓╋┏┓╋╋╋╋╋╋╋╋╋┏┓
┃┃╋┃┃╋╋╋╋╋╋╋╋╋┃┃
┃┃┏┫┃┏┳━━┓┏━━┓┃┗━┳━━┳━━┳━━┓
┃┃┣┫┗┛┫┃━┫┃┏┓┃┃┏┓┃┏┓┃━━┫━━┫
┃┗┫┃┏┓┫┃━┫┃┏┓┃┃┗┛┃┗┛┣━━┣━━┃
┗━┻┻┛┗┻━━┛┗┛┗┛┗━━┻━━┻━━┻━━┛