I would need to see the problem to give a good answer as I'm not sure what 
I'm envisioning in my head matches what is being described.

Knowing how the sphere is modified is important.  Unfold tries to evenly 
distribute the texture space of the texture to match the topology while 
minimizing stretch/compression.   If the poles have elongated triangles, 
then that will obviously play into the distribution of the unfolded texture 
(in theory it shouldn't, but in practice it does).  One way to mitigate that 
issue is to add vertices and perpendicular edges at regular intervals along 
the elongated edges to closely match the spacing of other edges around the 
rest of the mesh, but that will have limited influence on the result and is 
more of a brute force technique.

Unfold is also a flawed tool as even simple cases come out distorted.  for 
example, get a primitive sphere and imagine it's the Earth.  Place a 
vertical UV seam down one side at the international date line, then two more 
seams at the arctic/antarctic circles.  Deselect the vertical edges 
connecting the circles to the poles.  Now unfold the mesh.  Notice the 
sphere is splayed in butterfly fashion, but one half is larger than the 
other and slightly off kilter in alignment with the texture editor.  The 
circle at one pole is often (but not always) larger than the other circle 
too.  These are the kinds of issues you'll battle, but on more complex cases 
they'll be too complex to solve without resorting to cleanup via 
pushing/pulling points to correct the flawed parts of the unfold.

However, let's put all that aside and look at the goal from the beginning 
and not the current situation which has a roadblock.

An equirectangular projection comes in a few flavors, but most are similar 
to a cubic projection.  The main difference is in how the top and bottom 
sides are projected.  Simple analysis of the problem would suggest one could 
take a cube and use Catmull-Clark subdivision smoothing to round it into a 
sphere.  That would accomplish nicer edge placement which closely match the 
meridians of the projection to handle (or fabricate) the texture space.  A 
single vertical seam from pole to pole (despite no physical poles) could be 
used to unfold and splay the sphere to accept/define the projection, but 
subtle details may need to be tweaked for a perfect match.

Alternately, use rendermap applied to a sphere to capture the external 
world.  The rendermap generated image should mimic an equirectangular 
projection. You may have to open the poles like the Earth without the 
arctic/antarctic circles, for example, to adjust the field of view for the 
rendermap process.  Invert the sphere's normals so rendermap points outwards 
into the world instead of inwards towards the sphere's surface....and of 
course, exclude self or make the material 100% transparent so it doesn't 
block the rendermap camera from seeing the world.  Since rendermap travels 
texel-to-texel along the geometry, a high resolution image and smooth 
surface are really important.  I'd encourage you to use a NURBS sphere with 
view dependent smoothing for best results.  you set those in the sphere's 
geometry approximations PPG.  Try setting length/distance/angle values to 
less than 2 degrees and 0.5 units, activate view dependent subdivision 
smoothing, and make sure the min/max subdivision limits are increased beyond 
the default 1,3 (well, just the max.  shouldn't have to go beyond 6).  If 
you get sawtoothing at the poles or faceting artifacts in the resulting 
texture, then it means your smoothing parameters are not set correctly.  The 
reason for using NURBS over polygons is the better interpolation of the 
shading normal between texels.  Rendermap is highly dependent on the shading 
normal orientation to determine what it's camera points at.  When pointing a 
camera into the outside world, even very tiny deviations in normal 
orientation can produce big errors in the result.  NURBS are infinitely 
smooth whereas polygons are only as smooth as they are subdivided - and even 
then approximations at best.

Matt




Date: Sat, 14 May 2016 17:33:32 +0200
From: "Sven Constable" <[email protected]>
Subject: RE: equirectangular uv
To: <[email protected]>

To fix distortion on the poles, XSI has a special mapping feature called 
'implicit' (Clusters/?Texture Projection Def), but this is actually a mental 
ray feature and doesn't deal with UVs at all. So when exporting meshes you 
cannot use it, I think. I'm not familiar with Unity unfortunatly, maybe 
there is a similar feature for spherical projections not using UVs but 
instead a special projection method (perfect spherical) ?

Otherwise, since a sphere always has poles/singularities you will get 
distortions on them. Workaround could get rid of the poles by deleting the 
inmost polygons on each pole, duplicating the resulting (open) edge loop, 
and scale it to zero. Resulting in many point on the same spot. Then 
relaxing them in the texture editor. Results could be ok, not sure. Maybe 
I'm  overcomplicating it.  Matt Lind needs to chime in :)

Can't you use cubic mapping? That should avoid the problem in the first 
place.



sven 

------
Softimage Mailing List.
To unsubscribe, send a mail to [email protected] with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to