cylindrical - spherical mapping in Cycles without UV?

is there in cycles no basic spherical or cylindrical mapping?

Just for fun, I’ve made the cylindrical projection. The sphere projection could follow the same logic. :slight_smile:


Oh boy, how did you figure this out?

A bit of trignometry and algebra :slight_smile:
The y axis is just the object z coord ( the add and multiply are just to change the values from [-1,1] to [0,1])
The x axis is the found by transforming the x and y coordinates from the object into an angle ( Arctan(x/y) ). The messy nodes after ArcTangent are just because cycles returns values from [-PI,PI], and we need values from [0,1].

oh je das uebersteigt meinen Horizont.

I followed your nodes but as you can see the dot texture turns into a square something …

Any idea what to do? Is there a way to use mapping with this and say hey tile this texture 4 times to make
the bump smaller?


there’s a small error in your node setup… before the Arctangent node, it should be a division of R by G.

it should work as expected with this changed. :wink:

I’ll try to make a Spherical projection if someone needs it. :slight_smile:

can you give the math model you are using!

would be nice to complete this thread and have also the spherical one

nice work

happy bl

ah I see

the spheres are there but some are stretched look at the screen shots


strange… are you using the same texture file you posted on the osl thread? I’ve notice the texture is not tileable which produces some seams.

About the stretching, this projection will depend on the origin of the object. Maybe your object has the origin a bit offset?
(the same would probably happen if you change to the BI and test if the cylinder projection there produces the same results!)

And for scaling the texture,… you can simply use the Mapping node between the projection nodes and the texture. :slight_smile:

Found my error :slight_smile:
here’s the corrected version, and also the spherical projection.


Just a quick thought: to make object origin not matter you could subtract Object Info -> Location from the coordinates :wink:

@Stan Pancakes… Good point!! but oddly, we must ADD the ‘Object’ coordinates to the ‘Location’ vector, instead subtracting them. :slight_smile:

Edited: Actually (I’ve made some test in this regard), there’s no way to solve the object origin problem!!!
Not in the shader anyway (we would still need to find the medium point of all the vertices, and that can’t be done in shaders). But it’s easily done by ‘Object>Transform>Origin to Center of Mass’ or whaterver we want.

Oh dear, I was all the time not realizing that I used the wrong image hahaha which is not seamless.

Works pretty flawless - well considering the texture distortion but this is not a procedural map anyway.

For a quick hack to simulate some over molded and textured rubber this is fantastic!

Thank you so much!


I noticed one problem, the mesh size (distance away from the Z axis along Y and X) seems to have an influence.

Any idea how to prevent this? I just scaled in edit mode the mesh along all directions so the pattern should stay the same
and not get stretched based on the scale.



I’m going to look into that…

Ok, after a few tests here’s what it’s need to be changed:

the input to the first SeparateRGB should come from the following setup instead from ‘Object’ coordinates:

I am not even going to ask to explain why you did this and how and ah crazy my brain explodes.

Works fantastic!

Vielen Dank fuer die Hilfe!

I would SOOO like to have “mapping primitives” built in. We only have that box thing showing, but I’d really like the whole lot:
Parallel, Box (with fade), Spherical, Cylindrical, Disk, Conical, Pyramid (think projector image). Using this, we could now access/modify the coordinates of these special 3D projections directly in the nodes.

Okay, so maybe it can be done somehow, but what I’m used to think of as a trivial thing should not have to be this complex to pull off.

is it suppose to work with simple procedural texture
did a test but may be I have wrong set up !

thanks

@CarlG most of the projection mappings can be constructed with nodes in cycles… with allmost no expence of processor time as they were builtin.

@RickyBlender these node setups are mainly for bitmap or other 2d textures… procedurals, can be 2D or 3D, and the late don’t need projections at all, only scales.

The main issue involves view-dependent projections, and that is something that cycles is not very eficient at. (specially after the 1st bounce :expressionless: )