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 - fallahn

Pages: 1 ... 32 33 [34]
496
SFML projects / Re: Thor 2.0
« on: May 08, 2012, 05:06:04 pm »
I've been thinking about passing RenderStates via the draw method, and I thought maybe it would be better to pass a pointer to a RenderStates object at construction of a particle system (like you currently do with a texture). That way you can set the texture/blendmode/shader once for the whole particle system, and don't have to worry about overriding the texture when drawing. For instance I use BlendAdd for fire particles, BlendMultiply for a smoke particle system and I could also create a system with a glow shader for making lasers and things. Just an idea.

I'm going to try deriving my own affector tonight too... I had an idea for one which scales particles based on their velocity so slower particles look smaller and therefore further away - a kind of fake 'depth' effect.  We'll see how it goes :)

497
SFML projects / Re: Thor 2.0
« on: May 05, 2012, 09:20:43 pm »
OK, I shall have a think about how I might do it. I didn't define any of my own distributions (yet) but I like the concept - it's a great way to quickly and easily add variations to a particle system. It definitely beats any of my personal solutions which would involve things like
#define RANDOM_SPREAD rand() % screenWidth, rand() % screenHeight
(ok not a great example but you see what I mean) which I'd normally come up with - I'm a C programmer really, mainly doing embedded software and I'm using SFML to write *fun* things and learn C++ :)  It's a very elegant solution.

498
SFML projects / Re: Thor 2.0
« on: May 05, 2012, 05:51:00 pm »
I was just wondering - is it possible to tie emitters to particles? For example if I wanted to explode a vehicle could I use a particle system to emit 4 or 5 particles as 'chunks' of the vehicle, then have each of those particles emit their own smoke and flame? Perhaps this is a reason to use GetPosition() on particles? :) I really like the idea of Distributions by the way, I've created some really good looking (if I say so myself ;) ) smoke effects this afternoon

499
SFML projects / Re: Thor 2.0
« on: May 05, 2012, 11:26:14 am »
Hey there!
I downloaded Thor yesterday and have been playing with it for a while, it's a great lib :) One thing that struck me though was that I felt it was a bit inflexible to render particle systems to a RenderWindow only, so I changed
Code: [Select]
ParticleSystem::draw(sf::RenderWindow& renderWindow) to
Code: [Select]
ParticleSystem::draw(sf::RenderTarget& renderTarget, sf::RenderStates& renderStates)This way I can render a particle system to a RenderTexture as well as a RenderWindow, change the BlendMode and use shaders for post FX during off screen rendering. Sorry if I've missed something and there's already a better way to do this, but I've only been using Thor for a few hours. I will definitely being using this lib a lot :D

Pages: 1 ... 32 33 [34]