Jump to content

Recommended Posts

Posted

I think perhaps we should have some more blend modes.

Doing a fire without additative alpha blendmodes like

SRC: GL_SRC_ALPHA
DST: GL_ONE

Isn't possible now I think to achive particle effects like this :

 

RnXuP.png

  • Upvote 2

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted

I've tried hacking around this using gl functions

 

    glEnable (GL_BLEND);
    glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

 

But I couldn't make it work, seem like material->SetBlendMode(Blend::Alpha); is the only one it will react to for alpha blending.

 

They can look ok using alphablending if you use :

 

SetSortMode(true);
SetDepthTestMode(false);

 

But then again they will render on top of everything, so smoke beind a wall or something wouldn't work.

 

Particles seem almost useless in their current state with limited alpha blending (if I didn't miss something completely?)

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

  • 2 weeks later...
Posted

i agree can i upvote this suggestion...well i just did :P

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

  • 4 weeks later...
  • 2 weeks later...
Posted

I don't understand what is being asked here. There are modes for alpha blending and additive blending.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

blendmode=1
depthtest=1
depthmask=0
zsort=1

 

does the trick for alpha, but how to set for additiative blending?

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted

Here is the mat file I'm using. This still produces the issue.

 

//Leadwerks Material File

 

blendmode=1

castshadows=0

zsort=1

cullbackfaces=1

depthtest=1

depthmastk=0

diffuse=1.00000000,1.00000000,1.00000000,1.00000000

specular=1.00000000,1.00000000,1.00000000,0.000000000

lightingmode=1

 

shader="shaders\particles\default.shader"

texture0=".\default.tex"

Posted

yeah it's the new property don't you know! I'll correct when I get home and test. Why don't I see a property in the material editor for this?

Posted

Why don't you just make your particle image the way you want it and use the additive blend?

My job is to make tools you love, with the features you want, and performance you can't live without.

  • 2 weeks later...
Posted

Why don't you just make your particle image the way you want it and use the additive blend?

 

Ah, don't use alpha for additive.

 

got it... works.

 

le3padd.jpg

  • Upvote 2

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Posted
Just use some picture having alpha channel ?
Ah, don't use alpha for additive.

As I understand shad's phrase, you can't have transparency in your images for it to work. smile.png

 

ZBrush 4R7 64-bit - 3DCoat 4.5 BETA 12 - Fl Studio 12 64Bit - LE 3.2 Indie version - Truespace 7 - Blender 2.71 - iClone 5.51 Pro - iClone 3DXChange 5.51 pipeline - Kontakt 5 - Bryce 7 - UU3D Pro - Substance Designer/Painter - Shadermap 3 - PaintShop Photo Pro X7 - Hexagon - Audacity - Gimp 2.8 - Vue 2015 - Reaktor 5 - Guitar Rig 5 - Bitmap2Material 3

Posted

For additive blended particles

  • fires,
  • explotions

Use a non alpha particle, black fades the particle:

 

padditive.png

 

Use mat file containing this (3=Light):

blendmode=3
depthtest=1
depthmask=0
zsort=1

 

 

 

 

For alpha blended particles

  • smoke,
  • clouds

use non additive blend just pure alpha to fade the particle (deafult particle is like this)

 

palpha.png

 

Use mat file containing this (1=alpha):

blendmode=1
depthtest=1
depthmask=0
zsort=1

  • Upvote 5

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...