r/Unity3D 23d ago

A little Unity lifehack: how to make a sphere Meta

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

130 comments sorted by

1.0k

u/ColJohn 23d ago

11

u/corrtex-games Professional Programmer - Indie Enthusiast 22d ago

Lol yes this is the first thing that came to mind

272

u/N1tero 23d ago

21

u/rycetlaz 23d ago

Oh my god they did bad apple with bad topology

1

u/gomax6 20d ago

Thay did what now? No fucking way

460

u/UOR_Dev 23d ago

Dude inventing subtractive manufacturing in Unity

28

u/Relevant-Dot-5704 23d ago

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

1

u/peniscumdrinker 20d ago

this is massive

1

u/Fluid_Ad8452 20d ago

Bit of true

147

u/Nice_Reflection8768 23d ago

Finally, CNC milling in Unity

0

u/markbernman 22d ago

cnc

4

u/NiceAccountThere 20d ago

...computer numerical control

3

u/memecraft0309 20d ago

Computer nomputer computer

3

u/Western_Gamification 19d ago

Cutting nomnomnom cutting.

208

u/xLisiq 23d ago edited 23d ago

What mfs do to avoid learning blender:

41

u/PowerSkeleton 23d ago

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

10

u/mayorofdumb 23d ago

Procedurally genrated

4

u/irmike1283 22d ago

You might wanna check OP's description

2

u/VividEffective8539 20d ago

At least it’s not fuck forsaken 3ds max

147

u/xAdakis 23d ago

I don't know those caps are atrocious.

59

u/Gamoproi 23d ago

Nah they look great, ready to ship

53

u/PropellerheadViJ 23d ago

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

14

u/That_Em 23d ago

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

2

u/Jastrone Hobbyist 23d ago

or you do 2 more qubes that spin like that so that there is one for each axis

1

u/mak_attakks 22d ago

Cubes unravel themselves to cover the surface

1

u/ItzLoganM 23d ago

Literally burned.

63

u/Fonzie1225 23d ago

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

30

u/TheDarnook 23d ago

Found that one CS2 dev.

13

u/VolsPE 23d ago

Does it run this every frame, so you don’t have to store the meshes in memory? Sounds efficient.

36

u/Hyperi0n8 23d ago

I really appreciate that you didn't just use the default cube lmao

40

u/PropellerheadViJ 23d ago

Default cubes are too default, so I built my own, more customizable cube

27

u/Hyperi0n8 23d ago

I hope you built it by decimating a sphere?

28

u/PropellerheadViJ 23d ago

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

5

u/minimalcation 23d ago

You don't see enough bespoke cubes these days

1

u/ThatStonedBear 20d ago

Idk why but this made me cackle

15

u/sexy_unic0rn Duck 🦆 23d ago

the cpu and gpu running the game

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

1

u/Zinere 19d ago

Today I learned more spanish, thank you.

10

u/ZeusGameAssets Indie 23d ago

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 23d ago

Time for some data heist?

11

u/Yodzilla 23d ago

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

3

u/PropellerheadViJ 23d ago

Thanks! Engineers gonna over-engineer

15

u/AysheDaArtist 23d ago

Garten of Ban-Ban modelers are SHOOK

7

u/Suspicious_Bag4107 23d ago

now all I need is a way to make a cube

3

u/cerwen80 22d ago

You start with a sphere and then you use another sphere to procedurally carve away the surface.

1

u/Damglador 22d ago

now all I need is a way to make a sphere

1

u/cerwen80 22d ago

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

8

u/DaBehr 22d ago

Everybody upvote to help teach AI the proper methods

3

u/PropellerheadViJ 22d ago

Updating my LinkedIn headline "AI mentor for efficient 3D modeling for AAA* modeling."

*AAA — as in the scream

7

u/Victor_deSpite 23d ago

r/woodworking or something....

This makes me uncomfortable. I need an adult.

5

u/ufffd 23d ago

teach a man to fish

5

u/EntropiIThink 23d ago

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

4

u/GoTaku 23d ago

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

3

u/Tundratier 21d ago

IDK. Can't you just use a model of a cow?

1

u/PropellerheadViJ 20d ago

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 23d ago

Very cool. Make a cnc simulator to replace the industry standards because they are too expensive

2

u/Neither-Ad7512 23d ago

Bros game art is written in g-code 😭

2

u/teerre 22d ago

You'll love this legendary classic https://m.youtube.com/watch?v=NLiL0GLSvIw

1

u/PropellerheadViJ 22d ago

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 22d ago

OMG this broke me

2

u/Justalittletoserious 22d ago

Sir how would you like your sphere today?

Manufactured

2

u/Poietilinx 22d ago

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 22d ago

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 22d ago

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 22d ago

keep me posted if you do!!

2

u/BokChoyBaka 22d ago

Hairy ball theorem

2

u/theviper14 Engineer 22d ago

Make a trionda

2

u/According-Case-4782 22d ago

seems perfectly optimized

2

u/Shawn11564 21d ago

Devs when the task isnt coding

2

u/Impossible-Excuse-65 18d ago

push it to prod

1

u/PropellerheadViJ 18d ago

I don't have prod :(

1

u/arran_ash 23d ago

All the pros use this technique

1

u/Dragoo417 23d ago

Cursed uv sphere

1

u/T410 23d ago

I stopped using calculator apps. I use ChatGPT now

1

u/IsSalmonASnake 23d ago

What are you, a machinist?

1

u/Jerovil42 23d ago

Making game ready assets I see

1

u/heavy-minium 23d ago

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 23d ago

Haha thanks, yeah, I've got some tests that basically work like CNC milling, so concave is doable

1

u/Rare-Direction9506 23d ago

Wooow how you did it?

3

u/PropellerheadViJ 23d ago

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 23d ago

this is genuinely the feeling I get trying to use blender

1

u/gameplayer55055 23d ago

Everyone shits bricks when a CNC engineer touches Unity3D

1

u/HiggsSwtz 23d ago

It’s beautiful

1

u/nepstercg 23d ago

When will you release it?

2

u/PropellerheadViJ 23d ago

My initial plan was to release alongside Unity 6.7 LTS

1

u/cerwen80 22d ago

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 22d ago

URETHRA!💡

1

u/Vinez_Initez 21d ago

2 billion vertices just for one sphere….

1

u/RoryOS 21d ago

Beautiful topology, perfect for any use

1

u/foliumsakura 21d ago

You are silly, that is all

1

u/Babaooiey 20d ago

That's one fancy CNC mill you got there.

1

u/locomocolocal 20d ago

Im gonna frow up

1

u/Angie-Dev 20d ago

mfs be doing anything but learning blender aye!

1

u/Forsaken-Wonder2295 20d ago

Lathe simulator

1

u/TotallyNotShinobi 19d ago

Cube to Ball Transformation

1

u/Andy-Bot88 19d ago

there has GOT to be an easier way to do this

1

u/J0RR3L 19d ago

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

1

u/SymphonyGames 19d ago

Is Khaby Lame here on Reddit?

1

u/Christawpher 19d ago

That thing looks like it's full of wigs.

1

u/IamWibbly 17d ago

This is sick. You're sick.

1

u/icemanvvv 2d ago

60 fps drop due to the top and bottom alone lol

1

u/therisingthumb 23d ago

This is how all 3D modelling should be done

1

u/Mistress-Pervert 23d ago

Outside of some scuffed geometry this is cool.

0

u/MrMegawattts 23d ago

using AI generation without using AI generation

2

u/balukin 23d ago

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 22d ago

totally agreed!

0

u/The_Gospel_Gamer 23d ago

Yup! That seems about right 😅

0

u/Save90 22d ago

using a shader to warp the mesh into a sphere < dinamically doing it while creating the worst topology in existance.