Posted March 14, 20169 yr Hello, I've been working on a mod, that requires huge amounts of particles. The fps seems ok, but at one moment I noticed, that, at a certain point, the spawning of new particles seems to instantly erase the oldest ones. This provokes the question - Is there some sort of hardcoded limit of particles that can exist at any one time? Any help will be much appreciated. Thank you in advance
March 14, 20169 yr That's a lot of particles . Is that per mod? DRAGONMANG: "I'm Dragonmang, m8. Here me roar." HERO: "Oh no... not. Dragonmang." DRAGONMANG: "Roar, m8." HERO: "Ahhh......" And so the brave knight and Dragonmang fought on the mountaintop for many moons....
March 14, 20169 yr Author For 1.7.10/1.8.9 about 4000 if I recall correctly. Thanks for the info! But then that leads to another question - is there any accepted way to increase it, or will that require some tinkering?
March 14, 20169 yr That's a lot of particles . Is that per mod? No. Its global and modified by the game settings. Low Particles reduces the count (though I don't know by how much). Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
March 14, 20169 yr Looking at the code, the maximum number of particles in 1.8.9 is always 4000 per combination of particle layer (0-3) and alpha (opaque or transparent). This is determined in EffectRenderer#addEffect . Changing it would require ASM and may or may not break things. The particles setting is only used by RenderGlobal#spawnEntityFX , but some particles are spawned using EffectRenderer#addEffect directly and won't be affected by the setting. The setting doesn't affect the particle limit, it just reduces the chance for particles to spawn (Decreased) or completely stops particles from spawning (Minimal). Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
March 14, 20169 yr As already said, in 1.7.10 and 1.8.9, maximum is 4000. In 1.9, it is 16,384 (but forge is not there yet). You can bypass this limit only by writing your own particles system (or ASMing the limit, but it is not a good idea). If you're going to write it, 2 things that will help is WorldRenderLastEvent and weather 2 mod, which uses custom particles system. Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
March 14, 20169 yr The particles setting is only used by RenderGlobal#spawnEntityFX , but some particles are spawned using EffectRenderer#addEffect directly and won't be affected by the setting. The setting doesn't affect the particle limit, it just reduces the chance for particles to spawn (Decreased) or completely stops particles from spawning (Minimal). Oooh, alright. I knew that the setting lowered the chance of the particle spawning, but I thought it lowered the cap, too. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.