UDK Soft-Edge Particles (Material nodes included)

preview_player
Показать описание
Materials nodes included at the end of video.

This video demonstrates the difference between regular particles and soft-edge particles in UDK. The material nodes I included are based off the simplest HLSL code for soft edges.

fade = saturate((scene_depth -- particle_depth) * scale);

Рекомендации по теме
Комментарии
Автор

That is indeed the value you should tweak to find the right blending for your particles. I'm glad you're finding it useful.

tom.looman
Автор

I haven't done a comparison of the two techniques. This technique is the simplest implementation of soft-edge, it fetches 2 depth values and does a subtract, multiply and clamp. The result is something must more appealing than depthbias as it creates soft edges near geometry instead of drawing the particles closer to your camera.

Watch my other video /watch?v=6fhaVdk9lGs for an inverted use of the same technique. I brighten the material effect the closer my forcefield is to the geometry.

tom.looman
Автор

Hi, you're probably right. Did not think of using constant at the time, although the difference will be minimal I suspect.

tom.looman
Автор

Nevermind could manage to have them receiving light ! Thanks bro

SergiFX
Автор

I'm not using DepthBiasedAlpha, you can view the shader nodes at the end of the video. 0:30 This technique blends with opaque geometry instead of moving the problem closer to the camera.

tom.looman
Автор

I have not experimented with Lit particles in UDK, your best bet is to post this on the udk forums there is bound to be someone with an answer for you.

tom.looman
Автор

The soft-edge is part of the custom shader code. If this shader feature would be available in BL2 I doubt they have an .ini setting for it (it's not part of UDK by default)

tom.looman
Автор

Also... the constant value IS the falloff... oops : P This is much cheaper than DBA! Many thanks!

Jambax
Автор

Ah interesting... how does it compare in terms of complexity/instruction count to DBA?

Read that article you linked too, very interesting! Particularly like Microsoft's approach.

Jambax
Автор

wouldn t it be a bit cheaper to use a constant clamp rather then a clamp with min 0 and max 1 ?

SergiFX
Автор

Sure you are right i don t think it makes a big difference ..
Can I ask you something about Cascade ?
I m struggling trying to create lit particles, as far as i know i should only activate the lit tick box in the LOD settings of the particle system and set nondirection light in the material .. but still don t get particles tinted by a dominant d/s light that i have in the scene ..
Any ideas ?

SergiFX
Автор

Also for the record, DBA is expensive at about 45-50 instructions or so. Shame really!

Jambax
Автор

I gave your code a try, saved myself about 30-35 instructions on some materials and reduced shader complexity quite a lot in places.

It works very well, the only problem right now for me is, the fade takes place over a large portion of the sprite, and it makes the sprite look 'thinner'. You can see through it a bit too much for my liking.

Uploaded my result with images to my blog, have a look see what you think, I linked back to your video too! gamesbaxter.tumblr.com

Jambax
Автор

Hi, do you know how to enable soft particles in a UDK game through the *.ini files ? I'd like to enable those for Borderlands 2 if at all possible.

OshMMf
Автор

This is just a demonstration of DepthBiasedAlpha am I right? Or have you written a custom shader node?

Jambax
visit shbcf.ru