Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 SPARK2 Any solution for black smoke ?

Go down 
3 posters
AuthorMessage
Charlie




Messages : 81
Date d'inscription : 2011-01-28
Age : 42

SPARK2 Any solution for black smoke ? Empty
PostSubject: SPARK2 Any solution for black smoke ?   SPARK2 Any solution for black smoke ? Icon_minitimeSun 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
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

SPARK2 Any solution for black smoke ? Empty
PostSubject: Re: SPARK2 Any solution for black smoke ?   SPARK2 Any solution for black smoke ? Icon_minitimeSun 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)
Back to top Go down
http://spark.developpez.com
Charlie




Messages : 81
Date d'inscription : 2011-01-28
Age : 42

SPARK2 Any solution for black smoke ? Empty
PostSubject: Hi   SPARK2 Any solution for black smoke ? Icon_minitimeSun 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
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

SPARK2 Any solution for black smoke ? Empty
PostSubject: Re: SPARK2 Any solution for black smoke ?   SPARK2 Any solution for black smoke ? Icon_minitimeSun Nov 27, 2011 7:03 am

Ok so there seems to be a bug in the DirectX renderers
Back to top Go down
http://spark.developpez.com
Charlie




Messages : 81
Date d'inscription : 2011-01-28
Age : 42

SPARK2 Any solution for black smoke ? Empty
PostSubject: DX   SPARK2 Any solution for black smoke ? Icon_minitimeSun 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...
Back to top Go down
stardeath
Committer



Messages : 140
Date d'inscription : 2009-08-24

SPARK2 Any solution for black smoke ? Empty
PostSubject: Re: SPARK2 Any solution for black smoke ?   SPARK2 Any solution for black smoke ? Icon_minitimeSun Nov 27, 2011 5:38 pm

i will look at dx renderer to correct it.
Back to top Go down
Charlie




Messages : 81
Date d'inscription : 2011-01-28
Age : 42

SPARK2 Any solution for black smoke ? Empty
PostSubject: test   SPARK2 Any solution for black smoke ? Icon_minitimeMon Nov 28, 2011 8:17 am

Hi here are some demos of the subtractive blending mode... Looks really cool !

videos :

https://www.youtube.com/watch?v=GMlKCCb7i-w
https://www.youtube.com/watch?v=LA6P5jUSFTU

binaries :

http://pinkcatgames.ucoz.com/spark_files/SPARK_Demos.rar
Back to top Go down
Juff
Developer



Messages : 539
Date d'inscription : 2009-07-14
Age : 41

SPARK2 Any solution for black smoke ? Empty
PostSubject: Re: SPARK2 Any solution for black smoke ?   SPARK2 Any solution for black smoke ? Icon_minitimeWed 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
Back to top Go down
http://spark.developpez.com
Charlie




Messages : 81
Date d'inscription : 2011-01-28
Age : 42

SPARK2 Any solution for black smoke ? Empty
PostSubject: Hi !   SPARK2 Any solution for black smoke ? Icon_minitimeThu 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_Crw

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

Back to top Go down
Sponsored content





SPARK2 Any solution for black smoke ? Empty
PostSubject: Re: SPARK2 Any solution for black smoke ?   SPARK2 Any solution for black smoke ? Icon_minitime

Back to top Go down
 
SPARK2 Any solution for black smoke ?
Back to top 
Page 1 of 1
 Similar topics
-
» SPARK2 Ideas... What you think ?
» SPARK2 libpugixml errors
» SPARK2 Release .lib files
» SPARK2 Build errors
» SPARK2 and Irrlicht trouble

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: