Author Topic: Particle Depth Sorting  (Read 18644 times)

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Particle Depth Sorting
« on: September 22, 2013, 01:22:31 pm »
I've been making some animated blood sprites for both teams.
This is my first encounter with the Trem particle system. I quite like it, but some things are eluding me.

For example, this gives me my alpha blended textures as the correct animation, but it bleeds through occluders.
Code: [Select]
      shader sync gfx/blood/greenblood03frame01.tga gfx/blood/greenblood03frame02.tga gfx/blood/greenblood03frame03.tga gfx/blood/greenblood03frame04.tga gfx/blood/greenblood03frame05.tga gfx/blood/greenblood03frame06.tga gfx/blood/greenblood03frame07.tga

Now I don't understand how I'm supposed to define the shaders, do I need to have a .shader file for each image?
Does the .particle refer to a .shader with the same name? Some .particle files refer to certain shaders without a filepath (eg. flame1), how does the engine know what it's supposed to get? Is it hardcoded in the source? The manual doesn't tell me anything about that.

For the depth reads/writes, do I need to do this explicitly in the shader, or is there some flag or limitation I need to know of?

vcxzet

  • Posts: 467
  • Turrets: +21/-13
Re: Particle Depth Sorting
« Reply #1 on: September 22, 2013, 02:09:11 pm »
see
data-1.1.0.pk3/scripts/flame.shader
and
data-1.1.0.pk3/scripts/weapons.particle : "models/weapons/flamer/muzzlePS"

so use shaders instead of using the tgas directly

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: Particle Depth Sorting
« Reply #2 on: September 22, 2013, 10:35:09 pm »
it bleeds through occluders.
Code: [Select]
      shader sync gfx/blood/greenblood03frame01.tga
this is due to a long-standing Quake 3 / Tremulous bug.

vcxzet

  • Posts: 467
  • Turrets: +21/-13
Re: Particle Depth Sorting
« Reply #3 on: September 23, 2013, 05:53:09 am »
Are you suggesting him to build his own client? or Is it just a shameless self plug.
Also, I think, it is a designed behavior that doesn't meet the desired behavior; not a bug.

Quote from: dhc
the proper solution would be to not use any implicit shaders, ie., to define new shaders and link them to images.

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #4 on: September 23, 2013, 01:29:02 pm »
This is weird, maybe I'm missing something. But I can change the shaders on every effect, except these, where the engine just seems oblivious to blendmodes etc -- with exception of requiring the filepath.  :human:

vcxzet

  • Posts: 467
  • Turrets: +21/-13
Re: Particle Depth Sorting
« Reply #5 on: September 23, 2013, 02:23:05 pm »
can you post your .shader and .particle?

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: Particle Depth Sorting
« Reply #6 on: September 23, 2013, 06:46:35 pm »
Are you suggesting him to build his own client? or Is it just a shameless self plug.
neither.
Also, I think, it is a designed behavior that doesn't meet the desired behavior; not a bug.
no sufficiently reasonable coder would deem that behavior designed. (try to name an intended use case, and then think about how that case could be (intentionally) supported much better in general! you will end up showing that the said intended use case was supported retardedly at first.)

vcxzet

  • Posts: 467
  • Turrets: +21/-13
Re: Particle Depth Sorting
« Reply #7 on: September 23, 2013, 06:57:10 pm »
neither.
Then why would you post that link?

sufficiently reasonable coder
you should work at id software

Quote from: dhc
the proper solution would be to not use any implicit shaders, ie., to define new shaders and link them to images.

/dev/humancontroller

  • Posts: 1033
  • Turrets: +1002/-383
Re: Particle Depth Sorting
« Reply #8 on: September 23, 2013, 09:56:21 pm »
why would you post that link?
to get a combination of an enlightened mind and a shameless plug.

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #9 on: September 29, 2013, 07:48:20 pm »
Erh, issue solved, had some stray shader file I forgot of.
I don't suppose there's a way to get more than 20 frames? Playing around with the flamer effects a bit (though it's hard to improve upon).

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #10 on: October 01, 2013, 12:07:00 am »
Going slightly mental, is it possible to display the flame animation as a decal along with using bounceMark?

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #11 on: October 10, 2013, 03:59:31 pm »
[snip]
« Last Edit: October 10, 2013, 04:55:04 pm by PikaNoChu »

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #12 on: October 10, 2013, 07:42:28 pm »
What are the conditions for alpha fading to work?
I'm setting "alpha  0 1.0 0.0" to no effect, do I need to set a certain alphaGen in the shader?

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Re: Particle Depth Sorting
« Reply #13 on: October 11, 2013, 12:56:29 am »
QUADRAPOST! YEAHHHH!  8)
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

your face

  • Community Moderators
  • *
  • Posts: 3843
  • Turrets: +116/-420
Re: Particle Depth Sorting
« Reply #14 on: October 12, 2013, 02:03:29 am »
that has not been done since...the ancient days.
spam spam spam, waste waste waste!

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #15 on: October 17, 2013, 03:31:33 pm »
What's with the cynicism on these boards? I mean, I've seen some stuff on gaming forums, but seriously?
Guess I'll have to look elsewhere.

Anyway, here's the new stuff incase anyone wants to try
http://www.spiney.me/files/tremstuff/pikamedia01.pk3

I'm still stuck because the alpha fading being broken on some stuff for whatever reason.

Pics









Also new flamer, basigas, and some sounds.
Actually, I remember I need to fix the 1st person basi gassing... anyway, for next update.
« Last Edit: October 17, 2013, 03:48:45 pm by PikaNoChu »

RAKninja-Decepticon

  • Posts: 843
  • Turrets: +14/-679
    • Stupid Videos
Re: Particle Depth Sorting
« Reply #16 on: October 17, 2013, 07:13:29 pm »
What's with the cynicism on these boards? I mean, I've seen some stuff on gaming forums, but seriously?


we feed off of hate.

anyway.... what exactly is different from default in your images?  jetpack and tube particles are the only things that really jump out at me.
Note 4: The best, although not always easiest, way to deal with trolls is thus: do not respond at ALL in the thread.
Main Rules
4.) No spamming or advertising (includes useless multi-posts and bumps.)
6b.) Do NOT harass other members.
  6c.) Do NOT troll!

your face

  • Community Moderators
  • *
  • Posts: 3843
  • Turrets: +116/-420
Re: Particle Depth Sorting
« Reply #17 on: October 19, 2013, 12:06:04 am »
oh snap that looks boss. i like the new smoke effects
spam spam spam, waste waste waste!

vcxzet

  • Posts: 467
  • Turrets: +21/-13
Re: Particle Depth Sorting
« Reply #18 on: October 20, 2013, 08:03:29 pm »
what is the license?

PikaNoChu

  • Posts: 17
  • Turrets: +0/-0
Re: Particle Depth Sorting
« Reply #19 on: October 21, 2013, 03:45:36 pm »

ULTRA Random ViruS

  • Posts: 924
  • Turrets: +4/-101
    • ZdrytchX's reference website
Re: Particle Depth Sorting
« Reply #20 on: October 27, 2013, 04:25:40 am »
Now that I think about it, when  forked the master a few weeks ago, how come I got an ancient version, it seems that credits is actually up-to-date but mine wasn't?
https://github.com/ZdrytchX/cuboid/blob/master/assets/credits.txt