• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Gripes & Grumbles v
« Previous 1 … 3 4 5 6 7 8 Next »
I currently can't sphere/cylinder map this type of chart/cuts

 
  • 0 Vote(s) - 0 Average
I currently can't sphere/cylinder map this type of chart/cuts

Pages (3): « Previous 1 2 3
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,676
Threads: 183
Joined: Jun 2012
#21
12-30-2015, 01:21 PM
I'm ending here. I swear. Smile

The noise can be what it is, but it can be avoid. Information has been lost if compared with to the manual process. If you can automatize part of the process, why not make it work better?

To "read" the image bellow the imaginary line is the UV left/right limits. Think about the virtual line make possible to put the vertices where it should be to make the used image lay correctly in the mesh - no gaps (a cut off in part of the image - lost information):
[Image: my_moon_zpshnludnzj.png]

Happy holidays.
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#22
12-30-2015, 03:01 PM (This post was last modified: 12-30-2015, 03:14 PM by ggaliens.)
I am going to make it work better.

First I will try this ... combined with making the UV coordinates like the ones you showed at far right of your last images. This has been the plan that I talked about ...
Code:
Define the texture wrapping parameters. This will control what happens when a texture coordinate greater than 1.0 or less than 0.0 is encountered:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,wrap);  
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,wrap);  

where wrap is:
GL_REPEAT : specifies that this pattern will repeat (i.e., wrap-around) if transformed texture coordinates less than 0.0 or greater than 1.0 are encountered.

GL_CLAMP : specifies that the pattern will “stick” to the value at 0.0 or 1.0.
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#23
12-30-2015, 05:33 PM (This post was last modified: 12-30-2015, 05:36 PM by ggaliens.)
OK ... it is fixed now. But I get to use my triangles ... and I was correct to use a nice foamy triangle mesh. There are reasons why it is better to have aribitrary than to have quad dominant arrangement following lat and long lines. I fixed the seam UVs.



Code:
command({vertex,{manifoldlab,spherical_y}}, #st{sel=[{WeID,Set}]}=St) ->
    wings_io:hourglass(),
    #we{} = We = gb_trees:get(WeID, St#st.shapes),
    [{_,MinY,_}=_Min,_Max] = wings_vertex:bounding_box(We),
    {_,Dy,_} = e3d_vec:sub(_Max,_Min),
    TWOPI = 2.0*math:pi(),
    timer_start(make_uvs),
    MyAcc = fun(Fi,Acc) ->
        Vs = wings_face:vertices_cw(Fi,We),
        MyInner = fun(Vi, _Acc) ->
            {X,Y,Z} = wings_vertex:pos(Vi,We),
            U = (math:atan2(X,Z) + math:pi())/TWOPI, % range 0 - 1.0b
            Temp = max(min(Y/(0.5*Dy),1.0),-1.0),
            V =  (math:asin(Temp) + math:pi()/2.0)/math:pi(),
            [{U,V,Vi}|_Acc]
        end,
        UVs = lists:foldl(MyInner,[],Vs),
        [{Fi,lists:sort(UVs)}|Acc]
    end,
    List = gb_sets:fold(MyAcc, [], wings_vertex:covered_faces(Set,We)),
    timer_stop(make_uvs),
    timer_report(make_uvs),
    timer_start(apply_uvs),
    MyApply = fun({Fi, UVs0}, Acc) ->
        UVs =
        case UVs0 of
            [{U1,V1,Vi1},{U2,V2,Vi2},{U3,V3,Vi3}]
                when (U1 =< 0.25 andalso  0.75 =< U2) ->
                %erlang:display("Fix U1 !"),
                [{U1+1.0,V1,Vi1},{U2,V2,Vi2},{U3,V3,Vi3}];
            [{U1,V1,Vi1},{U2,V2,Vi2},{U3,V3,Vi3}]
                when (U1 =< 0.25 andalso  0.75 =< U3) ->
                %erlang:display("Fix U1,U2!"),
                [{U1+1.0,V1,Vi1},{U2+1.0,V2,Vi2},{U3,V3,Vi3}];
            _ -> UVs0
        end,
        MyApply2 = fun({U,V,Vi}, _Acc) ->
            wings_va:set_vtx_face_uvs(Vi, [Fi], {U,V}, _Acc)
        end,
        lists:foldl(MyApply2, Acc, UVs)
    end,
    We2 = lists:foldl(MyApply, We, List),
    timer_stop(apply_uvs),
    timer_report(apply_uvs),
    wings_shape:replace(WeID,We2,St);
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,676
Threads: 183
Joined: Jun 2012
#24
12-30-2015, 06:31 PM
Congrats, now its beautiful.
I knew you could do it better.Smile
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
map
Offline

Junior Member

Posts: 2
Threads: 0
Joined: Mar 2016
#25
03-31-2016, 04:48 PM
I concur, I'm having difficulties with this as well.
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#26
03-31-2016, 10:43 PM
Map ... tell us more about the difficulties you are having. I see you are newly registered today. That is always interesting. New and already trying difficult plugins and then reponding with generic "concurs" ?

If you are real and not a bot ... we can help. So please elaborate soon.
map
Offline

Junior Member

Posts: 2
Threads: 0
Joined: Mar 2016
#27
04-21-2016, 04:57 PM
lol, that's because i am a newbie. A friend spoke about wings3d. I work with Maps using Gmaps V3
and i gave me some ideas to explore. But yes i'm still fumbling around
« Next Oldest | Next Newest »

Users browsing this thread: 4 Guest(s)

Pages (3): « Previous 1 2 3


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode