# Bug with multiresolution optimization

**URL:** <https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102>\
**Category:** Bug Report\
**Created:** [January 7, 2021, 9:29pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102 "2021-01-07T21:29:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Ross](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/justin_ross/32/1231_2.png) [@Justin\_Ross](https://forum.nomadsculpt.com/u/Justin_Ross)\
**Post date:** [January 7, 2021, 9:29pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/1 "2021-01-07T21:29:51Z")

</div>

Steps to reproduce:

1. Create lower resolution of high-res mesh with Multiresolution -\> Reverse
2. Switch back to high resolution
3. Rotate/pan camera

[https://dl.dropboxusercontent.com/s/z8bsnikpsyr9sqy/multires%20bug.MP4](https://dl.dropboxusercontent.com/s/z8bsnikpsyr9sqy/multires%20bug.MP4)

Looks like something is wonky when it tries showing the lower-res version during camera move.

(Also, I’m getting a crash when trying to make a lower-res multiresolution level in a copy of this file. Weirdly, this file lets me make a lower-res version. If I make a copy of it with Save As, then try doing a Reverse on the copy, it crashes.)

---

<div class="post-metadata">

**Author:** ![stephomi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/stephomi/32/19583_2.png) [@stephomi](https://forum.nomadsculpt.com/u/stephomi)\
**Post date:** [January 7, 2021, 10:11pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/2 "2021-01-07T22:11:38Z")

</div>

Ah this is bad.

I tried with a simple mesh (sphere) but I couldn’t reproduce.  
Do you have a simple way to reproduce the bug?  
Otherwise you can simply send me the file at [stephaneginier@gmail.com](mailto:stephaneginier@gmail.com).

---

<div class="post-metadata">

**Author:** ![Justin\_Ross](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/justin_ross/32/1231_2.png) [@Justin\_Ross](https://forum.nomadsculpt.com/u/Justin_Ross)\
**Post date:** [January 7, 2021, 10:31pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/3 "2021-01-07T22:31:05Z")

</div>

I can’t seem to reproduce with other models, either. Even ones created in the previous version. Looking at how the screwy model is structured, maybe something to do with the painted vertices? Is there a way to clear all vertex paint info?

Some more information on the crashing: the crashing on reverse issue appears to be when I have one mesh open, then open another and do the reverse operation (so, I had the original file open, created/opened a copy, then tried the Reverse, and it crashed).

If I have a copy of the project open, force quit the app, then reopen so the copy is the first thing opened, I’m able to do a multires Reverse, and the rendering issue shows up there, too. I’ll email you a dropbox link for the file.

---

<div class="post-metadata">

**Author:** ![stephomi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/stephomi/32/19583_2.png) [@stephomi](https://forum.nomadsculpt.com/u/stephomi)\
**Post date:** [January 7, 2021, 10:40pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/4 "2021-01-07T22:40:36Z")

</div>

It can’t be the painting since the reverse is working exclusively with the topology information (vertices and quads).

I can easily reproduce the issue with your file so I’ll be able to fix it, thanks!

---

<div class="post-metadata">

**Author:** ![Justin\_Ross](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/justin_ross/32/1231_2.png) [@Justin\_Ross](https://forum.nomadsculpt.com/u/Justin_Ross)\
**Post date:** [January 7, 2021, 10:42pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/5 "2021-01-07T22:42:18Z")

</div>

Awesome! Happy to help. 🙂

---

<div class="post-metadata">

**Author:** ![stephomi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/stephomi/32/19583_2.png) [@stephomi](https://forum.nomadsculpt.com/u/stephomi)\
**Post date:** [January 7, 2021, 11:47pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/6 "2021-01-07T23:47:44Z")

</div>

I managed to fix the bug.

Thanks for the file, nice model!

The issue was that app was trying to render the lower resolution when it shouldn’t have to.  
Depending on the topology, sometimes I can’t reuse the lower resolution, and it was the case here.

Instead of reverting to the old behaviour I manage to fix the whole thing, so now it should always be possible to reuse lower resolution.  
It was a limitation that I had for probably more than 5 years 🙂 (from sculptgl).

Concerning the crash, I suspect you simply ran out of memory.  
You can check the “free” ram.

---

<div class="post-metadata">

**Author:** ![Justin\_Ross](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/justin_ross/32/1231_2.png) [@Justin\_Ross](https://forum.nomadsculpt.com/u/Justin_Ross)\
**Post date:** [January 7, 2021, 11:50pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/7 "2021-01-07T23:50:05Z")

</div>

Hey thanks! I had a lot of fun making it. Nomad is a dream to work with. It’s obvious you’ve put a lot of thought into the UI.

And yeah, I figured it was a RAM issue. I’ve run into a couple of other similar crashes. How hard would it be to catch that kind of memory error and fail the operation instead of crashing entirely?

---

<div class="post-metadata">

**Author:** ![stephomi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/stephomi/32/19583_2.png) [@stephomi](https://forum.nomadsculpt.com/u/stephomi)\
**Post date:** [January 8, 2021, 12:10pm UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/8 "2021-01-08T12:10:28Z")

</div>

I don’t think you will find many softwares that gracefully recovers from out-of-memory issue.  
It’s a bit of a pain.

Also the “free/available” memory is typically not something that you can trust blindly.  
On iOS it seems relatively reliable but on Android I couldn’t get the information clearly.

---

<div class="post-metadata">

**Author:** ![stephomi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/stephomi/32/19583_2.png) [@stephomi](https://forum.nomadsculpt.com/u/stephomi)\
**Post date:** [January 9, 2021, 1:53am UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/9 "2021-01-09T01:53:05Z")

</div>

1.34 should be live with the fix!

> [@Nomad Change Log](https://forum.nomadsculpt.com/t/nomad-change-log/139/8):
>
> 1.34 multires: fix lower resolution rotate-optimisation issue (after reverse) multires: fix glb corrupt saving when a lower level of a multires is selected render: smoother wireframe and model edge shadow: simplify normal bias range (independant from scene size)

---

<div class="post-metadata">

**Author:** ![Justin\_Ross](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/justin_ross/32/1231_2.png) [@Justin\_Ross](https://forum.nomadsculpt.com/u/Justin_Ross)\
**Post date:** [January 9, 2021, 4:50am UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/10 "2021-01-09T04:50:04Z")

</div>

Oh nice!

I don’t suppose it’ll fix this model that blew up after a crash? 😩

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/nomadsculpt/original/2X/d/d7896f05fc4665c319e318c5836b22be877b52b6.jpeg)

/edit: it did not, but I’m guessing this is the other multires bug that got fixed.

Ah well. I want that happy with it anyway. Good excuse to start it over.

---

<div class="post-metadata">

**Author:** ![stephomi](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.nomadsculpt.com/stephomi/32/19583_2.png) [@stephomi](https://forum.nomadsculpt.com/u/stephomi)\
**Post date:** [January 9, 2021, 9:45am UTC](https://forum.nomadsculpt.com/t/bug-with-multiresolution-optimization/1102/11 "2021-01-09T09:45:50Z")

</div>

Yep corrupted files are lost for good.  
Actually that’s the reason why I made this quick release, broken saves is the worst thing that can happen.
