cancel
Showing results for 
Search instead for 
Did you mean: 

Would hollowing out my models save memory?

P3nT4gR4m
Consultant
Not sure how these signed distance field thingmybobs work but it's something like a 3d grid filled with "voxels", right? Hollow models = less voxels, right? Or is that not how it works?
17 REPLIES 17

surt
Protege
Medium appears to be chunk based from the mesh output. (built out of smaller fixed-size blocks of voxels)
Layers have a finite size and uniform resolution.
From this I presume they are using a simple fixed-size 3D array of chunks.
If that's the case then any fully empty chunks shouldn't need to be allocated, but non empty chunks will need to be fully allocated. (chunks might be preallocated in a cache for faster chunk creation, that shouldn't cause memory problems though)

bhsharp
Protege
@surt - as of 1.0.1, exported OBJ meshes should not have split seams anymore - let me know if you're still seeing them split up. But yes, good inference - those seams were aligned on the size of our SDF blocks.

@kojack - good analysis. We don't spatially *partition* in the sense of octrees or anything (in practice wouldn't yield much perf benefit for anything we do, and just takes a little memory + bookkeeping), but the SDF is stored sparsely, so we don't allocate a block until you do something with it.

That said, I'm pretty sure right now we don't reclaim blocks when you empty them.

So, TLDR: Sculpting a model that is hollow *in the first place* will save you some memory (probably less than you expect unless it's a really large interior volume.) Sculpting a model solid and then hollowing it out will not save you any memory.

P3nT4gR4m
Consultant
Thanks for the clarification @bhsharp. There's workflows I can think of where I could end up modelling the skin and fine surface detail on a separate layer then ditch the rest. If you imagine something humanoid where the skin is a centimeter or so thick at most, I'd probably be saving a significant amount of volume by doing this as a last pass.

bhsharp
Protege
With the 1.0.2 patch we just released you can confirm your way through the low memory stuff. So the deal with that is that Windows warns us when the *physical* memory is getting low. You can push your way through that if you want, especially if you're running other memory-hungry apps, because Windows will just page them out and Medium will be fine. We make you confirm through it because you may get hitching and frame drop while the paging happens, but otherwise perf should remain alright.

That said, if you're rocking an 8GB rig, yeah, you're gonna be limited. Back at Bungie all our dev machines for Destiny were 32GB base and I'm pretty sure some artists got 64+. Content takes memory.

Clearly there's more we can do here over time. Like, we could page out layers once they've been invisible for a while, or if we figure out some way for you to tell us that you're going to leave them invisible a while. Half the work is figuring out good UX design for it, half is the work of actually freeing up the memory and being able to reload it when we need to. It's all just work, and we only have so many fingers to type with.

As for the hollow thing, the way our SDF works, we store data a few voxels out from the surface, too, so again, hollow models won't save as much as you expect (mentally inflate the model by a few voxels and that's what we need in memory.)

I hollow out models primarily for 3D printing to save on resin, since my Form2 can print hollow shapes without filling them in. And actually hollowing out models to a nice consistent wall thickness is kind of hard in Medium right now, it's something I want to think about improving. But less for memory, more for making shells.

danknugz
Superstar
i got the warning today in medium about memory, thanks for the info
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on forums?

kojack
MVP
MVP

bhsharp said:


@kojack - good analysis. We don't spatially *partition* in the sense of octrees or anything (in practice wouldn't yield much perf benefit for anything we do, and just takes a little memory + bookkeeping), but the SDF is stored sparsely, so we don't allocate a block until you do something with it.

That said, I'm pretty sure right now we don't reclaim blocks when you empty them.



Cool. I had a read through the python scripts and shaders in the medium directory and saw mention of blocks, so I was guessing it was something like that.

Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

surt
Protege
It'd cool if we could get an option for chunk boundary visualisation so we can take that into consideration when editing.

Roaster
Rising Star
I was trying to upload a sculpture but it kept responding upload failed. I could see upload traffic on the pc, so I know it was trying, but seemingly the server wouldn't have it.  Tried maybe eight times over two days.
It was a two-layer laminate, with a hollow center portion and a skin on top of that, so on a whim I erased the part of the core that was concealed and the upload was successful. 
It wasn't due to empty layers this time as they had already been eliminated.

Question to devs ... are there certain limits or restrictions on uploads? Size, memory, or whatever?
i7-5820K @ 4.2Ghz, water cooled, Asus X99-Pro USB 3.1, 48 Gb DDR4 2400, Samsung 950 pro M.2 SSD, GTX 980 Ti SC, 750w psu