Wings 3D Development Forum
I currently can't sphere/cylinder map this type of chart/cuts - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Gripes & Grumbles (https://www.wings3d.com/forum/forumdisplay.php?fid=4)
+--- Thread: I currently can't sphere/cylinder map this type of chart/cuts (/showthread.php?tid=1504)

Pages: 1 2 3


I currently can't sphere/cylinder map this type of chart/cuts - ggaliens - 12-24-2015

Code:
find_axes(Fs,BEdges,We) ->
    ChartNormal = chart_normal(Fs,We),
    case forms_closed_object(BEdges,ChartNormal,We) of
    undefined ->
        throw(
          ?__(1,"I currently can't sphere/cylinder map this type of chart/cuts,\n"
          "I can't figure out which axes you want as X,Y, and Z,\n"
          "please use unfolding or one of the projection mappings."));

%%        find_axes_from_eigenv(Fs,ChartNormal,BEdges,We);
    Nice ->
        Nice
    end.

In my manifoldlab releases folder is a dense sphere with cutlines.
Filename testsphere2.wing

https://www.dropbox.com/s/g1hso6aleviuy1h/testsphere2.wings?dl=0

It is very similer to one that has about 1/2 as many polys ... but the same structure ... which did UVMAP.

What sort of things might throw off the axes finder ?


RE: I currently can't sphere/cylinder map this type of chart/cuts - ggaliens - 12-24-2015

I had to back off on my sort of arbitrarily foamy objective ... and go to a smoothed geodome starting with
like level 128 or more and then smoothing a time or two to get up to 200K vertices.

And then I was able to make an "8" on the object (cutting lines) and the resulting mapping obeyed the poles I had setup ... reasonably.

It seems like sphere mapping needs a bit more stress testing (MAYBE). I reserve judgement and will give it another try with arbitrary triangles.


RE: I currently can't sphere/cylinder map this type of chart/cuts - micheus - 12-24-2015

That works fine in a regular spherical shape. The only adjust needed is to move the top and bottom vetices in the poles (red circles). The image mapped in the poles is a little pinched, but I think that is hard to avoid this without a human touch. Smile
[Image: spheric-map_zps389d38b5.png]
I didn't used your file because I'm on a poor PC for this high resolution object. In a i5 4GB (but only 1.5GB free) with an Intel integrated graphic card it's almost impossible to work in this kind of mesh.

I just discovered that my Bump_Mesh is still working under v2.0.2. Smile


RE: I currently can't sphere/cylinder map this type of chart/cuts - ggaliens - 12-24-2015

When I go as high as I did in mesh density ... the cutlines make sometimes arbitrarily small sliver triangles ... especially is I'm starting with triangle "foam" ... and then I worry about the oddballs like an edge that is near ZERO length.

I went and picked over the edges of the "8" cut lines to make it still a very nice "8". Flat, parallel caps, no short edges on cutline between caps. I did a lot of work ... but still it didn't want to sphere map. Oh well. Maybe I'll burn these test models to CDROM and comeback to them another day. GEODOME of high density may be good enough for now.


RE: I currently can't sphere/cylinder map this type of chart/cuts - ggaliens - 12-27-2015

Micheus ... I changed my sphere ... down to 80343 faces.

Can you try sphere mapping it as is with the same cutlines ?

It is still testsphere2 in my dropbox where the manifoldlab installers are located.

With new testsphere2 .... I have a new alignment problem. But still an alignment problem.


RE: I currently can't sphere/cylinder map this type of chart/cuts - micheus - 12-28-2015

Thanks, it became much more light to work. Smile

ggaliens, as perfect as the sphere the "8" must be too. The two poles must be the same diameter as well as they must be a perfect circle. The "meridian" must be flat. That will ensure the resultant unwrap can be a rectangle. Otherwise, the boundaries of the unwrapped region will be non regular and by trying to find the better alignment Wings3D may rotate and distort it slightly - as you are getting.

[Image: sphere-ggaliens-2_zpshbniobu3.png]
Here is the result (I removed the hole/pipe - the union between poles)
[Image: sphere-ggaliens-1_zpsevlmo0bd.png]


RE: I currently can't sphere/cylinder map this type of chart/cuts - ggaliens - 12-28-2015

"The two poles must be the same diameter as well as they must be a perfect circle".

I gathered some of the above ... from experiments. But this information is not on status line is it ?

It would be easy to generalize this if the user would just stipulate the axis directly ... rather than by inference. Seems a very small price to have to pay as a user.


RE: I currently can't sphere/cylinder map this type of chart/cuts - micheus - 12-28-2015

(12-28-2015, 03:16 PM)ggaliens Wrote: "The two poles must be the same diameter as well as they must be a perfect circle".

I gathered some of the above ... from experiments. But this information is not on status line is it ?
That doesn't need to be said if you know about the concept.

You are using a "wrong" mesh for this method. I could to try explain, but my English and knowledge isn't enough, so I got this text from this link.
You can find many others - all of them you will be using a regular Sphere and the Sphere map will unwrap it in a Cylinder creating a rectangle map.
Quote:Map Coordinate Systems

To understand the coordinate systems used by Map Kit, it helps to understand how the three-dimensional surface of the Earth is mapped to a two-dimensional map. Figure 5-1 shows how the surface of the Earth can be mapped to a two-dimensional surface.
Figure 5-1 Mapping spherical data to a flat surface

Map Kit uses a Mercator map projection, which is a specific type of cylindrical map projection like the one shown in Figure 5-1. In a cylindrical map projection, the coordinates of a sphere are mapped onto the surface of a cylinder, which is then unwrapped to generate a flat map. In such a projection, the longitude lines that normally converge at the poles become parallel instead, causing land masses to be distorted as you move away from the equator. The advantage of a Mercator projection is that the map content is scaled in a way that benefits general navigation. Specifically, on a Mercator map projection, a straight line drawn between any two points on the map yields a course heading that can be used in actual navigation on the surface of the Earth. The projection used by Map Kit uses the Prime Meridian as its central meridian.

How you specify data points on a map depends on how you intend to use them. Map Kit supports three basic coordinate systems for specifying map data points:
  • A map coordinate is a latitude and longitude on the spherical representation of the Earth. Map coordinates are the primary way of specifying locations on the globe.
  • A map point is an x and y value on the Mercator map projection. Map points are used for many map-related calculations instead of map coordinates because they simplify the mathematics involved in the calculations. In your app, you use map points primarily when specifying the shape and position of custom map overlays.
  • A point is a graphical unit associated with the coordinate system of a view object. Map points and map coordinates must be mapped to points before drawing custom content in a view.
The kind of mesh you are using would require a regular Unfold, maybe.
I just tried to drive your mesh in that direction in order to get the desired result. That is because we cannot automatize everything - the human eye and brain still work better for most situation. Smile


RE: I currently can't sphere/cylinder map this type of chart/cuts - ggaliens - 12-29-2015

Its OK ... I got it working with my sphere and standard implementation. Not sure why you think it can't work with my sphere and triangles ... because it sure does work if you keep it SIMPLE. Video to follow.


RE: I currently can't sphere/cylinder map this type of chart/cuts - micheus - 12-29-2015

(12-29-2015, 01:29 AM)ggaliens Wrote: Not sure why you think it can't work with my sphere and triangles ... because it sure does work if you keep it SIMPLE
I still think that the way you were doing you couldn't - you proved that. At least the way you were arguing it should work with the current wings3d implementation.
To get it working you certainly changed something. Don't you?