• 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 Interface & Usage v
« Previous 1 … 12 13 14 15 16 … 32 Next »
Existing UVs ... materials and AutoUV

 
  • 0 Vote(s) - 0 Average
Existing UVs ... materials and AutoUV

ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#1
04-22-2016, 02:00 PM
Existing UVs ... materials and AutoUV

When I bring in existing UVs into autoUV and it plots them for me ... and appears to assign the background texture ... when I come back out of AutoUV ... it doesn't make a material for me. Ie ... I see what I want in AutoUV window ... but no in geometry window ... because there is no material binding texture to face.

Not sure if this is expected behavior. Maybe system things there with be a material if there are UVs.

Went back to playing with my spherical around Y UVS assignment and was having a rough time remembering how to use it.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,675
Threads: 183
Joined: Jun 2012
#2
04-22-2016, 04:17 PM
The material is created when in AutoUV window you use the option Create Texture in the context menu.
[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
#3
04-22-2016, 08:00 PM
I tried that and I only end up with the image in outliner window ... no material generated ... even after I do create texture.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,675
Threads: 183
Joined: Jun 2012
#4
04-22-2016, 08:10 PM
try something simple to see if it works and how it should:
- create a cube (Cube1);
- smooth once [S];
- select the object;
- UVMapping LMB option;
- in the AutoUV Segmenting in the context menu Segment by->Feature Detection;
- again, in the AutoUV Segmenting in the context menu Continue->Unfolding;
- the AutoUV window is displayed and in the Outline window (even without create the texture) you already should see a new material called Cube1_auv and the default image with letters and colours pattern called auvBG;
- after you use the command to create the texture that image uses to be replaced for the new one called Cube1_auv too.

I could repeat this operation in 2.0.3 without problems.
[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
#5
04-22-2016, 08:30 PM (This post was last modified: 04-22-2016, 08:53 PM by ggaliens.)
Yes ... I can add texture and get the material if i generate UVs in the normal fashion.
No problems. Works fine.

What I'm looking for is a way to create an API call that will add any old UVMapping, background texture ... (test pattern) by way of material.

I'm sure if I prob into the IMPORT code ... I can find a way. I would even just have a TEST SPHERE with material and texture already applied in a resources folder. Then I could just do some parts swapping between two ST#st and two We#we and get what I want ... but that would be super hacky (even if user would not know a think about the hack).

Too many steps. I want to make it easier.


micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,675
Threads: 183
Joined: Jun 2012
#6
04-22-2016, 08:56 PM
Well, the UVmap information is assigned to the mesh. The texture is assigned to the material.
You can assign any different image to the diffuse map property of a material to change the texture applied to the object.
Or, you can create another material with its own image assigned to the diffuse map and assign this material to a mesh and get it "dressing" this new material.

It seems something you can automatize.
[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
#7
04-22-2016, 09:05 PM (This post was last modified: 04-22-2016, 09:08 PM by ggaliens.)
Yes ... but reading wings_material.erl

I don't feel like I have any brain-storm yet. When you open the material editor after the fact ... you can see a bitmap attached to "diffuse" channel. But ... I can't see any API call to make it happen.

I dump the materials after mapping a cube by unwrapping (charts)
Code:
1> {2,
{default,[{maps,[]},
           {opengl,[{ambient,{0.7898538076923077,0.8133333333333334,
                              0.6940444444444445,1.0}},
                    {diffuse,{0.7898538076923077,0.8133333333333334,
                              0.6940444444444445,1.0}},
                    {emission,{0.0,0.0,0.0,1.0}},
                    {shininess,0.0},
                    {specular,{0.0,0.0,0.0,1.0}},
                    {vertex_colors,set}]}],
          {'Cube1_auv',[{maps,[{diffuse,0}]},
                        {opengl,[{ambient,{1.0,1.0,1.0,1.0}},
                                 {diffuse,{1.0,1.0,1.0,1.0}},
                                 {emission,{0.0,0.0,0.0,0.0}},
                                 {shininess,1.0},
                                 {specular,{1.0,1.0,1.0,1.0}},
                                 {vertex_colors,ignore}]}],
                       nil,nil},
          nil}}

1>
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,675
Threads: 183
Joined: Jun 2012
#8
04-22-2016, 09:34 PM
If I'm not wrong...
{'Cube1_auv',[{maps,[{diffuse,0}]},
that value after diffuse is the image ID. In wings_image.erl there are some functions to get the image list and others.
[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
#9
04-22-2016, 10:33 PM (This post was last modified: 04-22-2016, 11:46 PM by ggaliens.)
HMMM. Food for thought. Thanks. I did get it working based on your comment. 1 click done ... planet.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



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

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode