Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - somnambulism_

Pages: [1]
1
General / Re: thor::ParticleSystem not supporting multiple affectors.
« on: June 13, 2014, 12:30:09 am »
I think writing my own affectors is definitely an upcoming step, especially considering I'm using artemis to add flexibility, I don't want affectors stepping on each others' toes. I'll check out how the provided ones are implemented and see what I can do from there.

Nexus, thanks for the help. Generally, I really like looking at Thor's source as I'm not incredibly familiar with a lot  of C++11's features.

2
General / Re: thor::ParticleSystem not supporting multiple affectors.
« on: June 12, 2014, 11:56:52 pm »
Exactly as you said, swapping the order fixed the issue, though I'm not sure what exactly the reason is.  Does the colorAnimation overwrite the alpha value set by the fadeAnimation?

3
General / thor::ParticleSystem not supporting multiple affectors.
« on: June 12, 2014, 11:32:52 pm »
I'm working a project that uses SFML, Thor and Artemis, and I've been working Thor's particle system into my design over the last few hours, but I've come up against some unexpected behaviour.

The Thor Particles Tutorial states that In every frame, the particle system invokes each of the attached affectors and lets it modify the particles. However, when I create a simple example with a ColorAnimation affector as well as a FadeAnimation affector, the fading is ignored and only the colour is adjusted.

thor::ParticleSystem system;

emitter.setEmissionRate(1);
emitter.setParticleLifetime(thor::Distributions::uniform(sf::seconds(0.9), sf::seconds(1.1)));
system.addEmitter(emitter);

thor::FadeAnimation fader(0.5, 0,5);
system.addAffector(thor::AnimationAffector(fader));

thor::ColorGradient gradient;
gradient[0.0] = sf::Color::Red;
gradient[1.0] = sf::Color::Blue;
thor::ColorAnimation colorer(gradient);
system.addAffector(thor::AnimationAffector(colorer));

 

Each frame, I call update on the system, and pass it to my sf::RenderWindow to be drawn. I've successfully tested fade and colour individually, they just don't seem to work in conjunction with eachother. Is this a known bug, or am I forgetting to do something / doing something incorrectly?

Pages: [1]
anything