2
$\begingroup$

I'm trying to be able to draw continents on a planet and then move them around to figure out plate movements. I'm using blender because I want to be able to work on a sphere to better visualize how the plates would interact and move.

So, is there a way to move what I've drawn in texture paint around the sphere without distorting it?

I've managed to move it using a texture coordinate and mapping node but it causes a lot of distortion (I imagine it's just moving the flat texture). It looks like you can rotate things normally if you use an environment texture but I can't figure out if it's possible to actually texture pain onto an environment texture. Also they don't have an alpha channel so it's hard to create a transparent layer to paint on top of other layers.

This is my current setup which allows me to draw and erase without affecting the reference image.

Node setup

Cheers for any help.

$\endgroup$
6
  • $\begingroup$ Hello it should work fine, not sure why it doesn't work, we need more informations, you can put a continent over a transparent background and move it with the Location values of the Mapping node, maybe show your current earth object, also a storyboard of what the movement is supposed to be, etc? $\endgroup$
    – moonboots
    Mar 5 at 7:48
  • $\begingroup$ @moonboots Moving them around with the Location values will not work properly... see the last paragraph of my answer (well, not really an answer though, more a kind of explanation why this is problematic with texture painting). $\endgroup$ Mar 5 at 8:51
  • $\begingroup$ @Tamrak My answer might not seem as if I understood correctly what you want to do, but I know or guess you do not want to paint on or move an existing planet texture, but paint parts (continents) on a transparent texture which you then want to overlay and rotate on the sphere. But they will suffer from the same problems I explain in my example with the existing world map texture. $\endgroup$ Mar 5 at 9:08
  • 1
    $\begingroup$ My recommendation for how to handle this would be, use alpha textures with multiple spheres, very slightly displaced, and just actually rotate the spheres. When you're happy with your final product, you can bake as many spheres as you want onto a single texture. $\endgroup$
    – Nathan
    Mar 5 at 15:16
  • $\begingroup$ @GordonBrinkmann Thanks for your comprehensive answer, It's really useful for helping me understand what's going on here. I see the problem is with texture paint it's self using the 2D map. You understood exactly what I'm trying to do though, trying to see how continents would have fit together in 2D is hard since when you move them there should be distortion applied but there isn't and it's hard to visualize how them move around the poles. $\endgroup$
    – Tamrak
    Mar 5 at 19:34

1 Answer 1

4
$\begingroup$

This is only a partial answer on how to get a texture rotating "normally" around a sphere and a bit of highlighting/analyzing the problems with texture painting in this case.

You don't need to use an Environment Texture on an object, this is as the name says intended for the environment.

You could set the projection method of the image to Sphere instead of Flat. This will look weird at first because by default the Image Texture node uses the UV map if nothing is plugged into Vector. So you need a Texture Coordinate node and plug the Generated output into the texture node.

If you then place a Vector Rotate node between the coordinates and the texture and (most importantly) set the Center to (0.5, 0.5, 0.5), you can choose whatever Type you want, Axis Angle, Euler or one of the XYZ axes to rotate the texture on the sphere's surface.

spherical projection

However, the problem with this is: Texture Paint uses the (2D) UV map to locate where on the (2D) image the paint will be appearing. The Sphere projection is 3-dimensional and oriented differently than the UV map (rotated by 90° clockwise on the Z axis) which means if you would now paint on some part of the sphere, the paint is actually not painted on the part of the texture you see there (although it is called Texture Paint) but on the faces and therefore it appears in those parts of the texture where the faces are located in the UV map:

painting on faces

Going into the UV Editor and selecting the faces where the red paint is on the texture, you can see in the viewport that they are indeed where I painted on the sphere:

location of uv faces

What you can do to match the area where you paint with the UV map (more or less, the UVs are slightly more distorted than the spherical projection) is select all faces in the UV Editor and then move them to the left by 90°, (which is 0.25 of 360°) by pressing G X -0.25 Return:

enter image description here

Now the paint appears where you are painting:

shifted uv map

Instead of shifting the UVs you could have rotated the coordinates by 90° on the Z axis with the Vector Rotate node, but no matter how you do it, this will not save you from more bad news coming up: this only works as long as you did not rotate the coordinates in any way with the Vector Rotate node. As soon as you rotate them (the more arbitrary, the worse) the UVs will be off again and apart from rotating on the Z axis, most of these rotations cannot easily be compensated for by moving the UVs.

What you always can do instead of painting directly on the sphere in Texture Paint mode and having to care for UVs and rotation etc. is opening the image in the Image Editor and switching this from the default View mode to Paint. Then you can paint on the texture where you want to paint and it will appear there and then also on the sphere in the place where you painted on the image. Note that a brush size of for example 30 px can be large for texture painting (because it's always 30 pixels in the viewport no matter how zoomed out or in) but maybe very small in the image editor, depending on the image because it will always be 30 actual image pixels. Of course all of this does not help if you want to explicitly paint on the sphere.

image editor paint mode

So all in all, this is not really a helpful answer, but perhaps it shows a little how you can rotate textures freely around a sphere while painting on it has its limitations.

And although you can move things around while using UV coordinates with the Location values of a Mapping node as @moonboots commented (you have to move them instead of rotating, since they are flat on a 2D plane: Z rotation would be moving on X, like my example above already showed), the problems there will occur when you try to move something over a pole for example - because as soon as you move something up or down with the Y location over the poles, it will suddenly appear on the opposite pole. Apart from that, moving up and down will result in stretching the texture since the faces have different dimensions on different latitudes.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .