Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Magical Box particles along spline
#5
Ok, finally I have some time for this.

First, I hope with "12 particle systems" you mean 12 Magical Box emitters, not MBParticleSystems. If not, you should change that - a Magical Box emitter is more or less an equivalent to a default ParticleSystem. By having all your effects in a single MBParticleSystem you'll get much performance benefits (mainly by sharing Particle objects, meshes and textures).

About the PositionByCurvySpline: It's more a general all-purpose parameter. That means, some aspects aren't optimized to the max. E.g., if you switch Interpolation from "TFByAge" to a distance based type, performance will suffer (the longer the spline, the slower this will get). Several ways to get around this:

- Use TFByAge if applicable, it's way faster than the other options. If you want particles travel at different speeds, this isn't an option though.
- If you use a distance based interpolation: Lowering a spline's granularity will speed things up.
- Create a custom parameter that does exactly what you want (and not more) in the most performant way.

Switching direction isn't supported yet by the parameter, but I might add it in future versions, sounds quite useful.

So I guess writing a custom parameter is the most useful solution for you. I don't know if you're a coder and how experienced you are, so I can help you by writing a basic custom parameter that does what you want. Also, I'd like to use that opportunity to create a custom parameter tutorial out of this.

In order to do so, I need more information:

1.) Should particles follow the spline exactly (fastest) or should they form a belt/tube around it?
2.) Does particle orientation needs to follow the spline? If you plan to use smoke or dots or similiar, orientation can be ignored by the parameter to speed things up
3.) How should the particle's speed be determined? TFByAge is the fastest, DistanceByAge or DistanceByVelocity is slower. Any other way to calculate speed is working, too. The parameter just somehow needs to know at which position (TF or distance) a particle should be placed at a given time during it's life.
4.) Any other options besides flipping directions?

Jake

PS: Don't be afraid about custom parameters. They're easy to write. They only get complicated if they need to handle as much options at once like the PositionByCurvySpline parameter. But in general custom parameters are a great way to optimize performance and to achieve the very special effect you (and only you) wants!
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: