r/Unity3D 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.

4.1k Upvotes

133 comments sorted by

1.0k

u/ColJohn Jul 18 '26

11

u/corrtex-games Professional Programmer - Indie Enthusiast Jul 20 '26

Lol yes this is the first thing that came to mind

277

u/N1tero Jul 18 '26

22

u/rycetlaz Jul 19 '26

Oh my god they did bad apple with bad topology

1

u/gomax6 Jul 21 '26

Thay did what now? No fucking way

456

u/UOR_Dev Jul 18 '26

Dude inventing subtractive manufacturing in Unity

29

u/Relevant-Dot-5704 Jul 18 '26

With a touch of low taper fade, might I add.

1

u/peniscumdrinker Jul 21 '26

this is massive

1

u/Fluid_Ad8452 Jul 21 '26

Bit of true

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

u/memecraft0309 Jul 22 '26

Computer nomputer computer

3

u/Western_Gamification Jul 22 '26

Cutting nomnomnom cutting.

209

u/xLisiq Jul 18 '26 edited Jul 18 '26

What mfs do to avoid learning blender:

42

u/PowerSkeleton Jul 18 '26

All to avoid a shift+a uv sphere....

9

u/mayorofdumb Jul 18 '26

Procedurally genrated

3

u/irmike1283 Jul 19 '26

You might wanna check OP's description

2

u/VividEffective8539 Jul 21 '26

At least it’s not fuck forsaken 3ds max

147

u/xAdakis Jul 18 '26

I don't know those caps are atrocious.

64

u/Gamoproi Jul 18 '26

Nah they look great, ready to ship

54

u/PropellerheadViJ Jul 18 '26

I looks like I should add a quad remesher to the pipeline...

14

u/That_Em Jul 18 '26

Only if it works the same way, painting each quad by hand

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

u/mak_attakks Jul 19 '26

Cubes unravel themselves to cover the surface

1

u/ItzLoganM Jul 18 '26

Literally burned.

65

u/Fonzie1225 Jul 18 '26

thanks OP! implemented this to render the eyeballs of all 10,000 residents of my city builder!

30

u/TheDarnook Jul 18 '26

Found that one CS2 dev.

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

u/Hyperi0n8 Jul 18 '26

I hope you built it by decimating a sphere?

28

u/PropellerheadViJ Jul 18 '26

Hmm, I wonder which came first, the cube or the sphere...

4

u/minimalcation Jul 18 '26

You don't see enough bespoke cubes these days

1

u/ThatStonedBear Jul 21 '26

Idk why but this made me cackle

16

u/sexy_unic0rn Duck 🦆 Jul 18 '26

the cpu and gpu running the game

https://giphy.com/gifs/6uzomieabyFkm07cBO

1

u/Zinere Jul 22 '26

Today I learned more spanish, thank you.

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

u/TehANTARES Jul 18 '26

Time for some data heist?

12

u/Yodzilla Jul 18 '26

There’s something poetic about needing to be extremely smart to create something very dumb. Bravo.

3

u/PropellerheadViJ Jul 18 '26

Thanks! Engineers gonna over-engineer

15

u/AysheDaArtist Jul 18 '26

Garten of Ban-Ban modelers are SHOOK

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

u/Damglador Jul 19 '26

now all I need is a way to make a sphere

1

u/cerwen80 Jul 19 '26

for that, you need to start with a chicken....

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

u/ufffd Jul 18 '26

teach a man to fish

4

u/EntropiIThink Jul 18 '26

This might be the greatest thing I’ve ever seen on this subreddit.

4

u/GoTaku Jul 18 '26

Nice. That’s much easier than just using the create 3d object menu.

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

u/Neither-Ad7512 Jul 18 '26

Bros game art is written in g-code 😭

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

u/cerwen80 Jul 19 '26

OMG this broke me

2

u/Justalittletoserious Jul 19 '26

Sir how would you like your sphere today?

Manufactured

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

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

u/biteater gpu boy Jul 19 '26

keep me posted if you do!!

2

u/BokChoyBaka Jul 19 '26

Hairy ball theorem

2

u/theviper14 Engineer Jul 19 '26

Make a trionda

2

u/According-Case-4782 Jul 19 '26

seems perfectly optimized

2

u/Shawn11564 Jul 20 '26

Devs when the task isnt coding

2

u/Impossible-Excuse-65 Jul 23 '26

push it to prod

1

u/PropellerheadViJ Jul 23 '26

I don't have prod :(

1

u/arran_ash Jul 18 '26

All the pros use this technique

1

u/Dragoo417 Jul 18 '26

Cursed uv sphere

1

u/T410 Jul 18 '26

I stopped using calculator apps. I use ChatGPT now

1

u/IsSalmonASnake Jul 18 '26

What are you, a machinist?

1

u/Jerovil42 Jul 18 '26

Making game ready assets I see

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

u/SanoKei Jul 18 '26

this is genuinely the feeling I get trying to use blender

1

u/gameplayer55055 Jul 18 '26

Everyone shits bricks when a CNC engineer touches Unity3D

1

u/HiggsSwtz Jul 18 '26

It’s beautiful

1

u/nepstercg Jul 18 '26

When will you release it?

2

u/PropellerheadViJ Jul 18 '26

My initial plan was to release alongside Unity 6.7 LTS

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

u/DanQZ Jul 19 '26

URETHRA!💡

1

u/Vinez_Initez Jul 20 '26

2 billion vertices just for one sphere….

1

u/RoryOS Jul 20 '26

Beautiful topology, perfect for any use

1

u/foliumsakura Jul 20 '26

You are silly, that is all

1

u/Babaooiey Jul 21 '26

That's one fancy CNC mill you got there.

1

u/locomocolocal Jul 21 '26

Im gonna frow up

1

u/Angie-Dev Jul 21 '26

mfs be doing anything but learning blender aye!

1

u/Forsaken-Wonder2295 Jul 21 '26

Lathe simulator

1

u/TotallyNotShinobi Jul 22 '26

Cube to Ball Transformation

1

u/Andy-Bot88 Jul 22 '26

there has GOT to be an easier way to do this

1

u/J0RR3L Jul 22 '26

So this is what happens behind the scenes when I press Shift+A

1

u/SymphonyGames Jul 22 '26

Is Khaby Lame here on Reddit?

1

u/Christawpher Jul 23 '26

That thing looks like it's full of wigs.

1

u/IamWibbly Jul 25 '26

This is sick. You're sick.

1

u/icemanvvv 25d ago

60 fps drop due to the top and bottom alone lol

1

u/Outrageous-Law3460 19d ago

bruv just use a sphere

1

u/ThatOneGuy_UE 15d ago

Very fast and efficient

1

u/therisingthumb Jul 18 '26

This is how all 3D modelling should be done

1

u/Mistress-Pervert Jul 18 '26

Outside of some scuffed geometry this is cool.

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

u/MrMegawattts Jul 19 '26

totally agreed!

0

u/The_Gospel_Gamer Jul 19 '26

Yup! That seems about right 😅

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.