Visual glitches for particles
BigBoyJohn97 opened this issue · 32 comments
What happened?
When Oculus is loaded with rubidium, there are some visual glitches that happen whenever you break blocks in survival, and is more noticeable when you are deep underground mining. When breaking a block up close, the particles that should be textured are black. Other particle visual glitches that are happening is seeing torches flames and smoke particles through blocks at both close and long distances. I can confirm this is only happening with Oculus and has nothing to do with rubidium or any other mods. The particle visual glitches also happen even when particles are on decreased and minimal.
Screenshots
Relevant log output
No response
Minecraft Version
1.18.2
Iris Version
oculus-mc1.18.2-1.2.5
Sodium Version
rubidium 0.5.3
Operating System
Windows 10
What is your GPU?
Nvidia GeForce RTX 2060 6G
Java Version
version 8, update 341
Additional context
No response
I've had this issue as well, but I'm not convinced it's Oculus's fault but perhaps Rubidium because it happens with shaders disabled
I think this is potentially the same as #152
I just tested, for some reason Oculus being installed, but not enabled still effects the particles.
I've found this happens when picking up items or experience orbs, breaking blocks just happens to drop items to cause this.
Same problem here on:
Win10
Java 17.0.4.1
Minecraft 1.19.2
Forge 43.1.55
Rubidium 0.6.2
Oculus 1.2.8
It sometimes starting to happen after playing couple of minutes or even on game start.
To temporary fix that, have to off and on game couple times.
Any solution how to fix that or prevent happening?
Sadly, this is still a thing in Oculus mc1.18.2-1.4.3. I found out that cancelling net.minecraft.client.particle.ItemPickupParticle#render fixes the issue, but you remove the item pickup animation when doing that. The issue has been present with Forge for almost a year now (e.g. forums.minecraftforge.net/topic/106698-forge-3905-bug-report-particles-rendering-black-and-through-blocks), but currently it only happens with Oculus being installed (except from the 1.16.5 version). I can't see a connection between Minecraft, Forge and Oculus regarding the issue. I tried my best, but I cannot find a way to fix it without causing other issues. Hopefully, this will help someone else to do so.
Is it possible that you make a bug report on the Github of Forge?
Sadly, this is still a thing in Oculus mc1.18.2-1.4.3.
I found out that cancelling net.minecraft.client.particle.ItemPickupParticle#render fixes the issue, but you remove the item pickup animation when doing that.
The issue has been present with Forge for almost a year now (e.g. https://forums.minecraftforge.net/topic/106698-forge-3905-bug-report-particles-rendering-black-and-through-blocks/), but currently it only happens with Oculus being installed (except from the 1.16.5 version). I can't see a connection between Minecraft, Forge and Oculus regarding the issue. I tried my best, but I cannot find a way to fix it without causing other issues. Hopefully, this will help someone else to do so.
@LaidBackSloth Thanks for answering!
How did you cancel: net.minecraft.client.particle.ItemPickupParticle#render? Do I have to make a fork of Forge and override this method or maybe a create a simple mod? Could you share more details maybe I will event try to fix that.
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Will you make a mod for 1.18.2 version? It must be helpful for players.
@LaidBackSloth Thanks for answering! How did you cancel: net.minecraft.client.particle.ItemPickupParticle#render? Do I have to make a fork of Forge and override this method or maybe a create a simple mod? Could you share more details maybe I will event try to fix that.
I made a separate mod using mixins just for testing purposes, this is the main class: https://gist.github.com/LaidBackSloth/656f4858039e45f63991ac43020bd292
To make clear: This fixes the issue we are talking about, but it completely removes the intended animation when picking up items. That's why this isn't a real fix.
Also, the class isn't changed by forge at all, it is also present in Vanilla Minecraft. That's the main reason, I'm struggling in fixing the issue, it is probably caused by anything else.
I am also not sure whether the issue is caused by Forge and it is only present with Oculus, or it is caused by Oculus itself.
Sadly, this is still a thing in Oculus mc1.18.2-1.4.3. I found out that cancelling net.minecraft.client.particle.ItemPickupParticle#render fixes the issue, but you remove the item pickup animation when doing that. The issue has been present with Forge for almost a year now (e.g. forums.minecraftforge.net/topic/106698-forge-3905-bug-report-particles-rendering-black-and-through-blocks), but currently it only happens with Oculus being installed (except from the 1.16.5 version). I can't see a connection between Minecraft, Forge and Oculus regarding the issue. I tried my best, but I cannot find a way to fix it without causing other issues. Hopefully, this will help someone else to do so.
Is it possible that you make a bug report on the Github of Forge?
I don't want to do that before we know that the issue is caused by Forge. It might be caused by Oculus and just look similar to a previous issue from Forge.
Look at that ticket: MinecraftForge/MinecraftForge#8221
Seems like it was fixed in forge, but maybe oculus or rubidium is reintroducing that issue.
@edit Maybe not for sure related, but when I disable shaders, then when picking up items partices are rendered as black instead.
But then why they are rendering through walls... seems like some render order issue also.
For those who want to disable those particles, I have created a mod:
item-pickup-particle-disable-1.0.0.jar.zip
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Will you make a mod for 1.18.2 version? It must be helpful for players.
Here you are:
item-pickup-particle-disable-1.18.2-1.0.0.jar.zip
thanks you so much!! it's a bandage solution but I'll gladly take it, you have no idea how much this issue ruining minecraft for me.
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Is it possible to get the source code?
Is it possible to get the source code?
He just made my comment into a mod, so this is basically it:
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Is it possible to get the source code?
Sure, here you have it:
ItemPickupParticleDisable 1.19.2-source.zip
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Is it possible to get the source code?
Sure, here you have it: ItemPickupParticleDisable 1.19.2-source.zip
Thank you! Can you have that up on curseforge? Really wish to use it in the public modpack in the future.
omg this actually worked!! this is the real deal issue, thank you for being a hero
here's a slightly tweaked version of @matix931's 1.19.2 mod that prevents Forge from showing the red X when the server doesn't match:
item-pickup-particle-disable-1.0.0-client.jar.zip
this is just using Forge's displayTest parameter within mods.toml to ignore any X flagging. Documented here if you're curious! https://docs.minecraftforge.net/en/latest/concepts/sides/#writing-one-sided-mods
Here is the mod, I really hope, it works
Seems to work for me, thanks so much! The village looks so much nicer without random smoke and fire everywhere 😄
@LaidBackSloth I'm wanna to know more for this issue. It's interesting and difficult. Appreciate
XFactHD to a similar issue for Forge
Where is the issue?
Since you are trying to mixin into https://github.com/Asek3/Oculus/blob/1.18.2-dev/src/main/java/net/coderbot/iris/mixin/fantastic/MixinParticleEngine.java#L73-L89. I think you can use https://github.com/Bawnorton/MixinSquared
After seeing how much you appreciated that fix with the ItemPickupParticle, i was motivated to dive deeper into the issue. I tried lots of different things but just couldn't find a full fix, so I stopped a few months ago. Then I saw a video from Iskall where he used that mod (I think so, at least) which motivated me to continue searching for a fix. I also didn't want to release any mod on CurseForge where the bug is not completely fixed (like the item-pickup-particle-disable mod causing a different issue, as I said in an earlier message). After looking at the fixes from XFactHD to a similar issue for Forge, I got a new idea. I tried it, and it seems to work so far. Basically, I changed the MixinParticleEngine#iris$selectParticlesToRender to use a sorted TreeMap instead of a HashMap, code can be seen here: https://gist.github.com/LaidBackSloth/b95c9543c59ccf70793898372bd1dd82. I also made a separate mod with a similar solution which doesn't need Oculus to update, code here: https://gist.github.com/LaidBackSloth/42e759df114c5e40b022d2f319fa9b4a. As the issue only sometimes appears and not always, I am not 100% sure if that works, so it would be great if a few people could test whether the mod works for them. If it works, I will inform Asek3 on the discord and hope he uploads a version of Oculus with the fix. In case he doesn't do that for whatever reason, I'll upload the mod on CurseForge as well as Modrinth, so that everyone can include it in their modpacks.
Here is the mod, I really hope, it works: oculusparticlefix-1.0.zip
Edit: The mod should work for all versions since 1.18.2 (the bug doesn’t occur on 1.16.5)
@LaidBackSloth I'm wanna to know more for this issue. It's interesting and difficult. Appreciate
XFactHD to a similar issue for Forge
Where is the issue?
Since you are trying to mixin into https://github.com/Asek3/Oculus/blob/1.18.2-dev/src/main/java/net/coderbot/iris/mixin/fantastic/MixinParticleEngine.java#L73-L89. I think you can use https://github.com/Bawnorton/MixinSquared
Here is the issue/pr by XFactHD: MinecraftForge/MinecraftForge#8378
I honestly don't know why this is a thing, but it seems like in Forge, the particle render order is additionally sorted to Vanilla.
Iris/Oculus makes opaque particles all render earlier than transparent ones with this code: https://github.com/Asek3/Oculus/blob/1.18.2-dev/src/main/java/net/coderbot/iris/mixin/fantastic/MixinParticleEngine.java#L73-L89. However, for doing that it uses a HashMap, which apparently overrides Forge's particle sorting, causing these weird visual glitches. So what I did was changing the HashMap to a TreeMap that respects Forge's particle render order while still keeping the render changes of Iris, code is here: https://gist.github.com/LaidBackSloth/b95c9543c59ccf70793898372bd1dd82.
If this is added to a new version of Oculus, Asek3 just needs to replace the commented out code in iris$selectParticlesToRender to the code below in that gist. This needs to be done for all versions since 1.18.2 as the bug doesn't occur in 1.16.5 but all the later ones.
As I didn't know about https://github.com/Bawnorton/MixinSquared, I used a slightly different approach for the standalone mod I created, of which the code can be found here: https://gist.github.com/LaidBackSloth/42e759df114c5e40b022d2f319fa9b4a. This should work just as well, but I consider using MixinSquared in the future, so thank you, @SettingDust, for pointing that out.
I will inform Asek3 on the Discord about this fix, but until he adds that, here is again the standalone mod I created, working for all versions:
https://github.com/Asek3/Oculus/files/12577009/oculusparticlefix-1.0.zip
If Asek3 doesn't respond to the issue or currently has no time to update the mod, I will also upload the mod to CurseForge and Modrinth so that it can be put in public modpacks.
@Asek3 Need check
I tested out the latest version (for 1.19.2) recently and it indeed fixes the particle issue! (thank you asek3) Unfortunately for me, it didn't fix the similar issue of Create contraptions teleporting around while items are being picked up, so I had to go back to using this disable hack.
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Are you able to update this to 1.20.1?
@matix931
For those who want to disable those particles, I have created a mod: item-pickup-particle-disable-1.0.0.jar.zip
Are you able to update this to 1.20.1?
@matix931
I think Asek3 fixed the issue in the newest Oculus versions for 1.19.2 and 1.20.1. If it doesn’t work, try this mod: https://github.com/Asek3/Oculus/files/12577009/oculusparticlefix-1.0.zip
Now, I have uploaded the mod to CurseForge https://curseforge.com/minecraft/mc-mods/oculus-particle-fix and Modrinth https://modrinth.com/mod/oculus-particle-fix (the version working without the particle disable), so that you can put it in your modpacks and inform other people having the issue about it. The reason I did that was because from @villainous-j's comment, it seems like the fix from Asek3 isn't perfectly working, and it isn't even available for 1.18.2.
Note: If you are very quick, the mods probably won't be through the review process yet, so just wait a few minutes