Lollipop Candy Twist Problem with Generated Coordinates

I have this old file where I try to procedurally make a pinwheel candy/lollipop.

The very annoying and strange thing about this file is it always looks wrong when first opened but after turning various things on and off multiple times it eventually fixes itself. I think the file was originally made in version 2.80.

I have a cylindrical mesh and on that I use Simple Deform Twist.

With TwistWithout Twist

And then I wrap it around a spiral curve:
image

In hind sight I probably should have used UV texture coordinates to have the material follow the twisted mesh but instead I used Generated coordinates.

When the file is first opened the material is always wrong:
image

I know now that this is expected if using Generated or Object coordinates.

However, after much toggling of things on and off the Generated coordinates eventually, RANDOMLY, work perfectly:

image image

Yes these are using Generated texture coordinates!

Sometimes toggling the modifiers on and off fixes it. Sometimes changing the twist angle fixes it. Sometimes disconnecting and reconnecting Generated coordinates fixes it.

If I use UV mapping instead, it doesn’t work properly:
UV: Twist OffUV: Twist OnUV: Curve On

I can probably fix this by manipulating the UV map or the UV coordinates.

What I really want to know is WHY does using Generated Coordinates sometimes RANDOMLY WORK PERFECTLY?

Attached is the file saved in version 3.3.0 alpha so it could be compressed small enough to be uploaded here.

twist-nodes-WORKING TEMP2022.blend (1.7 MB)

I opened the original file in a text editor and saw BLENDER-v281RENDH on line one so I assume this strange behavior has existed since 2.81 all the way to the current alpha.

etc


lol, I only just now noticed in this old render that the white cracks in the candy coating are “swimming” through the surface due to using Generated instead of UV coordinates.

It would appear that Generated is the option you need, since it seems like it maps the model before modifiers (unlike Object). So the things should not “swim” as you bend the object and move the curve.

Opened your file with v3.1.2 with no problems - it looks exactly as it supposed to, I think

Object <> Generated

1 Like

Interesting. I’m guessing saving the file with a newer Blender somehow fixes something. The original 8mb file that I haven’t saved over since 2019 still opens looking incorrect in 3.1.2

One thing we need is the ability to obtain the dimensions of the object, so we can normalize the generated coordinates to prevent stretching.

it might be possible to use geometry nodes to get a measurement and export the value and then use that in the shader

Yeah I think just sending back the size of the bounding box might do the trick, but everything about that approach just screams no to me. Where are the integers and booleans in materials? Why is there still no “case select”? I thought the whole process was supposed to unify all this stuff, but there has been very little love towards material nodes.

1 Like