Page MenuHome

Geometry Nodes: Add Simple Subdivision node
ClosedPublic

Authored by Eitan Traurig (EitanSomething) on Feb 12 2021, 7:48 PM.

Details

Summary

Add the Simple subdivision option to Geometry nodes. It was added as a new node instead of part of the existing subdivision node because of future backend changes to the Simple option. (See T85584)

Diff Detail

Repository
rB Blender
Branch
simple_subdivision (branched from master)
Build Status
Buildable 12868
Build 12868: arc lint + arc unit

Event Timeline

Eitan Traurig (EitanSomething) requested review of this revision.Feb 12 2021, 7:48 PM
Eitan Traurig (EitanSomething) created this revision.

Do we really need OpenSubdiv for the simple subdivide mode?

source/blender/nodes/geometry/nodes/node_geo_simple_subdivision_surface.cc
113

Remember to remove dead code.

Eitan Traurig (EitanSomething) marked an inline comment as done.Feb 12 2021, 8:47 PM
  • Remove unnecessary Use Crease option
Eitan Traurig (EitanSomething) edited the summary of this revision. (Show Details)
  • Remove unnecessary Boundary Smooth and Smooth UVs options.

Wouldn't it be better to call it "Subdivide"? Similar to Edit Mesh tool.

Hans Goudey (HooglyBoogly) requested changes to this revision.Feb 17 2021, 5:34 AM

Pretty close! Since I think Dalai mentioned a while ago that there were some different plans for simple subdivision (don't remember details?), maybe it's best if we quickly run this idea by @Sergey Sharybin (sergey).

source/blender/nodes/NOD_geometry.h
55

Words in function names (and variable names) should be ordered from least to most important.

register_node_type_geo_simple_subdivision_surface -> register_node_type_geo_subdivision_surface_simple

source/blender/nodes/NOD_static_types.h
274–276

We just add new nodes at the bottom here, in the same order as the definitions of GEO_NODE_*

This revision now requires changes to proceed.Feb 17 2021, 5:34 AM

@Hans Goudey (HooglyBoogly), the idea was to move simple subdivision type from the Subdiv modifier and have it as a dedicated modifier. The reason for that is that then it is possible to use faster for the specific task BMesh based implementation. We really shouldn't use OpenSubdiv for simple subdivision, as it leads to a huge amount of computational overhead.

@Sergey Sharybin (sergey) Thanks!

@Eitan Traurig (EitanSomething), do you want to take that on? It means that this node could look more like the MESH_OT_subdivide operator. It would have to convert mesh to BMesh first of course.
I would also be fine with saving that for a future improvement, I don't have a strong opinion.

I don’t have enough time to take it on at the moment

  • Rename simple_subdivision_surface to subdivision_surface_simple

Should I rename node_geo_simple_subdivision_surface.cc to node_geo_subdivision_surface_simple.cc

Eitan Traurig (EitanSomething) marked 2 inline comments as done.Feb 17 2021, 3:36 PM

Should I rename node_geo_simple_subdivision_surface.cc to node_geo_subdivision_surface_simple.cc

Yes, same with the node type define.

  • rename node_geo_simple_subdivision_surface.cc to node_geo_subdivision_surface_simple.cc

Nice and simple now, looks good to me and works well.

This revision is now accepted and ready to land.Feb 19 2021, 8:12 PM

Oops, I forgot to add "Differential Revision:" in my commit