11
$\begingroup$

Cycles now supports Sphere mapping for image textures - but how do I increase the scale of the image (so that it gets repeated)?

If I use a mapping node and increase the scale like I normally would, the texture gets all distorted.

enter image description here

Both the cube and the sphere are using the same image texture, with a Mapping node between the Texture Coordinate and Image Texture nodes. The Scale of the Mapping node is animated from 1.0 to 5.0. The cube's texture is using UVs with the image node using the default 'Flat' projection. The sphere's texture is using Generated coordinates with the image node's projection set to 'Sphere' (as in the screenshots below).

Scale = 1: scale = 1

Scale = 2.5: scale = 2.5

This is the desired result, which was made by manually repeating the image texture in Gimp:

desired result

I would also like to be able to scale it only on the X-axis so that it does not appear so stretched in the middle.

$\endgroup$
  • 2
    $\begingroup$ I think you should be scaling down ?! $\endgroup$ – Chebhou May 5 '15 at 17:37
  • $\begingroup$ Maybe scaling the sphere up is what he's talking about... idk. $\endgroup$ – Scalia May 5 '15 at 18:17
  • $\begingroup$ @Chebhou also distorted. $\endgroup$ – Greg Zaal May 5 '15 at 18:21
  • $\begingroup$ Added a gif to explain better. $\endgroup$ – Greg Zaal May 5 '15 at 18:45
  • $\begingroup$ @Chebhou When using the 'Point' vector type on the Mapping node, scaling up has the same effect as scaling down with the 'Texture' vector type. $\endgroup$ – Greg Zaal May 6 '15 at 4:23
13
$\begingroup$

The problem is that the texture coordinates node is not outputting a UV coordinates it is a genereted 3D coordinates ranging from 0 to on each axis ( X,Y and Z ) and since the Sphere mapping is not linear like the cube , scaling these coordinates will not get the desired result.
instead of manipilating the 3D generated coordinates I extracted the UV coordinates from the sphere projection and used this as a UV coordinates for the real image which is mapped using Flat projection.
extracting the UV coordinates from the Sphere projection is done by two gradiant image texture ( black to white direction is the same as the U and V axis direction )

here is the node setup :

enter image description here

Now you can manipulate the texture mapping as you want :

enter image description here

Note : you can eliminate the need for two image texture nodes in the first stage by using one image with red gradient ( horizontal) and a green gradient ( vertical ) in one image

first image : used for U axis

enter image description here

second image : used for the V axis

enter image description here

$\endgroup$
  • 1
    $\begingroup$ very clever work around. $\endgroup$ – David May 5 '15 at 23:12
  • 1
    $\begingroup$ That is genius! A bit of a pain, but nothing a little node group can't handle $\endgroup$ – Greg Zaal May 6 '15 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.