News:

Come Chat with us live! Learn how HERE!

Main Menu

Particle Depth Sorting

Started by PikaNoChu, September 22, 2013, 01:22:31 PM

PikaNoChu

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.
      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

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

Quote from: PikaNoChu on September 22, 2013, 01:22:31 PM
it bleeds through occluders.
      shader sync gfx/blood/greenblood03frame01.tga
this is due to a long-standing Quake 3 / Tremulous bug.

vcxzet

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: dhcthe proper solution would be to not use any implicit shaders, ie., to define new shaders and link them to images.

PikaNoChu

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

can you post your .shader and .particle?

/dev/humancontroller

Quote from: vcxzet 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.
neither.
Quote from: vcxzet on September 23, 2013, 05:53:09 AM
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

Quote from: /dev/humancontroller on September 23, 2013, 06:46:35 PM
neither.
Then why would you post that link?

Quote from: /dev/humancontroller on September 23, 2013, 06:46:35 PM
sufficiently reasonable coder
you should work at id software

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

/dev/humancontroller

Quote from: vcxzet on September 23, 2013, 06:57:10 PM
why would you post that link?
to get a combination of an enlightened mind and a shameless plug.

PikaNoChu

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

Going slightly mental, is it possible to display the flame animation as a decal along with using bounceMark?

PikaNoChu

#11
[snip]

PikaNoChu

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

{NoS}StalKer
Quote<Timbo> posting on the trem forums rarely results in anything good

your face

that has not been done since...the ancient days.
Quote from: dolby on February 19, 2003, 06:44:44 PM
spam spam spam, waste waste waste!

PikaNoChu

#15
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.

RAKninja-Decepticon

Quote from: PikaNoChu 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?


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

oh snap that looks boss. i like the new smoke effects
Quote from: dolby on February 19, 2003, 06:44:44 PM
spam spam spam, waste waste waste!

vcxzet



ULTRA Random ViruS

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