[Bf-committers] unlimited clay - Arch questions

Nicholas Bishop nicholasbishop at gmail.com
Mon Jun 14 20:49:13 CEST 2010


I think here neither the Mesh data structure nor EditMesh data
structure is exactly what you want. Exactly the structure that you do
want is a little harder to say of course :) Depends on how the mesh is
being subdivided by unlimited clay.

Anyways, it occurs to me you might want to consider writing your own
DerivedMesh variant. Internal to your DerivedMesh, you can set up
whatever data structure you find most helpful to accelerate your
subdivision algorithm. Whenever the DerivedMesh is free'd, you can
write out the changes to the real Mesh. You can also extend the PBVH
with support for this new DerivedMesh type.

The above is actually exactly how we do multires, which internally
uses a quite different representation than a regular Mesh. In this way
you can bypass editmesh entirely, while also avoiding hacking on your
own changes to Mesh, which from my own experience is a Bad Idea. :)


On Mon, Jun 14, 2010 at 10:38 AM, Raul Fernandez Hernandez
<raulf at info.upr.edu.cu> wrote:
> Hi all
> This weekend I have made several performance tests and the bottleneck are
> in this functions:
> make_editMesh()
> load_editMesh()
> free_editMesh()
> BLI_pbvh_build_mesh()
> those are the more time consuming parts
>  I will try to move outside the make_editMesh() and free_editMesh() if I
> find a way to update the editMesh selection based on the mesh selected
> verts, that is, like in the Edit mode, when the object enters sculpt mode
> it could create the EditMesh structure, that will be updated in each step
> (and not created/deleted) I just need to translate the base mesh selected
> verts to the EditMesh verts.  this step could save lot of time.
>  The remaining bottleneck will be load_editMesh() , for update the base
> mesh from the editMesh, this step should be performed on each stroke, I
> don't know other variant to update the base mesh than this. Is there any?
>  and the BLI_pbvh_build_mesh() that hopefully will be tractable thanks to
> Nicholas advices.
> And more important: is there a way to modify/update/add/remove the base
> mesh without call or construct an EditMesh? that way we could skip the
> load_editMesh() call and get an instant update and a big speed gain, if
> those conditions could be met I think we could achieve production ready
> speeds in realtime unlimited clay.
>                   thanks in advance    Raul
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

More information about the Bf-committers mailing list