0
$\begingroup$

I started with a UV sphere and wanted to subdivide it to different levels at different latitudes.

I selected the caps in Edit mode and hit P to separate, then selected the equatorial regions and hit P again. This left me with 3 meshes comprising 5 sections (north cap, north, equator, south, south cap).

I applied a subdivision surface at varying levels to each and applied them to yield new meshes. I selected them and hit ctrl-J in Object Mode to join them.

This left a few gaps so I added a Weld modifier.

(This is an Earth-scale mesh, the Weld distance parameter is 100 metres, which seems to be approximately the minimum I need to close all the gaps. A distance large enough to capture the gaps between the polar caps and the next section is large enough to swallow up some interior vertices in the equatorial section. This isn't ideal, but I don't see why it should cause the problems below.)

The resulting normals look weird to me

enter image description here

(I bumped up the contrast to make it more obvious)

If I slap a texture on it, the polar caps section (which has no subdivision) samples the texture correctly, but the subdivided regions are a mess.

enter image description here

What went wrong here?

$\endgroup$
3
  • $\begingroup$ I think you should explain the reason why you needed to subdivide at different levels. $\endgroup$
    – lemon
    Commented Mar 4 at 14:57
  • $\begingroup$ I want more resolution at the equator. $\endgroup$
    – spraff
    Commented Mar 4 at 15:02
  • $\begingroup$ What kind of texture mapping are you using? $\endgroup$
    – lemon
    Commented Mar 4 at 15:03

1 Answer 1

0
$\begingroup$

A couple things happened. If you want to know what modifiers are doing, it's often useful to apply them, maybe on a duplicate, and just look at the mesh they created in edit mode.

First, subdivision uses the whole mesh to create the curvature. By subdividing only a portion of the sphere, you haven't given the subdivision alogirthm any idea of the curvature at the margin. Let's look at the positions of a sphere separated then subdivided and compare with the positions of a sphere subdivided then separated:

enter image description here

In the middle they're the same, but not on the borders. This creates a discontinuity between the two sections. Here, it will show up as a discontinuity along a line of latitude.

Second, even if there wasn't this discontinuity, a subdivided mesh is enclosed by its base mesh like a cage (when convex), but not evenly throughout.

enter image description here

It is far from the original mesh at the original vertices, and near to the original mesh in the middle of the original vertices. When we merge by distance, this particular case will cause repeating ridges to show up throughout the mesh. Look at how it creates a repeating discontinuity, most visible at the silhouette:

enter image description here

Finally, and most importantly, merging by distance doesn't create a manifold mesh:

enter image description here

The big quad is joined, by a single vertex, two of the small quads. It is not at all joined to the other two small quads, and they're not joined to it. Merge by distance merges only vertices. It can't merge multiple vertices onto a single edge.

That means that some of these vertex normals are the product of apparently adjacent faces and some aren't. Where they aren't, it creates a sort of seam in the normals. Even if the subdivided vertices existed along the edge, there'd still be this seam in the normals.

As for the UV, it's due to the UV smoothing options in the "advanced" subsection of a subdivision modifier, and you can fix it by setting the UV smooth to "none".

You're asking "what happened," but knowing what happened doesn't help you do what you want, just that the technique you tried to get there will create problems. I suspect you want a sphere with even texel and vertex density that you can use for displacement with an equirectangular image. In that case, use a cube-sphere-- cube, subdivision, cast or to-sphere operation-- and give it a material that use its normal coordinates to read an environment texture:

enter image description here

A cube-sphere has the most even texel and vertex density we can get, while still subdividing well. (An icosphere can have perfectly smooth density, but doesn't subdivide well.)

You can't use this directly to displace (because displacement alters the normal coordinates used to read it) but you can use this material to bake to a UV texture and then use that baked texture to displace. Texture baking is well described elsewhere, including on this site, and I'm only guessing at your goals, so I won't get into it in this answer.

(There are tricks whereby we can get displacement on this without baking, but you don't want to get into anything tricky just yet.)

$\endgroup$

You must log in to answer this question.

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