Procedural cactus texture

Hi,
I am trying to create a cartoony like texture for a cactus, but I am struggling to get the texture to follow the shape.

tbh I have no idea where to go from here… Help would be greatly appreciated.

Hi,

your best bet is to use UVs instead of object coordinates. Unwrap the cactus arm so that is looks straight, and the stripes will naturally follow its shape.

Thanks for that,
But I have tried it before I posted here, and my best result still shows a seam and also the lines are not spreading/branching out from the centre like it the first screenshot :confused:

image

You (probably) need topology like this:

Or you could just try baking the stripes with whatever topology and then curving the object…

1 Like


:slight_smile: thanks
Not very neat on the top but getting closer, had to start with a sphere and cut the bottom, otherwise getting the right uv is difficult.

any other ideas?
Going try and bake it now…

Baking provides decent result :slight_smile: thanks

2 Likes

I assumed your topology was “fan-like” at the tip of the arms but indeed if it’s not then you’re out of luck. Here is a solution that relies on geometry nodes to generate a vertex attribute for the grooves instead of relying on sampling coordinates. The attribute is then passed to the shader to switch between colors. I made a quick and dirty modifier interface to change some values, it’s not polished and it may not be what you want, but that’s one way of going about it

geonodes_cactus.blend (1007.8 KB)

2 Likes

Thanks so much for your time :slight_smile:
this is excellent, I will try and learn from it.

1 Like

Would you mind explaining how did you create the grooves output mask for the color?

It’s provided by the star primitive : the node has an output called “outer points” that I wired into the group output node so that it shows up in the modifier interface. From there you can give it a name and type the same name in the shader editor to call it

1 Like

Thanks so much

You’re welcome… I went a little further just for fun :


geonodes_cactus.blend (1.8 MB)

I’ll stop there but damn it’s really obsessing lol

Cheers,

Hadrien

4 Likes

Very slick! I love the resolution that basically can create instant LODs
grooves amount and depth, brilliant affort

I’m glad it helps ! I spent some time looking at pictures of saguaro cacti and damn, these things are more complex than they look at first glance… for one the arms “pinch” at the junction with the trunk. See :

There’s also some places where a groove appears to split into two grooves :

And the flowers looks absolutely amazing, but maybe not too hard to replicate in geonodes :

3 Likes

Cacti are wild, I didn’t get this one finished for nodevember, but I started working on a lil cactus for the “Green” Prompt

I ran into an issue with the orientation of the spine clusters then ran out of time, but it was getting there:

1 Like

So cool. What do you call “spine clusters” ?

On the reference img I was working off of, this particular type of cactus has the spines growing in clumps:


image

Alright I see. Can’t you just transfer the underlying mesh normal to set orientation ? Or is it more complicated than it appears ?

Wow… i saw the start of this and thought: hmm interesting… now i have a nice subject for studiying geo nodes but then i totally missed everything after the fourth post… i think i have to investgate the geonodes later… so @Hadriscus: I like the first even if not even looked at :wink: