[Proposal] Visual Geometry to Editable

This is a follow up from the latest Nodes & Physics Module meeting.

This is a design proposal for the challenge of preserving instances while applying a modifier. This is particular relevant for the Dog Walk open game project.

Design workshop by:

  • Dalai Felinto
  • Simon Thomems

Visual Geometry to Editable

Design

A way to get the exact same result for the current frame as destructive data, while keeping instances.

Use Cases

  • Apply modifier to make manual changes (nudge, remove instances).
  • Sculpting after a cloth simulation for a bed sheet.
  • Export set dressed scene into a game engine preserving instances.
  • Edit cached data (e.g., Alembic imports).

Problem

  • There is no way to get the exact same result for the current frame:
    • For destructive edits.
    • I/O.
  • Make Instances Real does not retain sharing instance data. (e.g. set dressing).

Solution analysis:

The behaviour overlaps with:

  • Apply Modifier
  • Make Instances Real
  • Visual Geometry to Mesh
  • bpy.ops.object.convert(target='MESH')
  • ob.to_mesh()
  • ob.evaluated_get(depsgraph)

Solution

A new operator (Visual Geometry to Editable), that creates new objects (if needed), apply all modifications present on the current frame, and preserve instancing.

  • Operator on the object level.
    • Otherwise we canā€™t always support well applying the first modifier while keeping the same results.
    • Convert evaluated data into real data.
  • Create new objects for procedural geometries.
    • One object per component of each geometry set.
    • Objects should have no geometry nodes modifier.
  • Procedural geometries which are only instanced need to be hidden in the viewport.
    • Maybe put them in a collection and hide the collection.
    • Or even, put then in a collection excluded from the View Layers.
  • Create one Empty for each instanced object.
  • [Optional] Support Empty object instancing.
    • This would simplify things, but it is not required.
    • Otherwise we need to create new collections to instance the objects.

Naming

The newly created objects need a good name schema base.

  • Procedural geometries:
    • Named after the Geometry Set + component (if multiple components).
    • Fallback to the object name + component (e.g., Chair.Curve).
  • Empties:
    • Named after whatā€™s been instanced.

Operator (redo) Options

  • Parent (same as Make Instances Real).
  • Keep Hierarchy (same as Make Instances Real).
    • For nested instances.
  • Keep Original (same as Convert).
  • Realize Instances.
  • [Future]: Instance Type (Point Cloud / Empties).

Future

Enhanced functionality that should not be blocking for this feature.

Point Cloud Instance

  • Implement object or collection instancing for individual points within a point cloud.
  • Needs basic edit mode for point cloud.
    • Selection / selection per-instance
    • Transform (location/rotation/scale).
    • Add/Copy/Delete.
    • Set Attribute.
    • Set Instance.
  • Operator to convert back/forth from Empties to Point Cloud instances
    • Convert To ā†’ Empty.
    • Convert To ā†’ Point Cloud.

(Enhanced) Apply Modifier

This could replace the existing Apply Modifier (on a modifier level). For this we need to support multiple components as original data for a single object.

20 Likes

Hi, thatā€™s great news! This has been on my checklist for the last 2 years.
I create complete scenes with GN and have been struggling with exporting them to other engines while keeping the instance data.
I really like the proposal, but Iā€™d like to suggest another option for the redo panel:

Instances as different objects with the same shared data- essentially turning each instance Geometry Set into a collection with multiple new objects (one for every domain), while keeping the object data shared between objects of the same domain.
This is similar to the ā€˜realize instanceā€™ option in that it creates many identical collections (discarding their ā€˜instanceā€™ trait), but it still keeps all the mesh/curve/point data shared.
On the other hand, it creates a simpler output without the need to create an excluded collection to hold the instanced objects.
The integration into the blender ecosystem is also easier as for example you can just enter into edit mode and change the underline mesh, or select a single object to make it unique.

I was also contemplating about chaining nested instances in the form of parent-child, but Iā€™m not sure how that gonna work,it is an important aspect of instances and their holding Geometry Set that isnā€™t apparent in the other options of the operator, but Iā€™m not sure which of blender current structure can do that.

If something isnā€™t clear I can make a simple mockup.

ah, it may be good idea to add mockups to the original proposal to demonstrate the differences between the different operators.
The moment something touch nested instance everything tend to become confusing, especially for comparing similar (counted 4) operators.

There is another issue related to the application of modifiers. During the development of Claypencil, we have seen that it is very interesting to be able to convert the mesh generated from Grease Pencil into a ā€œrealā€ mesh in order to be able to make adjustments manually. The current problem is that when applying the modifier, you get nothing, since the generated geometry is Mesh and the apply tries to create GP data. It would be super interesting to be able to create these meshes (now it is possible with some trick) and be able to manipulate them, in addition this would be related to the animation of meshes using several datablocks for the same object, as we did in the experimental Claymation add-on that we have. All this is related to creating a new 3D animation workflow without the need to create rigs. It is not valid for all productions but it is something with immense potential.

2 Likes

@sybren Told me he is working in some way to animate the datablock of an object and this is the other piece we are missing to have the new workflow.

Another note (I apologize for the clutter): you could include the GLTF export-import (you need to check: Data ā†’ Scene Graph ā†’ Geometry Nodes Instances (experimental)) as another method to ā€˜get instances from GN as editable data.ā€™ This method is also the most accurate of them all and the most similar to the proposed intended outcome.

Iā€™m not actively working on that. There are plans for this, but donā€™t expect them to happen this year. First the slotted Actions need to be released in 4.4 and gotten feedback + polish. Only once that has happened we can work on adding layered keyframe animation workflows. And then we have a basis for other animation data types, such as the ā€œID chooserā€ (working title).

3 Likes

So you want to convert GP that has Claypencil to Mesh, but also keep whole animation (which might have different number of verts each frame, rights?)

Animating object data is possible with Keymesh, I have made baking operators for it. This is the use-case Iā€™m interested in. Text me on chat with some examples and I can make it work.

2 Likes

yes i know thisā€¦ i develop part of keymesh :slight_smile:

1 Like

The idea is to have different mesh data (with different number of points) and be able to animate. I did part of Keymesh add-on and then create the replacement of this add-on name ā€œClaymationā€. Iā€™m working with Daniel M. Lara y Matias Mendiola in this project and we have seen the use of an add-on has limitations, so this is the reason why we want to move this logic to ā€œcoreā€ Blender using datablock animation.

1 Like

Yes, I know, itā€™s not something that will be done in the near future, I just mention it to include it in the future vision of animation systems. Thank you for considering it as a medium-term project.

1 Like

A step into direction of edit poly modifier. Nice to see instancing mechanics will get some attention.

2 Likes

Is this so it can be exported to Godot ?

Forgive me if this seems a bit naive, but regarding the ā€œkeep instancesā€ part, has it been considered making instances editable as an object type, like meshes and curves ? since instances can already exist inside a single object through geometry nodes, I figured this could overlap with the ā€œsingle object typeā€ project, instances being yet another type added to the list. This way the operator could be made a little less destructive by not requiring the creation of a bunch of objects.

I donā€™t make games though, so this might be ill-advised anyway. Maybe you do want separate objects for export purposes.

2 Likes

This is exaclty what the ā€œPoint Cloud Instanceā€ topic refers to. So yes, it has been considered, but we donā€™t want to make it blocking for us to get this feature in.

1 Like

I see, I didnā€™t realize thatā€™s what this was. Great program !