HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 Soft edges

View previous topic View next topic Go down 
AuthorMessage
Escen



Messages : 9
Date d'inscription : 2009-12-01

PostSubject: Soft edges   Wed Jan 15, 2014 10:16 am

Hello Guys,

Great engine, glad this is still in development.

Small question:
How do I get soft edges in SPARK2? I know I had this working in previous versions.

Thanks.
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: Soft edges   Thu Jan 16, 2014 5:38 am

Good question.
I will invest it this week-end (as I don't have time before that), I'll keep you informed.

_________________
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: Soft edges   Fri Jan 17, 2014 8:02 pm

Just to go faster: can you post the effect where you were able to have soft edges (doesn't matter if the code is designed for SPARK 1.5) ?

_________________
Back to top Go down
View user profile
Escen



Messages : 9
Date d'inscription : 2009-12-01

PostSubject: Re: Soft edges   Sat Jan 18, 2014 5:33 am

Didn't really test it, source coming from two generation PC ago. But this is the part. Not sure if PARAM_ALPHA did the trick.

Code:
SPK::Model* SandDustModel = Model::create(FLAG_ALPHA | FLAG_SIZE | FLAG_ANGLE,
 FLAG_ALPHA | FLAG_SIZE | FLAG_ANGLE,FLAG_SIZE | FLAG_ANGLE);
 SandDustModel->setLifeTime(2.6f,3.2f);
 SandDustModel->setParam(PARAM_ALPHA,0.275f,0.0f);
 SandDustModel->setParam(PARAM_SIZE,0.4f,0.4f,0.7f,0.7f);
 SandDustModel->setParam(PARAM_ANGLE,0.0f,4.0f * PI,0.0f,4.0f * PI);
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: Soft edges   Sat Jan 18, 2014 6:46 am

There are various things that can 'emulate' soft particles:

- particles fading to transparent, and effect placed so that particles are at end of life when they encounter the rest of the scene (possible seeing your model)
- depth write disabled (for that, you should post the whole effect, including the renderer configuration)

In litterature, real soft particles need shaders and 2 passes - shaders were possible but only if you changed SPARK source code. So probably one of the previous tricks did the job.

_________________
Back to top Go down
View user profile
Escen



Messages : 9
Date d'inscription : 2009-12-01

PostSubject: Re: Soft edges   Sat Jan 18, 2014 8:21 am


My depth write is disabled in my renderer.
I'm implement a colorInterpolator with a lower alpha and it's less noticeable now.
It's not perfect so I keep shaders in mind, maybe I can use it for more thinks later.

Thanks for your clarification.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Soft edges   Today at 9:26 am

Back to top Go down
 
Soft edges
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Class 4 Softswitch For Rent
» Callmax Softswitch: CallingCard, CallBack, IP PBX, IVR
» IXC SoftSwitch
» B101 Philly's Soft Rock Station: 7-Day cruise for two on Norwegian Cruise Line *U.S. only* ends 2/12/12
» Is there any way to get a softmodded wii unmodded if you're unfortunate enough to get stuck with one?

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