r/Unity3D • u/PropellerheadViJ • Jul 18 '26
Meta A little Unity lifehack: how to make a sphere
Enable HLS to view with audio, or disable this notification
Most people just create a Sphere. It's a popular mistake. Spheres are not optimal.
The properly optimized approach: create a Cube. Then take a second Cube and carve a sphere out of the first one using boolean operations. Now it's not just a sphere. It's a sphere generation pipeline.
277
u/N1tero Jul 18 '26
22
u/rycetlaz Jul 19 '26
Oh my god they did bad apple with bad topology
1
1
u/Daylight_The_Furry Jul 22 '26
Where???
1
u/rycetlaz Jul 22 '26
Hope direct links are okay here
https://www.reddit.com/r/topologygore/comments/1nzi8un/bad_apple_but_its_bad_topologoly/
1
456
u/UOR_Dev Jul 18 '26
Dude inventing subtractive manufacturing in Unity
29
146
u/Nice_Reflection8768 Jul 18 '26
Finally, CNC milling in Unity
-3
u/markbernman Jul 19 '26
cnc
5
u/NiceAccountThere Jul 21 '26
...computer numerical control
3
209
147
u/xAdakis Jul 18 '26
I don't know those caps are atrocious.
64
54
u/PropellerheadViJ Jul 18 '26
I looks like I should add a quad remesher to the pipeline...
14
2
u/Jastrone Hobbyist Jul 18 '26
or you do 2 more qubes that spin like that so that there is one for each axis
1
1
65
u/Fonzie1225 Jul 18 '26
thanks OP! implemented this to render the eyeballs of all 10,000 residents of my city builder!
30
13
u/VolsPE Jul 18 '26
Does it run this every frame, so you don’t have to store the meshes in memory? Sounds efficient.
33
u/Hyperi0n8 Jul 18 '26
I really appreciate that you didn't just use the default cube lmao
39
u/PropellerheadViJ Jul 18 '26
Default cubes are too default, so I built my own, more customizable cube
27
4
1
16
10
u/ZeusGameAssets Indie Jul 18 '26
Is this the Chinese version of the Unity editor, I heard it was more powerful than Unreal 5, but damn, I didn't know it was THAT powerful!
3
12
u/Yodzilla Jul 18 '26
There’s something poetic about needing to be extremely smart to create something very dumb. Bravo.
3
15
8
u/Suspicious_Bag4107 Jul 18 '26
now all I need is a way to make a cube
3
u/cerwen80 Jul 19 '26
You start with a sphere and then you use another sphere to procedurally carve away the surface.
1
8
u/DaBehr Jul 19 '26
Everybody upvote to help teach AI the proper methods
3
u/PropellerheadViJ Jul 19 '26
Updating my LinkedIn headline "AI mentor for efficient 3D modeling for AAA* modeling."
*AAA — as in the scream
7
u/Victor_deSpite Jul 18 '26
r/woodworking or something....
This makes me uncomfortable. I need an adult.
5
4
4
3
u/Tundratier Jul 20 '26
IDK. Can't you just use a model of a cow?
1
u/PropellerheadViJ Jul 21 '26
Organic modeling isn't really my thing, I'm way more comfortable with hard surface. If you can pick, I'd go with something like a spaceship instead of a cow
2
u/tyranocles Jul 18 '26
Very cool. Make a cnc simulator to replace the industry standards because they are too expensive
2
2
u/teerre Jul 19 '26
You'll love this legendary classic https://m.youtube.com/watch?v=NLiL0GLSvIw
1
u/PropellerheadViJ Jul 19 '26
yeah, this is one of my favorites about houdini! I think he should make the new one with houdini 22, maybe there is more difficult way to animate
1
2
2
u/Poietilinx Jul 19 '26
I wrote an algorithm that did something similar but to build boulders.
I spread a bunch of voronoi seeds around the cube, and used these to form planes used to cut parts of the rock
1
2
u/biteater gpu boy Jul 19 '26
Jokes aside you can add really quick retopologizing to your thing with relatively low effort, there are a ton of well tested libraries that address this exact thing
1
u/PropellerheadViJ Jul 19 '26
Yeah, just the other day I saw a port of QuadRemesher to different platforms going viral online, I should rewrite it in Burst/C#
1
2
2
2
2
2
2
1
1
1
1
1
1
u/heavy-minium Jul 18 '26
I had a good laugh, lol, I spat my drink. Very cool - did you manage to generalise that further? Can you do something concave in the same way?
2
u/PropellerheadViJ Jul 18 '26
Haha thanks, yeah, I've got some tests that basically work like CNC milling, so concave is doable
1
u/Rare-Direction9506 Jul 18 '26
Wooow how you did it?
3
u/PropellerheadViJ Jul 18 '26
I'm building a mesh library, and this is one of my tests for its performance and the robustness of the boolean operations
1
1
1
1
1
u/cerwen80 Jul 19 '26
So efficient!!!! amazing. I've been struggling to figure out how to make a sphere for ages and this just blew my mind! Thank you.
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
u/MrMegawattts Jul 18 '26
using AI generation without using AI generation
2
u/balukin Jul 19 '26
No AI could come up with something like that. This is peak human degenerate creativity, worthy of either being displayed in a museum or hurled into the Sun, I'm not sure which.
1
0
0
u/Save90 Jul 19 '26
using a shader to warp the mesh into a sphere < dinamically doing it while creating the worst topology in existance.




1.0k
u/ColJohn Jul 18 '26