PDA

View Full Version : Making UV for sphere?



bjornkn
10-11-2009, 06:27 AM
When you UV map a standard sphere in LW it get those ugly tris on the poles.
But if I import a background sphere from sIBL it has this nice LatLong UV mapping that is a perfectly rectangular mesh, which maps perfectly with a equirectangular panorama image.

How do you make such a nice UV map?

I know that that sphere doesn't have any triangles at the poles, but quads instead, but I cannot see how you go about to make that from scratch.

BTW, I also know that I can "cheat" and "borrow" that sphere and map it with my own equirects, but I really want to know more about UV mapping (and modelling) in LW.

hrgiger
10-11-2009, 08:49 AM
Hmm, is there a way to get perfectly square (or rectangular) UV from a sphere? Can we see a screenshot of the sphere and UV?

Personally, I don't care much for Lightwave UV tools. They leave a lot to be desired and I hope for more from UV tools in CORE. I either use Modo or UVLayout to create UV maps.

I assume you want a sphere that is made out of quads to avoid the trinagles at the poles. I just export a sphere out of zbrush but I'm sure someone knows a way to create one in Lightwave. I made one that isn't a perfect circle but is close. I just made a 4 X 4 cube, scaled each of the sides (4 polys) down to 75%, turned on subpatch, and then froze the mesh.

Here are a few different UV configurations I got out of UVLayout.

bjornkn
10-11-2009, 09:08 AM
Sure.
Here's a screenshot showing the sphere, LatLong UV map and a few select quads, to show that it even flipped the UV for "internal" use.

What I want is a UV map that can be used to apply a standard equirectangular spherical image with no deformations. Your UVLayout maps may work for some purposes, but not for mapping equirects I'm afraid.

BTW, sIBL also makes another UV map, Angular, which is suitable for mapping a circular LightProbe image to a sphere. No idea how they made that either..

hrgiger
10-11-2009, 09:28 AM
Actually, you can do this in Lightwave pretty easy but the only problem is, you won't be able to get the very poles but if that's not a big deal....

It looks to me like like the Sibl sphere is a standard sphere primitive like the one in Lightwave, but they've just made the tri poles so small, you wouldn't see them and they're not being shown in the UV map. Can you select the polygons at the very pole and see if they show up in the UV Map?

Anyway, here's a sphere mapped with a spherical map. You can see what happens to the ends and I'm guessing the same thing is going on with your sphere.

EDIT: Either that or they just left a tiny hole that you woudln't notice in the sphere so they wouldn't have to fill it with tris.

MUCUS
10-11-2009, 10:42 AM
There is no triangles in sIBL sphere, all the tris you see are quad (central vertex=2vertex).
So if you unweld the two main points (up and down) then spherical map you ball, you'll have something like sIBL UVMap but with tris instead of quads at the top of your map.
If you want the same map as sIBL, you must allow all the tris to be converted to quads, with a plug that convert tris to quads by duplicating one point....but I don't know where to go to find that though!

(Well I think I don't see other possibilities, but maybe there is?)

bjornkn
10-11-2009, 10:43 AM
The sphere has no tris at all, and the pole points all share the same y value, but have very small x and z variances, like max +-3um or something.
And the UV mapping shows 99.9% and 0.1% V

Actually I now just found a way to make it similar:
Make a standard sphere.
Make UV map, spherical, and flip it on U if needed
Use fix poles.
Select the new ring and scale it on x and z a couple of times at 1% (around origin)
Set UV value at 0.1% for all lower points and 99.9% for upper ones.
Select all tris and delete them.
Seems to work pretty good, and you avoid that dreaded zenith/nadir star.

probiner
10-11-2009, 03:17 PM
What about this?

Cheers

bjornkn
10-11-2009, 04:12 PM
What about this?

Cheers
Well. it isn't actually very useful for mapping an equirect to a sphere I'm afraid.
Yours on the left, and mine on the right.

MUCUS
10-11-2009, 05:07 PM
I'm a bit surprised that he lets a hole in the geometry...but I guess that, as the sphere will not drop shadows, this is not a problem.

But when you scale the new ring down, why not give all the points the same values? (instead of scaling to 0.1)

Otherwise your technique looks to work really great, thank you!

probiner
10-11-2009, 05:33 PM
Well. it isn't actually very useful for mapping an equirect to a sphere I'm afraid.
Yours on the left, and mine on the right.

I see.
But wireframe plz
Well basically i simply did a new one were i deleted the Frozen triangles that were subdivided from catmull, but now i see that's what you did =)
The hole in the mesh is so small that its not spotable

Cheers

bjornkn
10-11-2009, 05:49 PM
I see.
But wireframe plz
Here they are.
I just changed the surface on both to Lum=100 & Diff=0
And made them SubD.

Scaling down to 0 might work too, but I don't really think 2-3um matters when the camera needs to be in the center of that 2km (or more) sphere. It does help to flatten it a bit at the poles though, because the pole will not be using the Smoothing angle across the "hole".

JeffrySG
10-11-2009, 06:16 PM
Just out of curiosity... why not just use a sphere with the spherical mapping. As long as your map is a true equirectangular image it should map on pretty smoothly. You could simply use a tessellated sphere with subd on.

bjornkn
10-12-2009, 01:29 AM
Just out of curiosity... why not just use a sphere with the spherical mapping. As long as your map is a true equirectangular image it should map on pretty smoothly. You could simply use a tessellated sphere with subd on.
That's too easy ;)
Actually that's what I usually do. It has its pros and cons though.
It looks pretty bad in OpenGL, with an ugly seam, but renders fine. This sometimes makes placing objects precisely related to the "background" difficult.
But OTOH it works even when mapped on a cube, or even a plane. With UVs you need to have a lot of polys to make it smooth.

But the reason for asking was that I always like to know how to do things. It will always be useful some time.