Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-02-04Geometry Nodes: new Is Viewport nodeJacques Lucke
This node outputs true when geometry nodes is currently evaluated for the viewport and false for final renders. Ref T85277. Differential Revision: https://developer.blender.org/D10302
2021-02-03Geometry Nodes: Multi-Input SocketsFabian Schempp
Normally sockets only have one input link. This commit adds the back-end changes needed to use multiple input links per socket. Multi-input sockets can be defined with a new flag in `bNodeSocketType`. The changes necessary to make the sockets work in the geometry nodes evaluator are generalizing input socket values as a vector of values, and supporting this in the derived node tree structure. This patch should contain no functional changes. Two upcoming patches will use this system for the "Join Geometry" node and expose link picking and updated display in the UI: D10069 and D10181. Reviewed By: Jacques Lucke, Hans Goudey Differential Revision: https://developer.blender.org/D10067
2021-02-03Geometry Nodes: Add Collection Info NodeSebastian Parborg
Implements a node to get collection objects. These objects are then passed along as instances in the node tree. Follow up tasks: Multiple nodes does not support instancing yet: T85159 Changing collection offset does not trigger a refresh: T85274 Reviewed By: Jacques, Dalai, Hans Differential Revision: http://developer.blender.org/D10151
2021-02-02Blenkernel: Move node.c to C++Hans Goudey
Required changes to compile `node.cc` with clang tidy: * Use c++ includes like (e.g. climits instead limits.h). * Insert type casts when casting from `void *`. * Replace `NULL` with `nullptr`. * Replace typedef statements. This change is in order to use the `blender::Map` data structure for node error messages.
2021-01-29Merge branch 'blender-v2.92-release'Clément Foucault
2021-01-29EEVEE: Fix GPUNodeLink memory leak for displacement nodes using SHD_SPACE_WORLDMichael Möller
When the displacement space is set to SHD_SPACE_WORLD, the GLSL method "node_displacement_world" is used instead of the "node_displacement_object" method. The two GLSL methods: ``` void node_displacement_object( float height, float midlevel, float scale, vec3 N, mat4 obmat, out vec3 result) { N = (vec4(N, 0.0) * obmat).xyz; result = (height - midlevel) * scale * normalize(N); result = (obmat * vec4(result, 0.0)).xyz; } void node_displacement_world(float height, float midlevel, float scale, vec3 N, out vec3 result) { result = (height - midlevel) * scale * normalize(N); } ``` In contrast to the "node_displacement_object" method, the "node_displacement_world" does not require an "obmat" parameter. Attempting to still pass "GPU_builtin(GPU_OBJECT_MATRIX)" as additional parameter will result in a memory leak. The "GPUNodeLink" allocated in the "GPU_builtin" method will never get released. Fixes T83941 Memory leak when using the Displacement shader node in Eevee with the displacement space set to "World Space"
2021-01-29Merge remote-tracking branch 'origin/blender-v2.92-release'Dalai Felinto
2021-01-28Fix T85157: join node not working when the second mesh is emptyJacques Lucke
The issue was that the `offset` in `dst_span[offset]` was out of bounds when the domain size is 0. The fix is to simply skip copying attributes in that case.
2021-01-27Fix incorrect RNA enum defaultHans Goudey
Also another copy and paste error in the attribute compare node.
2021-01-26Geometry Nodes: Support all operations in the "Attribute Math" nodeHans Goudey
This adds the ability to use all the math operations in the regular utility "Math" node. The code is quite similar to the attribute vector math node, with the simplification that the result is always a float. Differential Revision: https://developer.blender.org/D10199
2021-01-26Fix T85049: Geometry Nodes: How to handle instances with shear? (part2)Sebastian Parborg
Update to changes in master. Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10211
2021-01-26Merge branch 'blender-v2.92-release'Sebastian Parborg
2021-01-26Fix T85049: Geometry Nodes: How to handle instances with shear?Sebastian Parborg
Use transform matrices instead of loc, rot, scale variables to store instance transforms. Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10211
2021-01-26Geometry Nodes: new Points to Volume nodeJacques Lucke
This implements a new geometry node based on T84606. It is the first node that generates a `VolumeComponent`. Differential Revision: https://developer.blender.org/D10169
2021-01-26Geometry Nodes: Use highest complexity attribute in join nodeHans Goudey
This just implements a todo with a utility function that didn't exist at the time. For example, if one geometry has a "scale" attribute with a float type and another has a "scale" attribute with a vector type, the vector type will be used for the resulting geometry. Differential Revision: https://developer.blender.org/D10206
2021-01-26Merge branch 'blender-v2.92-release'Robert Guetzkow
2021-01-26Fix T84907: incorrect dirty mask after geometry join nodeJacques Lucke
Hans noticed that these dirty flags are only used for normals currently and that the edge flag is not used at all. This patch still applies the "entire" fix with all four flags. Differential Revision: https://developer.blender.org/D10193
2021-01-26Geometry Nodes: Add float2 to attribute complexity mapHans Goudey
2021-01-22Functions: use better conversion from float2 to float3Jacques Lucke
Previously float2 was converted to float3 by implicitly converting to a float pointer first, which was then passed to the float3 constructor. This leads to uninitialized memory in the z component of the new float3. Ideally this should be solved in float2/float3 itself, but my first fix for that resulted in a compile error: rB6ac0a3d83c8e5a39bd5356aa0d68e3166bd91e82 This is an alternative fix that can be used for now. Will have to look into the conversion in more detail again.
2021-01-22Cleanup - Point Instance: Use own DNA structDalai Felinto
We will need to expand this node soon to add weight/count for different elements inside the collection. For that it is better to have the node to use its own DNA.
2021-01-21Geometry Nodes: new Attribute Sample Texture nodeJacques Lucke
This node allows sampling a texture for every vertex based on some mapping attribute. Typical attribute names are the name of a uv map (e.g. "UVMap") and "position". However, every attribute that can be converted to a vector implicitly is supported. It should be noted that as of right now, uv map attributes can only be accessed after a Point Distribute node. Ref T82584. Differential Revision: https://developer.blender.org/D10121
2021-01-21Merge branch 'blender-v2.92-release'Sebastian Parborg
2021-01-21Fix T84867: Transform node applies transforms in the wrong orderSebastian Parborg
2021-01-21Geometry Nodes: initial support for volumesJacques Lucke
For the most part, this just adds boilerplate code for volume support in geometry nodes: * Add `VolumeComponent` next to `MeshComponent`, etc. * Support `VolumeComponent` in depsgraph object iterator. Furthermore, I added initial volume support in a few nodes: * The Object Info node outputs an object instance when the input is a volume object (that will be the same for mesh objects soonish, to avoid copies). * Support transforming a `VolumeComponent` in the Transform node. * Support the `VolumeComponent` in Join Geometry nodes, but only when just one of the inputs has a volume component for now. Right now, there is no way to create a `VolumeComponent`, because the Object Info node outputs an object instance. The `VolumeComponent` will be necessary for upcoming nodes, which will generate volumes on the fly. Viewport selection does not work correctly with `VolumeComponent`s currently. I don't know why that is. That can be figured out a bit later, once we can actually create new volumes in geometry nodes. Ref T84604. Differential Revision: https://developer.blender.org/D10147
2021-01-20Merge branch 'blender-v2.92-release'Sebastian Parborg
2021-01-20Fix T84867: Transform node does not rotate/scale instancesSebastian Parborg
The manipulation of rot/scale was simply not implemented.
2021-01-20Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-20CMake: add missing headersCampbell Barton
Resolves 'cmake_consistency_check' reports.
2021-01-20Cleanup: Use const arguments, explicit typeHans Goudey
2021-01-19Merge branch 'blender-v2.92-release'Sebastian Parborg
2021-01-19Geometry Nodes - Object Info: option to apply obj transform to the geometryDalai Felinto
By design the modified object transformations should still work and affect the geometry nodes results. The current behaviour, however, would make the geometry from the object info to not be affected by the modified object transformations. This patch changes that by default. In a similar fashion the Location, Rotation and Scale sockets outputs should be aware of whether the output should be in the global space or in the space of the nodetree. To solve this, the patch introduces a new transformation space "enum" where users can pick "Original" or "Relative" space. Original -------- Output the geometry relative to the input object transform, and the location, rotation and scale relative to the world origin. Relative -------- Bring the input object geometry, location, rotation and scale into the modified object maintaining the relative position between the two objects in the scene. Relative space violates a bit the design of the nodetree. The geometry in this case is transformed so that moving the modified object doesn't interfere with the geometry. This is particularly useful for the boolean node for instance. "Original" is the default space, but old files are set to "Relative" for backwards compatibility. Differential Revision: https://developer.blender.org/D10124
2021-01-19Geometry Nodes: pass depsgraph to nodes during executionJacques Lucke
The depsgraph will have to be accessed in an upcoming patch.
2021-01-16Merge branch 'blender-v2.92-release'Hans Goudey
2021-01-16Fix T84713: Geometry nodes reroute sockets have incorrect typeWannes Malfait
This implements the node tree update function, which is needed so that the reroutes get updated to the correct type. It is based on the same code in the shader and compositor node trees. Differential Revision: https://developer.blender.org/D10123
2021-01-15Merge branch 'blender-v2.92-release'Hans Goudey
2021-01-15Geometry Nodes: Use a default value in the point scale nodeHans Goudey
This commit adds the ability to provide a default value to `attribute_try_get_for_output` and uses it for the `Point Scale` node, which is important because the node uses multiplication. The idea is to keep "name-specific" functionality in nodes rather than in the attribute API, otherwise the complexity will be hard to keep track of. So this fix doesn't apply to the Attribute Vector Math node, but hopfully that is okay since that's now a lower level node for this purpose anyway. Differential Revision: https://developer.blender.org/D10115
2021-01-15Geometry Nodes: transfer corner and point attributes in Point Distribute nodeJacques Lucke
If the mesh has any corner or point attributes (e.g. vertex weights or uv maps), those attributes will now be available on the generated points as well. Other domains can be supported as well. I just did not implement those yet, because we don't have a use case for them. Differential Revision: https://developer.blender.org/D10114
2021-01-14Geometry Nodes: add implicit conversions for float2 and othersJacques Lucke
Some of these conversions are arbitrary to some degree. However, the user experience is better when at least something happens when converting between types, instead of just getting zeros. I left out a few conversions that I wasn't sure about yet. I also added conversions for float2.
2021-01-14Merge branch 'blender-v2.92-release'Jacques Lucke
2021-01-14Geometry Nodes: don't delete existing attribute before new attribute is computedJacques Lucke
This fixes the behavior of some nodes when the same attribute name is used for input and output. If both attributes have a different type, they can't exist at the same time. Therefore, the input attribute has to be removed in order to create the output attribute. Previously, the input attribute was remove before it was used in any computations. Now, the output is written to a temporary buffer and only later saved in the geometry component. This allows both attributes to coexist within the node. The temporary attribute is only create when necessary. The normal case without name collisions still works the same as before. Differential Revision: https://developer.blender.org/D10109 Ref T83793.
2021-01-14Merge branch 'blender-v2.92-release'Sergey Sharybin
2021-01-14Geometry Nodes: extract function for adding attributes in distribute nodeJacques Lucke
This shouldn't have any functional changes.
2021-01-14Geometry Nodes: output color from Attribute Color Ramp nodeJacques Lucke
The other output types did not work currently anyway. There is not a significant benefit in somehow deducing the output attribute type from the existing attribute types.
2021-01-13Geometry Nodes: Add "Point Translate" and "Point Scale" nodesHans Goudey
The translate node moves every point in the geometry, and the scale node multiplies the "scale" attribute of the input geometry by its input. While these operations are already possible with the "Attribute" nodes, these new nodes fit nicely with the nodes specifically for changing the "rotation" attribute that already exist, and they provide a simpler way to do the same thing. Differential Revision: https://developer.blender.org/D10100
2021-01-13Geometry Nodes: Rename "Rotate Points" to "Point Rotate"Hans Goudey
This is consistent with the other node names, giving (almost) all of the nodes in the "Point" category the same prefix.
2021-01-13Geometry Nodes: Rename boolean input socketsHans Goudey
"Geometry A" becomes "Geometry 1", just to be more consistent with other nodes.
2021-01-13Geometry Nodes: improve Point Distribute nodeJacques Lucke
This greatly simplifies the Point Distribute node. For a poisson disk distribution, it now uses a simpler dart throwing variant. This results in a slightly lower quality poisson disk distribution, but it still fulfills our requirements: have a max density, minimum distance input and stability while painting the density attribute. This new implementation has a number of benefits over the old one: * Much less and more readable code. * Easier to extend with other distribution algorithms. * Easier to transfer more attributes to the generated points later on. * More predictable output when changing the max density and min distance. * Works in 3d, so no projection on the xy plane is necessary. This is related to T84640. Differential Revision: https://developer.blender.org/D10104
2021-01-13Geometry Nodes: cleanup attribute usageJacques Lucke
Now that typed attribute wrappers don't need to own the attribute anymore, many `std::move` calls can be removed.
2021-01-13Compositor: "Save as Render" for the file output nodeRobert Guetzkow
This commit adds the "Save as Render" feature to the file output node, that allows to disable the application of the configured view transform and other color management settings on the image. If disable it uses the standard view transform instead. This feature was originally suggested in T83842 and is part of the color management improvements task in T68926. With this feature it is possible to toggle the application of the color management settings for each input socket of the File Output node individually. Reviewed By: brecht Maniphest Tasks: T68926, T83842 Differential Revision: https://developer.blender.org/D9921
2021-01-12Geometry Nodes: Output the most complex attribute data typeHans Goudey
In order to avoid losing information, it sometimes makes sense for the output attribute type to depend on the types of the input attributes. Such a function already exists, `attribute_data_type_highest_complexity`, it just needs to be used in a few more places. The change for the attribute compare node is just so the code there uses the same code style as in the attribute mix node. Addresses part of T83793 Differential Revision: https://developer.blender.org/D10099