# Create a illumination light on a tree in procedural?

## Recommended Posts

Hi guys, I'm currently finding a way to create an illumination light with cable on a tree in procedural. My personal goal is to make like the pictures that I attached here.

Does anyone have a great idea?  Especially, I would like to figure out how to create the spiral curve along with a tree shape.

Thanks!

##### Share on other sites

I would look into making a helix out of a curve. If your tree model has a skeleton or curve as a base I would use them otherwise you will have to make the curves manually. I think there are also some forum posts here on making a skeleton out of 3d geometry.

##### Share on other sites

Hey Haya,

you could shift (and sine wave) the surface distance based on the surface orientation:

```vector perp = normalize(cross(v@gradient, v@N));
float angle = atan(perp.z, perp.x) / 2.0 + M_PI_2;
f@wave = sin((f@dist + angle * shift) * freq);```

Edited by konstantin magnus
• 2

## Create an account

Register a new account