Giter Club home page Giter Club logo

Comments (22)

tr7zw avatar tr7zw commented on May 23, 2024 2

so a 128x128x128 bounding box. If you are diagonally up or down to it the culling mod has to calculate and then ray trace potentially up to 49.152+ positions * 1-8 points every 10ms. Yea I can see where the issue is 😅

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

The culling doesn't happen in the main thread, so even if it's at 790ms that doesn't affect the fps and just makes stuff slower to react to when it's visible/hidden. So it should be the exact same fps drop without the mod. Also try to update the mod, this is an older version with performance issues.

Note: particles are completly ignored/untouched. So changing settings there has 0 effect to this mod.

from entityculling.

stels9fox avatar stels9fox commented on May 23, 2024

tr7zw in my case, the problem is in this mod, since without it the staff of explosions from mahou tsukai works fine. In the sense that the drawdown due to heavy animation goes up to 10 fps and not a slideshow 1 frame every few seconds.
Perhaps there is a conflict of mods, since Mahoujin Projector works fine although it creates roughly the same animation. but when using an explosive staff, minecraft lags as shown in the picture. Even if the staff creates not particles but entities, the problem in any case is that the EntityCulling mod creates too many requests, which most likely kills the FPS.

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

Like I said the issue is that the EntityCulling mod physically can't cause fps drops since it is not linked to the render thread. If you can link me to a modpack(best-case on curse) where I can recreate this, then I can take a look into what the hell is happening. Alternatively, you could try to create timings over all threads using Spark https://www.curseforge.com/minecraft/mc-mods/spark /spark profiler --thread * over the lag and then send that.

from entityculling.

stels9fox avatar stels9fox commented on May 23, 2024

The modpack I'm using is TNP Limitless 3 - v1.9.8b
Perhaps the problem is not EntityCulling but multiple mod conflict or forge errors.
Upd: I will try to use the spark, not the fact that I will do everything right.

from entityculling.

stels9fox avatar stels9fox commented on May 23, 2024

Spark Attempts Report.
I created a separate superflat world and using the command
/ spark profiler --thread
used the mystical staff of explosive mana and after not the scroll of the spell rho ajax
after used
/ spark profiler --stop
and got it
https://spark.lucko.me/3zEJgEcoo2
An interesting point in the direction of the gaze does not affect the lags, the very fact of the animation from mahou tsukai is important
01
02

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

I think you missed the * in the commend, the report is empty. Also like I said update the mod, you have some older version. I'm currently trying to recreate it.

from entityculling.

stels9fox avatar stels9fox commented on May 23, 2024

Hm, shard of laputa from botany works fine if you use it once, but if you press on one place several times, then some symptoms appear
image

Reworked spark report
Now I will try to repeat with a newer version of the mod
https://spark.lucko.me/Gur7vSxhme

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

Ok I am able to reproduce it and it seems to stop when toggling off the culling. The issue seems to be the Memory getting flooded with crap, so it's constantly cleaning it(which takes ages with your 14gb allocated ram). Now going to test it with the correct version of the culling.

from entityculling.

stels9fox avatar stels9fox commented on May 23, 2024

https://spark.lucko.me/DfdVfTLkKF
Submitted on the latest version of the mod.
If I correctly understand the mechanics of the mod, then it creates something like a filter that either allows rendering of an entity or prohibits it, and animations from mahou tsukai create just a host of thousands of small entities, which leads to lags. In theory, this is a problem with the productivity of iron and will always manifest itself with a certain number of entities. Which, in principle, is solved either by a more advanced filter algorithm or by a direct limitation on the number of operations.

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

Hm using a profiler it seems that using the item somehow causes a crapton of vectors/arrays to be created. This might take a moment to figure out what exactly is happening.

from entityculling.

stels9fox avatar stels9fox commented on May 23, 2024

https://www.youtube.com/watch?time_continue=46&v=Bd-ww-BDQMA&feature=emb_logo
If you look at how the animations work in this video, you can see that this is not one object that is rotated, but a set of simple vectors for vector graphics. This can be seen especially clearly at 1.00-1.05 where an explosive staff is used.
So maybe the problem is not in EntityCulling, but in how it creates its own animations of mahou tsukai.
But even if so, the problem with a large number of objects for this mod has not gone anywhere, just very few mods create so many objects that are processed by EntityCulling so that problems begin immediately, but for very developed bases where dozens of automatic setups can work, this can make this mod meaningless since winning in FPS for the freshly generated world does not make sense if, with the development of the base, the FPS will gradually fall until that hell begins that one staff of explosions can cause.
Note:In general, you can simply add the entire mahou tsukai mod to ignore and not try to solve the issue fundamentally. Or remove any vectors as an exception, since this means something from the mods that is supplied by the player and does not need processing.
Upd question: You can get an answer about what kind of strategy will be taken to deal with this situation. I can be active on the network for another 1 hour, and after that I will have to go to bed.

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

I'll check this more tomorrow. My guess is that the visual box of the animation is really giant or so. I'll have to see.

from entityculling.

stepsword avatar stepsword commented on May 23, 2024

My guess is that the visual box of the animation is really giant or so. I'll have to see.

Yes that is the case. Maybe a blacklist config to ignore certain entities/mods would be useful? I tend to have huge visual hitboxes on my entities as they're often things which should be visible from many many blocks away, and also from behind the player, which often doesn't happen if the hitboxes are normal sized.

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

Currently, BlockEntities can be whitelisted. I guess I'll add a whitelist for entities too, but also add a hard limit that hitboxes larger than x are not worth trying to cull. Also noteworthy: https://cdn.discordapp.com/attachments/811998801304617037/825500486169395210/nD2oyypsyH.mp4 here you can see in the debug info when the animation spawns there are temporary entities that get rendered, but after that while it is charging all entities are culled, yet the animation is still there. So maybe the incredibly large hitbox that doesn't seem to be needed for the animation can be removed in general?

from entityculling.

stepsword avatar stepsword commented on May 23, 2024

Yes, I can do that for some of my entities - I've moved some to RenderWorldLast since in general it functioned better than rendering them normally, so for some at least I can probably make that change without it affecting the render. :)

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

I'll put out a new version later today that will also fix it by ignoring the giant hitbox. Might I ask how big they are? From a gut feel I'd have placed the limit at 50 in width, height or depth, for now, so anything that is larger than that just doesn't get checked.

from entityculling.

stepsword avatar stepsword commented on May 23, 2024

public static final AxisAlignedBB bb = new AxisAlignedBB(-64, Double.NEGATIVE_INFINITY, -64, 64, Double.POSITIVE_INFINITY, 64);

This is the bounding box I usually use, lol

from entityculling.

jklw10 avatar jklw10 commented on May 23, 2024

well... yes. that could pose a problem. seeing as bounding box size affects the ammount of raytrace points directly.

from entityculling.

jklw10 avatar jklw10 commented on May 23, 2024

yeah that's 100*50k*3*4 bytes every second -> 60MB/s of memory alloc at worst?

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

I did the rough math and I think it can be up to 3.7gb/s of allocations. That is bad 😅

from entityculling.

tr7zw avatar tr7zw commented on May 23, 2024

I did add the limiter(and set it to 50 by default), but I also redid some parts of the internal logic to not allocate any arrays/vectors anymore. Then set the limit for testing to 500 made it still lag-free. So I guess the issue was just the fact that it accidentally allocated 2 cubic arrays that were fine for 3x3x3 hitboxes(just one slot wasted), but really caught fire with the 128x128x128 hitboxes 😅.

from entityculling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.