Memory usage

Hi,
is there any way to calculate the memory usage by base mesh polygons and free polygons ?

Thanks

Hello Joachim,

What do you mean: memory usage by free polygons? Selecting free polygons hardly even add 1 Mb of extra RAM.

Do you mean the memory usage of objects like wrap.Geom? Or additional amount of memory required for processing functions?

Do you experience problems with large models? If so it might be an issue with graphics memory, not RAM. There are non-visual classes wrap.GeomNonUI and wrap.ImageNonUI that do not use graphics memory at all. You can use them the same way like wrap.Geom and wrap.Image but you can not display them or use them in any visual dialogs.

For now there is no way to calculate memory usage of objects in WrapX but we can add this functions if you feel they are necessary.

Hello Adrew

I had the Problem with a Make Target base mesh.
This has, together with the helper geometry for the rig, eyeballs … (without helper for fit tools), 15128 verts in 14766 faces (quads).
About 12000 faces (outer Skin), the rest i set to free.

This i started with the “simple wraping” script, only i deleted step

5. Subdivision and # 6. Projection

The scan has about 4400000 tris, no texture

no Crash on loading, so i give it a try.

After about 16h non ridgid Registration my Memory used by wrapx was on 13.5GB
The next 10h the Memory us was going up and down betwen 13 and 14GB
But there was still no % indication on wrapx. The Template was not moving.
So after 26h i stop the try.

I have win7 64
16GB ram
2 grafics GT640 and GT430
with 2GB an 500MB Memory

Hello Joachim,

WrapX usually takes 1 - 15 minutes, if it takes more than hour it is definitely failed. The scan seems too big for WrapX, i would decimate it 50% or more before before using. At least it would be much efficiently.

But i dont think the problem is caused by memory issue. I think the problem arise due to presence of helper geometry in the base mesh. In order the optimization routine to work efficiently, the base mesh should be a single connected piece of geometry. Small parts like eyeballs or eyelashes that are not connected to the rest of the mesh would cause the optimization to fail.

Anyway using geometry helpers would make no sence as the optimization relies on polygons’ connectivity. So any separated group of polygons will behave independently during the optimization process.

The only solution i see is to detach helper geometry from the base mesh or to use wrap.subset http://www.russian3dscanner.com/docs/WrapX/wrapFunctions.html#wrap.subset to exclude it from optimization process. Please let me know if you need any help with using wrap.subset and wrap.subsetApply functions.

The is a lattice deformer that would be added in next release that might solve some problems with helpers.

Hello Andrew

It will be nice if you can make a tutorial ore a sample script how to use subsets.
Can i use it without changing the vertex order of the mesh ?
Or it is Splitting the mesh ?

Looking Forward to the next release :slight_smile:

Hello Joachim,

Sure, as you extract subset, wrap it around the scan and apply subset back to the basemesh it does not change vertex order and topology. It only changes positions of correspondent vertices.

Sorry that we do not have a tutorial for now but here is basic usage:

select polygons to be included in subset

selectedPolygons = wrap.selectPolygons(basemesh)
basemesh.hide();

create subset

basemeshSubset, vertexMapping = wrap.subset(basemesh,selectedPolygons)

do something with basemeshSubset, but don’t change topology (don’t subdivide or decimate it)

apply subset back to basemesh.

It will only change vertex positions of original basemesh

to corresponding vertex positions of subset.

Vertex order of basemesh will remain the same.

wrap.applySubset(basemesh,basemeshSubset,vertexMapping)
del basemeshSubset
basemesh.show()