Page MenuHome

Geometry Nodes: Curve Primitive Rose Curve
AbandonedPublic

Authored by Johnny Matthews (guitargeek) on Jun 22 2021, 9:59 PM.
Tokens
"Love" token, awarded by 3Rton."Love" token, awarded by duarteframos."Love" token, awarded by HEYPictures."Like" token, awarded by GeorgiaPacific.

Details

Summary

This node creates rose curves - https://en.wikipedia.org/wiki/Rose_(mathematics)

In addition to the 2d representation, a height value can make the curve grow in the Z direction.

whole K values create flower petal designs of K petals for off values of k and 2k petals for even values of k.

Diff Detail

Repository
rB Blender

Event Timeline

Johnny Matthews (guitargeek) requested review of this revision.Jun 22 2021, 9:59 PM
Johnny Matthews (guitargeek) created this revision.
Hans Goudey (HooglyBoogly) requested changes to this revision.Jun 23 2021, 5:32 AM

I'd like to have some feedback from artists here. Is this useful as a primitive included by default?
Personally I like it, it's very easy to make some beautiful shapes.
But I could also understand the argument that it's more of a thing to include in the official asset bundle, T55239.


Maybe there isn't, but I wonder if there is a word we could use for K. The single letter looks a bit out of place here.

source/blender/nodes/geometry/nodes/node_geo_curve_primitive_rose.cc
25

Using INT_MAX to store a float (the socket templates are specified with floats) causes a build error for me. Using FLT_MAX solves this for me. Yes, this is weird and hacky!

/home/hans/Blender-Git/blender/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_rose.cc:36:1: error: narrowing conversion of ‘2147483647’ from ‘int’ to ‘float’ [-Wnarrowing]

25

Also, I think I would put resolution at the top to be consistent with other nodes.

25

PROP_INT doesn't do anything here, neither does PROP_FLOAT above.

Not all PROP_* defines are supported here since support has to be added manually for nodes. Also, sometimes the names are confusing,
For example, PROP_FLOAT is part of the PropertyType enum, but PROP_DISTANCE is part of PropertySubType, which is what we support here sometimes.

43

Looks like this patch hasn't been formatted with clang format. I recommend setting up your editor to format when you save a file. It saves a lot of time!

51–54

Maybe I just really like making variables const, but here is an alternative: const int steps = cyclic ? resolution : resolution + 1;

This revision now requires changes to proceed.Jun 23 2021, 5:32 AM

I'd like to have some feedback from artists here. Is this useful as a primitive included by default?
Personally I like it, it's very easy to make some beautiful shapes.
But I could also understand the argument that it's more of a thing to include in the official asset bundle, T55239.


Maybe there isn't, but I wonder if there is a word we could use for K. The single letter looks a bit out of place here.

perhaps a polar equation node would make this more powerful (not unlike the polynomial node and an cartesian equation node)

After some discussion we decided not to pursue adding this node as part of the default primitives:

  • We already have two spiral nodes
  • Even though the result is quite pretty, the use case here is a bit specific
  • Future "curve from fields" or better attribute editing could make this easier in a more generic way.