| SPARK2 Any solution for black smoke ? | |
|
|
Author | Message |
---|
Charlie
Messages : 81 Date d'inscription : 2011-01-28 Age : 42
| Subject: SPARK2 Any solution for black smoke ? Sun Nov 27, 2011 4:49 am | |
| Hi ! I want to create a black smoke effect.Tried with multiplicative blending which works but particles won't fade out. Any ideas for : fading out black smoke effect ?
Thanks | |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 41
| Subject: Re: SPARK2 Any solution for black smoke ? Sun Nov 27, 2011 6:30 am | |
| Hi, what do you mean particles wont fade out ? When using alpha blending (multiplicative), particles need to be sorted in z : - Code:
-
myGroup->enableSorting(true) And for sorting to be correct, the camera position must be specified in system space for each systems containing groups that need to be sorted : - Code:
-
mySystem->setCameraPosition(cameraPos) | |
|
| |
Charlie
Messages : 81 Date d'inscription : 2011-01-28 Age : 42
| Subject: Hi Sun Nov 27, 2011 6:56 am | |
| Thanks , but it seems i fixed it : - Code:
-
g_pD3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_REVSUBTRACT); Now i have beautiful black particles which can fade out - Code:
-
Hi, what do you mean particles wont fade out ? Well if i use multiplicative blending the particles just pops when they die (no alpha fade) The color interpolator's alpha component has no effect on them for some reason | |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 41
| Subject: Re: SPARK2 Any solution for black smoke ? Sun Nov 27, 2011 7:03 am | |
| Ok so there seems to be a bug in the DirectX renderers | |
|
| |
Charlie
Messages : 81 Date d'inscription : 2011-01-28 Age : 42
| Subject: DX Sun Nov 27, 2011 7:20 am | |
| Maybe you should add substractive blending as an option to blending modes , Just an idea... anyway this substractive black smoke effect is definitely beautiful.
BTW : Did you received my randomTank modifier source ? i sent to you in PM... | |
|
| |
stardeath Committer
Messages : 140 Date d'inscription : 2009-08-24
| Subject: Re: SPARK2 Any solution for black smoke ? Sun Nov 27, 2011 5:38 pm | |
| i will look at dx renderer to correct it. | |
|
| |
Charlie
Messages : 81 Date d'inscription : 2011-01-28 Age : 42
| Subject: test Mon Nov 28, 2011 8:17 am | |
| | |
|
| |
Juff Developer
Messages : 539 Date d'inscription : 2009-07-14 Age : 41
| Subject: Re: SPARK2 Any solution for black smoke ? Wed Dec 14, 2011 4:19 pm | |
| Nice,
Maybe I ll add it. It can be cool for some specific effects (like dark magic or so) But for a classic smoke, I d stay with normal alpha blending because you may want smokes of different colours...
PS : I know you didnt manage to get alpha blending work and that s strange. I ll make some tests
| |
|
| |
Charlie
Messages : 81 Date d'inscription : 2011-01-28 Age : 42
| Subject: Hi ! Thu Dec 15, 2011 3:40 am | |
| Thanks ! Actually you can use any color you wish ! The color interpolators will work exacly the same way , the only difference is that the pixels are subtracted from the "background" So the particles will be always darker than the background. https://www.youtube.com/watch?v=jExCfmL_CrwIt's very useful when you need very dark smoke (and actually i need it in my game all the time) flamable man-made materials and mostly gasoline smoke (exploded cars) will have black smoke. | |
|
| |
Sponsored content
| Subject: Re: SPARK2 Any solution for black smoke ? | |
| |
|
| |
| SPARK2 Any solution for black smoke ? | |
|