HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 SPARK2 Any solution for black smoke ?

View previous topic View next topic Go down 
AuthorMessage
Charlie



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

PostSubject: 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
Back to top Go down
View user profile
Juff
Developer


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

PostSubject: 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)
Back to top Go down
View user profile http://spark.developpez.com
Charlie



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

PostSubject: 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
Back to top Go down
View user profile
Juff
Developer


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

PostSubject: 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
Back to top Go down
View user profile http://spark.developpez.com
Charlie



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

PostSubject: 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...
Back to top Go down
View user profile
stardeath
Committer


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

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

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



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

PostSubject: test   Mon Nov 28, 2011 8:17 am

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

videos :

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

binaries :

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


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

PostSubject: 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
Back to top Go down
View user profile http://spark.developpez.com
Charlie



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

PostSubject: 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.

http://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
View user profile
Sponsored content




PostSubject: Re: SPARK2 Any solution for black smoke ?   Today at 10:09 am

Back to top Go down
 
SPARK2 Any solution for black smoke ?
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» How to take the screen shot? when i set a kwargs, it is showing error... when i not set kwargs it is coming black color as background
» My Pokémon Black game won't load on my 3DS!?
» Pokémon Discussion Beyond Pokémon Black and White 2!
» Pokémon Black and White 2 Discussion
» I smell smoke, the house is burning?

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