Jump to content
The Dark Mod Forums

Custom fog particles


SeriousToni

Recommended Posts

Hello, I tried to create a custom cloud effect, this looks fine in the DR Particle editor (can be coloured using the RGB and fades out slowly).

However ingame the smoke is always grey coloured and pops up and instead fading to 0 it pops out again which makes the fog feel not very foggy animore.

I've set my shader blend to blend. The editor looks like this:

image.thumb.png.c7dab8d505312ab51bbcb03f12327fb9.png

This is my shader setup

// PARTICLES

textures/darkmod/sfx/thunderpuff
{
	qer_editorimage textures/darkmod/sfx/thunderpuff
	noShadows
	translucent
	{
		blend blend
		map textures/darkmod/sfx/thunderpuff
	}
}

I can get around the colouring issue by changing the DDS texture - however a slow fade in and fade out would be crucial to make it work. Anybody got an idea why my smoke puffs pop in and out instead of slowly fading?

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

18 minutes ago, Dragofer said:

Youll need to adjust the fade in and fade out fractions.

Yeah I tried and it looks really fine in the particle editor itself (preview window on the right). However whatever I setup as fade in / out fraction seems to be ignored entirely when ingame. Just like the RGBA settings. And I can't tell why. Shouldn't be the result in the DR particle editor the same as ingame?

EDIT: Hm must be some kind of shader problem - since when I use dustfog instead of my own shader spriteit properly gives those colour values and also the fading. Damn - I don't like the standard fog sprite...

Edited by SeriousToni

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

29 minutes ago, SeriousToni said:

Yeah I tried and it looks really fine in the particle editor itself (preview window on the right). However whatever I setup as fade in / out fraction seems to be ignored entirely when ingame. Just like the RGBA settings. And I can't tell why. Shouldn't be the result in the DR particle editor the same as ingame?

EDIT: Hm must be some kind of shader problem - since when I use dustfog instead of my own shader spriteit properly gives those colour values and also the fading. Damn - I don't like the standard fog sprite...

Fade is controlled by vertex color. You might be able to get it working better by adding the rgb keyword to the material.

Also, perhaps the "textures/darkmod/sfx/thunderpuff" texture has no alpha channel? If so, you could use the makeAlpha keyword and a grayscale texture to give it alpha.

https://modwiki.dhewm3.org/MakeAlpha_(Image_program_function)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

2 hours ago, nbohr1more said:

Fade is controlled by vertex color. You might be able to get it working better by adding the rgb keyword to the material.

Also, perhaps the "textures/darkmod/sfx/thunderpuff" texture has no alpha channel? If so, you could use the makeAlpha keyword and a grayscale texture to give it alpha.

https://modwiki.dhewm3.org/MakeAlpha_(Image_program_function)

Thanks. Yes it has an alpha channel, I checked twice :)

What do you mean by set the rgb value as vertex?

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

14 minutes ago, SeriousToni said:

Thanks. Yes it has an alpha channel, I checked twice :)

What do you mean by set the rgb value as vertex?

textures/darkmod/sfx/thunderpuff

{

qer_editorimage textures/darkmod/sfx/thunderpuff

noShadows

translucent

{

blend blend

map textures/darkmod/sfx/thunderpuff

rgb 1.0

}

}

 

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Okay both didn't help - I tried the makealpha which altered the look of the sprite but didn't solve the rgb nor the fade in out problem. Also the rgb 1.0 didn't change anything.

If there's some ideas else left I'll be happy to try them - otherwise I just scrap the idea of my custom fog..

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Hmm...

The texture name and path are the same...

See if there is another material that has "textures/darkmod/sfx/thunderpuff" as it's name and see if it has a sort value. If it is set to sort last ( so that it renders over water ) it might be fighting with itself when the particles are dense. That said, new custom materials should generally have a different name to the texture path since the material will use the texture name as a path location (  a sorta sloppy inheritance design meant to supposedly make things easier for compound materials that reference other materials )

I'll look into it tonight if I get a chance.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Hm I'm not completely sure if my setup is correct as you mentioned.

So the material is there only once.
I have a dds texture containing how the sprite should look like as diffuse image plus an alpha map to blend it out. In dds/textures/darkmod/sfx
I also have a tga texture with the same diffuse information and an alpha channel. In textures/darkmod/sfx

To test what is actually used I put the tga in another folder and linked it in the material as a map (translucent). Which made it look like suddenly it uses the ALPHA map as an ingame sprite (not the picture in the rgb channel) which is super strange because the fog suddenly turned into the white zone that masks the diffuse image instead of my fog image.

So I changed my material to use the dds file as a map. This results back into the observed behaviour that my fog texture looks correct, but it neither uses any RGB values from the particle editor, nor any fade in / out timing and plops in and out of the game.

I also tried to use the maskAlpha keyword with no success.

There might be a problem for me to understand what I actually need. I believed I need the DDS as a diffuse texture but also a TGA as a map that "cuts out" the texture. However either it is not like that actually or my setup is wrong. From what I looked at in the standard TDM assets it is also that way that the "texture name and path are the same" - one for DDS (with the folder dds/ in front of it) and one for TGA (starting with the textures/ folder immediately).

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Please don't break your head on this. I've already put so much time into this without pleasing results I'm thinking I'll just give up on this and us ethe standard fog emitter or none at all.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...