Planetary Annihilation Particle System Guide This is a work in progress file I'll be adding to over the time. There's bits of information on particles I've posted around the forums and I'll try to move most of that into the document in some form. Comments and suggestions are welcome, though it is obviously early and there's still a ton missing. EDIT: Updated link
Would it be helpful for me to enable open comments on that document? It'd open it up to defacement as the controls for comments aren't that great, but it might be useful for the short term.
Well, not sure what I could comment on, but I guess if you feel like no one is going to ruin the doc with inappropriate stuff, go ahead xD
Just an alternate place to ask questions really, or for people to add clarification to my documentation. Probably better to just link back to this thread in the doc for comments / questions.
I wasn't thinking the ways in which you add particle systems to the game would be included with this guide... but no, still no way to add effects to CSG.
This is awesome, and here's my first suggestion/comment. Some of the parameters are still kinda confusing, including useRaidalVelocityDir. I think, if you have time, you should put an example or a way this parameter is used in PA already (this really would only have to be for the more confusing ones, most are very simple.). Like, what would "X" effect do with or without this certain parameter, or what would the lightning bolt in that one thread do with or without something else in it's emitter? (the lightning bolt is pretty simple, just a simple emitter, so i think it would be a good example imo) Awesome doc though
I plan on having a whole section on velocity, as well as offsets, as they're both kind of complex. useArcLengthSpace for example ... not sure how I'm going to explain that one properly as it's a lot of maths that turn cube space into sphere space. I hadn't thought of using specific examples from the game though. That's a good idea.
That explanation is good enough if people know how spherical coordinates work though. I assume you use it to calculate a spherical line segment? So it turns an XYZ line into a radius,angle,angle alias spherical line right? If you explain the differences between the xyz and spherical system I think modders will understand why it is needed to use that function to get the spherical line segments
The specific pseudo math is like this: Calculate standard starting position for particle Get vector from particle system pivot to planet center Calculate distance from the particle to a plane perpendicular to that vector at the planet center Calculate distance to the particle position parallel to that same plane Convert that distance to an angle using the distance in step 3 as the radius (arc length to angle conversion) Set position of particle by placing the particle on the vector from step 2 at the distance from the center of the planet from step 3 and rotate that position by the angle calculated in step 5 around the cross of the vector in step 2 and step 4 at the planet center! ??? Profit!
Some excellent documentation @bgolus . Will come in handy when I'm reediting some effects. A quick question though. Is it already possible to import textures that can be used in the particle system?
No matter how good this guide is, I likely will not be able to do much with particles. Just aren't that good...