VAST-AI-Research / TripoSR

MIT License
4.62k stars 534 forks source link

increase the Marching Cubes Resolution above 320 #53

Open ezequielal39 opened 8 months ago

ezequielal39 commented 8 months ago

Is it possible to increase the Marching Cubes Resolution above 320 by changing the variable "maximum = 320" in the file "gradio_app.py"? Or would it cause an error?

pookiefoof commented 8 months ago

https://github.com/VAST-AI-Research/TripoSR/issues/44#issuecomment-1986916292

Yes. It appears that torchmcubes doesn't support resolutions higher than a certain limit.

thatname commented 8 months ago

I fixed this, you can try #68

IgorAherne commented 8 months ago

@thatname impressive speedup! One thing I noticed, models have checker/square pattern which seems to be invariant to resolution or chunk size (arguments in the run.py). Do you know if it's due to something .cu file of marchingcubes? Or some hard-coded value.

I counted them and the value seems to be exactly 32 vertically.

image

thatname commented 7 months ago

@thatname impressive speedup! One thing I noticed, models have checker/square pattern which seems to be invariant to resolution or chunk size (arguments in the run.py). Do you know if it's due to something .cu file of marchingcubes? Or some hard-coded value.

I counted them and the value seems to be exactly 32 vertically.

image

I think it's limited by the underlying triplane resolution, which is 64.

mrbid commented 7 months ago

@thatname impressive speedup! One thing I noticed, models have checker/square pattern which seems to be invariant to resolution or chunk size (arguments in the run.py). Do you know if it's due to something .cu file of marchingcubes? Or some hard-coded value. I counted them and the value seems to be exactly 32 vertically. image

I think it's limited by the underlying triplane resolution, which is 64.

Did you try different normal smoothing? Could help hide the janky marching cube faces.

image

See there better normal smoothing helps a lot

rozentill commented 6 months ago

@thatname impressive speedup! One thing I noticed, models have checker/square pattern which seems to be invariant to resolution or chunk size (arguments in the run.py). Do you know if it's due to something .cu file of marchingcubes? Or some hard-coded value. I counted them and the value seems to be exactly 32 vertically. image

I think it's limited by the underlying triplane resolution, which is 64.

Did you try different normal smoothing? Could help hide the janky marching cube faces.

image

See there better normal smoothing helps a lot @mrbid Can you give more details about normal smoothing, I am gonna do similar stuff. Which method do you use?

mrbid commented 6 months ago

@thatname impressive speedup! One thing I noticed, models have checker/square pattern which seems to be invariant to resolution or chunk size (arguments in the run.py). Do you know if it's due to something .cu file of marchingcubes? Or some hard-coded value. I counted them and the value seems to be exactly 32 vertically. image

I think it's limited by the underlying triplane resolution, which is 64.

Did you try different normal smoothing? Could help hide the janky marching cube faces. image See there better normal smoothing helps a lot @mrbid Can you give more details about normal smoothing, I am gonna do similar stuff. Which method do you use?

Yeah in Blender for example the more times you apply the smooth normals the smoother the normals become, you can apply it a few times it's basically like a gaussian blur on the vertex normals which dictate how light reflects off the faces.

https://github.com/VAST-AI-Research/TripoSR/assets/78346668/f15f629c-1ce9-4db1-94a0-c948fe27fbda

More information about showing vertex normals in Blender: https://www.katsbits.com/codex/show-normals/