Blender Git Loki

Git Commits -> Revision 0d58eab

Revision 0d58eab by Jacques Lucke (master)
December 15, 2020, 11:42 (GMT)
Geometry Nodes: support evaluating mesh object to geometry set

This implements the design proposed in T83357.

The goal is to allow the geometry nodes modifier on mesh objects to
output instances and potentially other geometry types. Both problems
are tackled by allowing mesh objects to evaluate to a geometry set,
instead of just a single mesh id data block. The geometry set can
contain a mesh but also other data like instances and a point cloud.

I can't say that I'm sure that this commit won't introduce bugs. Mainly
the temporary object creation during rendering seems a bit brittle.
BUT, we can be reasonably sure that this commit will not introduce
regressions (at least not ones, that are hard to fix). This is because
the code has been written in a way that minimizes changes for existing
functionality.

Given that we intend to hide the point cloud object for the next release,
we won't even have to worry about temporary object creation for now.

An important part of the technical design is to make sure that
`ObjectRuntime->data_eval` contains the same data before and after this
patch. This helps to make sure, that existing code paths are impacted as
little as possible.

Instead of fully replacing `data_eval`, there is `geometry_set_eval`,
which contains all the geometry components an object evaluated to
(including the data referenced by `data_eval`).

For now, not much code has to be aware of `geometry_set_eval`. Mainly
the depsgraph object iterator and the instances system have to know
about it.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D9851

Commit Details:

Full Hash: 0d58eabee620cc534fab075764a83f5a328100c1
Parent Commit: d8db5cb
Lines Changed: +143, -21

4 Modified Paths:

/source/blender/blenkernel/intern/DerivedMesh.cc (+89, -10) (Diff)
/source/blender/blenkernel/intern/pointcloud.cc (+29, -3) (Diff)
/source/blender/depsgraph/intern/depsgraph_query_iter.cc (+18, -4) (Diff)
/source/blender/makesdna/DNA_object_types.h (+7, -4) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021