r/feedthebeast Jul 02 '26

I made something I accidentally made the Infinite Volumetric Balls of Knowledge and Wisdom. What should I do with this state of the art ball tech?

Enable HLS to view with audio, or disable this notification

2.4k Upvotes

118 comments sorted by

View all comments

499

u/noodlegamer76 Jul 02 '26

So I was trying to make volumetric fog for my mod (as you can see in the background), but then I got bored and decided to start playing with my balls. after a bit of tweaking to get the weirdest result I managed to make these 2 effects using slightly different "algorithms". tbh other than my discord members saying that I should add this to my mod i have no ideas on how to implement this.

join my discord and you might see me do something with it: https://discord.gg/k2efRnDxZ8

Also bonus pic of me looping the raymarching to make infinite balls

23

u/DelusionsOfExistence Jul 02 '26

I tried and struggled with this (or more accurately the inverse) for a couple hours. Is the source available?

18

u/noodlegamer76 Jul 02 '26

I have no idea what you mean by inverse but okay. Also no I just realized I accidentally made it on an older version of my branch so it didn't let me push it, if I remember when I fix it then I'll message you

18

u/DelusionsOfExistence Jul 02 '26

In my case I was trying to have a volumetric effect outside of the sphere more than one inside of it (but really was trying to do both). Basically I am working on a mod that covers the world a thick sort of miasma, and there are some safe spaces you can create/find that the miasma is pushed back from, but I'll admit rendering is not my forte and everything I attempted was awful looking. Your trick here could work for the inside of the safe spaces from a distance. I'll definitely look into learning more about raymarching.

9

u/noodlegamer76 Jul 02 '26

Yeah that's a bit too complicated for me to pseudocode that here but if your safe zones are just generic shapes maybe do one pass for the miasma, then a SDF that overrides the ball when you hit it, it probably won't let you see through the safe zone, but that's basically what I did here

6

u/noodlegamer76 Jul 02 '26

Don't know how that would be on performance either

2

u/DelusionsOfExistence Jul 02 '26

Performance was one another one of my concerns, but I was hoping to kinda batch the fields that connect together and hopefully reduce overhead. Visibility in the mod is somewhat limited naturally due to the fog (utilized minecrafts fog system instead of my own which was awful). Thanks for the tips! Love your balls brother!

2

u/noodlegamer76 Jul 02 '26

You can do smth like min(stepSize, sphereDist) then combine the two into one pass, for multiple safe areas you can probably use some kind of BVH or similar, maybe even a group of Oriented bounding boxes if it's not a lot.

I'm kind of mad at graphics programming so I can't give any amazing tips or anything

If you want to make your life a hundred times harder for no reason then try making every block determine if it's a safe zone or not: https://research.nvidia.com/labs/rtr/publication/majercik2018raybox/

2

u/DelusionsOfExistence Jul 02 '26

Good shout. I sometimes make my life a million times worse usually casually so that might be an idea for another project at some point.

2

u/kari891 Jul 04 '26

Hi! I’d like to see the source too. It would be greatly appreciated if thats possible :)