ChosenArchitect / Project-Architect-2

For issue regarding the Project Architect 2 Modpack
10 stars 1 forks source link

Render Bug with Archimorph #263

Open deadspidervenom opened 2 weeks ago

deadspidervenom commented 2 weeks ago

Describe the bug A clear and concise description of what the bug is. -> If too many Archimorph are placed in the world they stop rendering and can effect the render of other things.

To Reproduce Steps to reproduce the behavior:

  1. Build a 13x13x13 big reactor using glass for walls
  2. Rod layout a 5x5 in the middle
  3. fill remaining air with archimorph as coolant (will disappear part way, so i recommend using a builder wand)
  4. Restart world.

Expected behavior A clear and concise description of what you expected to happen. -> No render issues

Screenshots If applicable, add screenshots to help explain your problem. (Use F2 to take a screenshot in-game)

Modpack version -> Latest bas of Java Version -> 7/oct/2024
Modpack Launcher Used -> Prism Ram Allocated -> 14 or 16 gb

Additional context Add any other context about the problem here. ->

IRicTheCoder commented 2 weeks ago

Are you using shaders? Also a screenshot of the render issues would be appreciated

deadspidervenom commented 2 weeks ago

No shaders. I earnestly forgot to get one because it was causing my game to bug out pretty bad so i had to get rid of it asap. Ill try and get one tomorrow.

IRicTheCoder commented 2 weeks ago

I would appreciate that, I will test it out on my end too when I get the chance, I do find it weird it bugs out since it uses normal vanilla rendering so it should not be causing any rendering issues, however, in modded anything is possible really 😅 but it is a strange issue though, whatever causes it might not be related to the block directly though

deadspidervenom commented 2 weeks ago

sorry it took a moment, i kinda forgot. This is a 13x13x13 reactor, the middle has a 5x5x13 rod setup, 1 inlet and outlet, and 1 power tap. The empty space even though it does not look like it is filled with "Archimorph". image After waiting a bit they do eventually appear on a flatworld. However in my survival only the very bottom row of reactor blocks would load in, i had to use waila and vein miner to clear out the blocks and reload to fix it. image

upon reloading the world the render bugs vary, but it usually involves the reactor not fulling loading in for a while if at all. in this case the chunks around it took time to load. This is also on a flatworld so its also being give ideal rendering which i probably why its rendering at all. image

In my survival world i have noticed severe FPS drops when rendering a decent amount of the blocks for the first time either via visually unloading the chunks or loading into the world after leaving. This occurs through the wall simply looking in the direction of my reactors tanks my fps However there is not as many of them as in the above photo.

First photo is the fps drops, this last for a good 10-15 seconds image

This i my normal fps image

This is what i am looking at through the wall image image

on a similar note, i seem to also get random java runtime crashes with it usually occuring when rendering Archimorphs. with out of 3 crashes 1 occured when i was trying to cut and past the above reactors to improve them. The next 2 happened as i was loading my world to get the above screenshot.

This has nothing to do with my normal java usage as other pack have never had issues.

A fatal error has been detected by the Java Runtime Environment:

  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000021e70e98c0f, pid=27184, tid=16620

 JRE version: Java(TM) SE Runtime Environment (17.0.1+12) (build 17.0.1+12-LTS-39)
 Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.1+12-LTS-39, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
 Problematic frame:
 J 59642 c2 org.lwjgl.system.MemoryUtil.memPutShort(JS)V org.lwjgl@3.3.1+7 (10 bytes) @ 0x0000021e70e98c0f [0x0000021e70e98c00+0x000000000000000f]

 No core dump will be written. Minidumps are not enabled by default on client versions of Windows

 An error report file with more information is saved as:
 D:\Games\Prism\pct\minecraft\hs_err_pid27184.log
Compiled method (c2)  377148 59642       4       org.lwjgl.system.MemoryUtil::memPutShort (10 bytes)
 total in heap  [0x0000021e70e98a90,0x0000021e70e98c90] = 512
 relocation     [0x0000021e70e98be8,0x0000021e70e98bf8] = 16
 main code      [0x0000021e70e98c00,0x0000021e70e98c40] = 64
 stub code      [0x0000021e70e98c40,0x0000021e70e98c58] = 24
 oops           [0x0000021e70e98c58,0x0000021e70e98c60] = 8
 scopes data    [0x0000021e70e98c60,0x0000021e70e98c68] = 8
 scopes pcs     [0x0000021e70e98c68,0x0000021e70e98c88] = 32
 dependencies   [0x0000021e70e98c88,0x0000021e70e98c90] = 8
Compiled method (c2)  377148 59642       4       org.lwjgl.system.MemoryUtil::memPutShort (10 bytes)
 total in heap  [0x0000021e70e98a90,0x0000021e70e98c90] = 512
 relocation     [0x0000021e70e98be8,0x0000021e70e98bf8] = 16
 main code      [0x0000021e70e98c00,0x0000021e70e98c40] = 64
 stub code      [0x0000021e70e98c40,0x0000021e70e98c58] = 24
 oops           [0x0000021e70e98c58,0x0000021e70e98c60] = 8
 scopes data    [0x0000021e70e98c60,0x0000021e70e98c68] = 8
 scopes pcs     [0x0000021e70e98c68,0x0000021e70e98c88] = 32
 dependencies   [0x0000021e70e98c88,0x0000021e70e98c90] = 8
Compiled method (c2)  377217 43229       4       org.joml.Vector3i::set (17 bytes)
 total in heap  [0x0000021e701afe90,0x0000021e701b00d0] = 576
 relocation     [0x0000021e701affe8,0x0000021e701afff8] = 16
 main code      [0x0000021e701b0000,0x0000021e701b0080] = 128
 stub code      [0x0000021e701b0080,0x0000021e701b0098] = 24
 oops           [0x0000021e701b0098,0x0000021e701b00a0] = 8
 scopes data    [0x0000021e701b00a0,0x0000021e701b00a8] = 8
 scopes pcs     [0x0000021e701b00a8,0x0000021e701b00c8] = 32
 dependencies   [0x0000021e701b00c8,0x0000021e701b00d0] = 8
Compiled method (c1)  377217 62136       3       net.roguelogix.quartz.internal.gl46.GL46LightEngine::runAllocUpdates (257 bytes)
 total in heap  [0x0000021e6bc5c690,0x0000021e6bc5eb40] = 9392
 relocation     [0x0000021e6bc5c7e8,0x0000021e6bc5ca30] = 584
 main code      [0x0000021e6bc5ca40,0x0000021e6bc5e0c0] = 5760
 stub code      [0x0000021e6bc5e0c0,0x0000021e6bc5e1c8] = 264
 oops           [0x0000021e6bc5e1c8,0x0000021e6bc5e1d8] = 16
 metadata       [0x0000021e6bc5e1d8,0x0000021e6bc5e278] = 160
 scopes data    [0x0000021e6bc5e278,0x0000021e6bc5e5b8] = 832
 scopes pcs     [0x0000021e6bc5e5b8,0x0000021e6bc5ea68] = 1200
 dependencies   [0x0000021e6bc5ea68,0x0000021e6bc5ea80] = 24
 nul chk table  [0x0000021e6bc5ea80,0x0000021e6bc5eb40] = 192
Compiled method (c1)  377271 33280       3       net.roguelogix.quartz.internal.util.PointerWrapper::putShort (19 bytes)
 total in heap  [0x0000021e6960b510,0x0000021e6960b8f8] = 1000
 relocation     [0x0000021e6960b668,0x0000021e6960b6b0] = 72
 main code      [0x0000021e6960b6c0,0x0000021e6960b800] = 320
 stub code      [0x0000021e6960b800,0x0000021e6960b858] = 88
 oops           [0x0000021e6960b858,0x0000021e6960b860] = 8
 metadata       [0x0000021e6960b860,0x0000021e6960b868] = 8
 scopes data    [0x0000021e6960b868,0x0000021e6960b8a0] = 56
 scopes pcs     [0x0000021e6960b8a0,0x0000021e6960b8f0] = 80
 dependencies   [0x0000021e6960b8f0,0x0000021e6960b8f8] = 8

 If you would like to submit a bug report, please visit:
   https://bugreport.java.com/bugreport/crash.jsp
deadspidervenom commented 2 weeks ago

The bit on the FPS drops, i think it is a mix of "Bigger Reactors" rendering the the Archimorph's rendering conflicting. I say that as i just randomly found like 90% of my reactors off and almost completely reset like i just made them. Both the reactor and the turbine or just one of them. Heck the entire thing could be that or it could just be "Bigger Reactors".

Cassunshine commented 1 week ago

This bug is actually pretty simple (the rendering one at least), the Archimorph's model is pretty complex so the chunk rebuild just takes a while.

I went ahead and made an optimized version of the model (attached below) for my own personal use, if one of the devs wants to use it.

Basically all I did was make it so that the blank faces were removed instead of blank, plus used blockbench's tools to set the side culling of each face so that they'll not generate when something is next to them. The block looks exactly the same from the outside, and chunk rebuilds still take longer than usual, but it's significantly faster because the block emits much less geometry.

archimorph.json

(If you wanna use it yourself, either plug it into a resource pack or put it in [modpack_dir]/kubejs/assets/kubejs/models/block