Ihave a moving, exploding object and the parts always slow down as if affected by drag. I have turned off all drag in the particle panel, and changed the number of particles to force a re-compute but the particles (and hence parts) still suffer significant velocity decay. What could the source of this be?
I can understand rear-facing polygons slowing down (normal velocity component) but I cannot get front-facing polygons to keep moving forward. The original motion of the object is key-framed. I don't have any physics on the object beyond the particle/explode.
I want to create an explosion particle system, but I'm not sure how can I do it. I was thinking create a fire particle system with emitter shape being an Sphere and after that just increasing sphere radius, but I don't know how can I animate it's size. Does anyone tell me how can I do that? Or does anyone have a better idea?
You're not limited to one batch of particles, nor one type of particles, nor just one emitter. The best explosions are a highly complex layering of different particle types with different textures, coming from different emitters at differing rates, with differing rates of decay, spin rates, colour changes and falloff in both transparency and movement speed.
Making a truly great looking explosion is a real art form and will often take a good designer days to do with a GUI and constant real time playback, especially when trying to minimise the use of textures, quads, blends, fillrate and physics.
Here's a video from Unreal Engine, wherein similar concepts and qualities as what's available in Scene Kit are used to teach the terminology. It's not a 1:1 parallel with the Scene Kit particle engine, but it's probably the best combination of visuals and simplistic explanations to help you rapidly understand what is possible and how to do it with particles.
I'm not much of an artist, but I'm trying to make decent particle effects in a 2.5D game. I'm making a replica of Wii Play's "Tanks" and I can't quite get the explosions to look good. I'm not going for the exact style as they had, probably something more realistic, less childish.
My particle engine just draws a 2d texture on the screen, and supports, per particle: starting position, velocity, gravity (or any acceleration), air resistance (drag), color including alpha, starting size, size expansion rate, lifetime, and fade out rate.
In my tank explosions, I'm drawing around 100 particles, and I've been tweaking parameters for days trying to get things looking good. So I'm wondering, what are some tips for getting good results? What's most important, specifically for explosions?
What if you want a single particle system that has additive flame particles turning into sooty lerping particles as they age? You can't change renderstate in the middle of a particle system, that's silly. Who can help us now? Why - it's Premultiplied Alpha Man - thank god you're here!
So you can have particles change from additive to lerp as they get older - all you do is change the alpha value from 0 and the texture colour from a firey red/yellow colour towards an alpha of 1 and a dark sooty colour.
A huge volume of particles isn't necessary. What will help you the most is having each particle blend between a series of textures over time. So, have it start as a small bright ball, expand to a bigger orange flare, then to a light gray smoky patch, which then transitions to a smaller darker fading spot of smoke.
You can check out particle2d link removed, old page is dead and new location is just spam page for what kind of explosion effects you could create with particles. Then, just load them into Corona (see documentation).
When I said globally, I actually meant within the scene (they are declared as local within the game.lua similar to the Getting Started example). I assume I should probably use mainGroup:insert(emitter) instead, due to the fact all my other display elements are in that group.
Once the player touches one - an AnimationPlayer is triggered to among other things start two particle systems, play some animations on two meshes and change energy of an Omni Light. Then the animation triggers a queue_free() call after 12 seconds when the particles are gone.
Im trying to understand this below. Im adjusting to basically shoot a burst of particles when the player enters a collider. It works fine, but its just a burst and obviously the example given in documentation.
Currently when you enter, it shoots 10 particles out at the same time, which is fine, BUT it keeps shooting them every 1f. (Obviously because Burst( has a float _time, and a Short _count)) Thats what leads me to believe it should be a burst, but something else.
Thanks for the response, I tried using it within the code above to no avail. the only thing its doing is making the particle system stop completely and not burst once. I added the code into em.SetBursts().
This tutorial describes how to add your own explosion particles to the game with my Custom Particle Loader mod. The mod is available on GitHub Closer_ex 7D2D mods and NexusMods: A20_Custom_Explosion_Particle_Loader
Before jumping into the water, I assume you have prepare yourself with the knowledge of unity particle system and a Visual Studio installed following SphereII's video. You do not need to know anything about programming if you only need the visual and audio effect working however. I'm no way an expert on unity or C#, so feel free to point out what I'm doing wrong.
Thanks Sphereii and Laydor for correcting me; now that you can have multiple assembly in one mod folder, you can have unity compile attached scripts for you, and write your harmony patches in VS. Just keep in mind that only one IModApi subclass is allowed per mod, usually the init.cs. Thus this step is now obsolete.
First of all, change the assembly name to the mentioned Assembly Definition name in section 1, then you can follow the rest of the property editing. Delete the default Class1.cs, and that init.cs in video is also unnecessary in our case.
Another case is scripts are checking for unity version and performing differently according to the version. The problem is VS doesn't have a unity version defined, so it will always be the last "else" being true.
Special note for those running a dedicated server: some scripts trying to access camera won't throw compile errors, but will floor your server log with NREs. Better test all your particles on the server and delete those scripts and script components (or transforms containing the components) accordingly, or comment out usage of methods accessing camera.
With the latest update, you are now able to patch the loader to parse custom properties and create universal scripts. It's recommended to begin with source code of the other 2 patches in my repo.
There are 3 special script classes working with particles in this game: TemporaryObject, ExplosionDamageArea and AudioPlayer. GameManager set value for some of their fields right after particle initialization.
to help you setup your scripts. You should access these data ONLY in Awake(), and make sure you call Clone() when copying ItemValue, and keep it SEPARATELY instead of inside a MinEventParams, if you are going to FireEvent from that initiator and need it fires exactly with the item that causes the explosion. Check my MedicGrenadeParticleData.cs included with the mod for more details.
ATTENTION: You should disable your logical scripts on client side by setting enabled to false in Awake(), and add an early return in every unity message methods( except Start() , FixedUpdate() and Update() though, they won't be called if a script is disabled). This will assure that only server is processing data, and thus keep all states synced. Also check my MedicGrenadeParticleData.cs for reference.
If you have Explosion.AudioName set and specify no AudioPlayer subclass in CustomScriptTypes, I'll add a default AudioPlayer script for you and set the sound name. AudioDuration is -1 by default which means looping forever (if clip is set to loop) until particle gets destroyed.
If you don't work with scripts or do not know how to destroy the particle object, make sure you have Explosion.Duration set to a proper value so that it gets actually removed from memory. This is because I keep a reference to each initialized particle in order to destroy unfinished ones on exiting game, and if you don't call destroy() on the root object it won't be unreferenced, thus GC won't recycle memory from it. Setting duration will tell my AutoRemover script to destroy them after that interval, and unref it when the script component is destroyed.
The game defines ParticleIndex as int32, but does a Greater Than 0 check on projectiles, as arrows and bolts are also projectiles and they shouldn't trigger an explosion at most times. And then it's cut into int16 on NetPackage setup, thus leaving only 32746 indexes at our disposal, under which circumstances the risk of hash collision is not something that can be safely neglected.
So actually 2 hashmaps is used to retain the safety. First one is a dictionary pairing fullpath with CustomParticleComponents which stores your custom script types, and the second one pairing the hashed index with fullpath. The index is generated checked at loading time to resolve collision, ensuring everyone gets a unique index. It's then written into the DynamicProperty and been parsed by ExplosionData.
3a8082e126