3
$\begingroup$

I'm trying to Map a country flag on a sphere and I have some difficulty.

enter image description here

As you can see the flag isn't place as i wanted. You can see two circle around the ball to help me how to explain what I would like to do.

I would like the blue of the French Flag taking part all the left side on the sphere, the white in the middle, and the red right side of the sphere, but we can see that the flag image is beginning by the top of the sphere as a central point and that's not what I'm looking for.

I would really like the flag normally showing on the sphere for the back and front.

How can I do this?

$\endgroup$
0

4 Answers 4

5
$\begingroup$

That is because by default this is how the UV sphere is UV unwrapped. Open the UV Editor in another window and compare the selected faces with what is shown in the UV editor.

enter image description here

You can either UV unwrap the faces again by pressing U in 3D Viewport Edit Mode with the selected faces OR you can do it the easier way by selecting the faces in Edit Mode you want to adjust, then selecting the faces in UV Editor and then just moving, scaling, rotating the faces in the UV Editor to project them onto the color you want.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Thanks a lot bro worked perfectly :D $\endgroup$
    – Retedx
    Commented Apr 25, 2022 at 16:42
4
$\begingroup$

This can be done entirely in the shader, you don't need any UVs or image at all.

You would have to map the object coordinates you get from the node Texture Coordinate and put them into a ColorRamp.

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ Thanks also for this method : D, I'm gonna try it for simple flag, but could not work flag like USA $\endgroup$
    – Retedx
    Commented Apr 25, 2022 at 16:42
  • 1
    $\begingroup$ @Retedx A USA flag would look pretty stupid on a sphere, though, in my opinion, no matter what method is used to map it ;-) $\endgroup$
    – quellenform
    Commented Apr 25, 2022 at 17:51
  • 1
    $\begingroup$ i was thinking of this possibility too but at the same time thought that maybe the next flag to be projected wasn't a simple striped flag XD $\endgroup$
    – Harry McKenzie
    Commented Apr 26, 2022 at 0:32
  • $\begingroup$ ahahah guys, it's because im working on a project but i've find a solution with texture coordinate, and others for more complicated thing $\endgroup$
    – Retedx
    Commented Apr 27, 2022 at 16:32
2
$\begingroup$

Instead of using Unwrap for texture mapping, put the camera in the orientation you want and then use the Project From View command. This will align the texture onto the sphere exactly the way the sphere is displayed in the viewport when you run the command. As if you took the flag picture and pasted it onto the viewport.

You may still need to move or scale the UVs in the UV editor, but since they will already be the right shape, you won't have to edit individual faces as in Harry's answer.

No pictures unfortunately as this answer is written from memory!

$\endgroup$
1
  • $\begingroup$ Gonna try this methoid and let you know, thx a lot :D $\endgroup$
    – Retedx
    Commented Apr 25, 2022 at 16:43
2
$\begingroup$

Generated Texture coordinates

Switching to generated texture coordinates seems to do the trick. This should also work with other flags.

$\endgroup$
0

You must log in to answer this question.

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