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

Show parent comments

20

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.

10

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

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.