How to map texture along tube - cycles

Hi Guys having trouble mapping a texture along a tube, or spiral.

Need to do this without uV mapping just with material nodes.

Heres what i have so far…but cant change the scale of texture

I’m using object as the texture co-ordinate , and guess this is where the problem is, but cant get the texture to map along the spiral with any of the other input settings…


can you upload the file

might be posible if you change scale and rot in map node

salutations

Why do you need it done without UV-wrapping? As far as I know, there’s no real easy way to map a texture to a curve otherwise. To do what you want quickly and easily would require a new curve-based mapping feature and/or the ability for modifiers to affect the coordinates.

Theoretically, it might be possible to use a node setup or vertex color channels to change the texture’s rotation in different parts of the curve (ie. changing the coordinates directly so as to be done in a seamless way), but setting it up might become a bit more complex as a result. (As I’m not sure if its possible to get information regarding the direction that the faces are flowing in).

Thanks for the replies.

It used to be possible with blender internal renders, maybe it can follow the normals somehow as they all orientate at 90 degrees from the mesh?

Why no UV mapping? I have no clue how you would unwrap a spiral to get a texture to map to it, and guess it would be very very time consuming and would have to be done for every unique spiral you create…

Errr… Are these options only in Blender 2.66?


With these 2 options, I get a useful UV map for my curve --which can’t be unwrapped since it’s only generated geometry. And I did this:


(The texture used on the curve is just a blurry horizontal bar on a black background.)


you don’t really need an image just add a band texture!
and no need for uv just use object mapping!

happy cycles

If I may… Totally irrelevant! Besides, since the OP uses a texture, I give him a solution with a texture.

1 Like

Cheers that works Kaluura, though it breaks if you convert the curve to a mesh, but thats not a problem for now…

cheers
jon

Just to add here, an easy way to unwrap a mesh consisting of long lines of quads such as a curve is to select all of the faces, reset the UVmapping, then select a face to be the active one, and select ‘follow active quads’. An alternative is to use the ‘unwrap’ option after creating a seam that goes along the length of the tube and around each end.

RickyBlender; Look at your image again, do you notice how the bands are going with the geometry rather than across in some places, that’s not going to work when you compare it to Kaluura’s solution.

i see only 2 locations which are a little stretch
but it uses proc texture only

do you a better way to get it smoother ?

would be nice

happy cycles