franMarz / TexTools-Blender

TexTools is a UV and Texture toolset created several years ago for Blender and Max by @renderhjs. In this open repository, originally created by @SavMartin, we develop the current version of this popular Blender add-on.
Other
1.99k stars 135 forks source link

Hard Crash when baking 8192 #35

Closed Opity69 closed 3 years ago

Opity69 commented 4 years ago

blender 2.9 - crash when setting bake size to 8192 also crashes with 4046 at AA *4

also no way to tell a what stage the bake is.

AvisParadocs commented 4 years ago

Basically if you use AA its multiples your render resolution and then resizes image to your final output size. So 4k with AAx4 is 16k render image. It will render very long time and can crush due lack of memory size. Maybe my pull request can help you.

Opity69 commented 4 years ago

I am having an issue with your pull request. think you might have missed a comma line 476_inint.py also after I quickly changed it

also bad indent in op_bake line 543 cant bake at all now just gives a stack trace

AvisParadocs commented 4 years ago

My bad, it was syntax errors. You can try again. I've fixed my part.

Opity69 commented 4 years ago

ill give it a go when I get sometime

Opity69 commented 4 years ago

getting a different issue now - key error can't find for collections when trying to bake

AvisParadocs commented 4 years ago

Comment lines 542-543 in op_bake.py and try again.

Opity69 commented 4 years ago

found the actual issue - its a naming problem - file needs to be name textools in lower case or that cant get the addon propteries

Opity69 commented 4 years ago

nothing to do with those lines

Opity69 commented 4 years ago

doesn't fix my crash though also, is there some way to add baking progress bar its really annoying to just watch blender freeze and bake or crash

Opity69 commented 4 years ago

more testing and it seem to be just normal map baking that crahses

franMarz commented 3 years ago

I made a series of test. Blender 2.91, last release of TexTools, windows 7, 32GB of system RAM.

It doesn't crash on my side, 8K normal map baking with no AA, peak of 12GB of system RAM used; 4K normal map baking with 4x AA (16K texture), peak of 49GB of system memory used (32GB/32GB of system RAM + 17GB virtual). Baking a 16K texture with the Blender operator last about the same and consumes almost the same amount of memory, with a peak of 48GB. The following, last method, is somehow so much faster as well: by running it from the Blender API with this simple script: import bpy bpy.ops.object.bake(type='NORMAL') you get about the same result, with a peak memory usage of 46GB, but without progress bar; if you need the last, just use the Blender bake utility from the Render Properties tab.

As far, for me, this is not related to an addon shortcoming. Check your system virtual memory limits.

Opity69 commented 3 years ago

thanks, I thought that was almost like a memory issue, been having a similar issue with a standard blender, my hard was also getting full so virtual memory issue would make a heap of sense

franMarz commented 3 years ago

You're welcome. If your issue persist, please reopen this report, or ask for it if you can't.