Author Topic: Applying Textures to Model  (Read 538 times)

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Applying Textures to Model
« Reply #15 on: April 16, 2011, 04:35:58 am »


               Ok, first off, Bannor... you're my hero. I mean, you went through the trouble of taking screen caps and adding written instructions, and also uploading those here as a visual tutorial? Man... it brings tears to my eyes...

I did everything that has been suggested here, and the method you and Six advised is actually quite useful and relatively easy to perform. However, I have hit another snag (as if the previous dilemma wasn't enough!). You see, the texture is a square with the "bricked corner" over a "brick wall" texture that is supposed to be what the rest of the model should be covered in. So, as I open the texture in the UVW window as mentioned, it appears cropped, you know, as several copied instances over which you move the "ctrl-a'd" verts. Thing is, both the model and the verts group are not a square or cube, but a rectangle, so the texture appears repeated over and over again. This means the "bricked" corner cannot be placed solely at the corners, as intended, but all over the wall as well, repeated at intervals. I figure there are two solutions to this: One is to be able to apply more than one texture to the same model, so as to "paste" the bricked corners at each corner without using a single texture over all the model, and second, to actually be able to texture, not the entire model, but it's faces separately.

I'm embarrassed to say this, but, could you guys give me just a little more insight on this?
               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Applying Textures to Model
« Reply #16 on: April 16, 2011, 09:25:30 am »


               If the whole wall consists of just two faces, even applying the texture to only some faces will not help you. You'd have to change the wall itself so it would have two faces just for the corner and two faces for the rest of the wall, or even more faces if that wall has two corners.
I think you should really try to make a corner texture with an alpha layer which only has the corner on it and not the wall texture. This is less time consuming than having to split up all the walls and you can also use those corners for many different type of walls.

I'll give you a few screenshots to show you how to make a corner for a building. I assume that you have
a corner texture with an alpha layer.

Lets assume that this box is your house (yeah, I know, it isn't much of a house, but it has four corners
and that is all we need at the moment):

'Image

Now you create a box which has the same height as the building (300) and the length and width are the same (60x60). The corner of the house is at -250, -140, 0. Since your corner box is 60x60, its center is 30cm from the sides. You could move the box to the right position, but to place it exactly at the right coordinates you can enter those coordinates at the bottom were there are fields for X, Y and Z.
-250 plus the 30cm is -220 and -140 plus 30cm is -110. Now you have to make sure the corner doesn't take up the same space as the wall of the house so it has to be 1cm away from the corner of the house at both sides. So what you enter at the bottom of the gmax window is X: -221, Y: -111, Z: 0,0.

'Image

Now you got your corner in the right position. Drag and drop the corner texture on that box and apply an uvw map modifier.

'Image

Use the cylindrical with cap option and flip the texture if necessary. In this example it was necessary to flip it (Flip is activated for U Tile), otherwise the corner would have been on the right side of the box and we need it to be on the left side.
Now go and remove the faces of the box you don't need (the two sides that are inside the building and the top and bottom).

'Image

The corner texture is not exactly where it has to be, so you apply an unwrap uvw modifier.

'Image

You will see some isolated t-verts. Those are left-overs from the removed faces. You can select them and
hit the del key to remove them. Now select all the remaining verts as Bannor described and move them to
the right position.

'Image

The 'tool' for moving the vertices (in the top left corner) has a drop down menu from which you can select that you only want to move the vertices to the left or the right, so you don't accidentally also move them up or down. Now move them so that the vertices in the middle are at the middle of the corner.

'Image

Now the corner looks right.
From the modifier menu select 'Aurora Trimesh' and from the options there select 'Over-ride Mat Values'.
If you don't do that your corner will appear a lot darker than it should be.

'Image

If you actually want it to be darker you can adjust the Ambient and Diffuse settings here.
Link the corner to the model base or since it has an alpha layer it is even better to link it to the
animation node if there is one. You can also use Veltools to create an animation node if the tile doesn't have one.
Now export the model and have a look at it with NWNExplorer which will show the transparency of the corner correctly.

'Image
               
               

               


                     Modifié par Zwerkules, 16 avril 2011 - 04:30 .
                     
                  


            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
Applying Textures to Model
« Reply #17 on: April 16, 2011, 02:42:42 pm »


               

Jedijax wrote...

Ok, first off, Bannor... you're my hero. I mean, you went through the trouble of taking screen caps and adding written instructions, and also uploading those here as a visual tutorial? Man... it brings tears to my eyes...

You are welcome, there is a whole heck of a lot more capabilities in that unwrap/edit window that I did not cover.  Play around with it, see what happens.  You may just be surprised at what you can accomplish just by trying.  Don't let the frustration get to you though, we have all been through it.  You "think" that some of this should be 1, 2, 3 type of things, that logically work in such-and-such a fashion.  That, unfortunately is not always the case.

I did everything that has been suggested here, and the method you and Six advised is actually quite useful and relatively easy to perform. However, I have hit another snag (as if the previous dilemma wasn't enough!). You see, the texture is a square with the "bricked corner" over a "brick wall" texture that is supposed to be what the rest of the model should be covered in. So, as I open the texture in the UVW window as mentioned, it appears cropped, you know, as several copied instances over which you move the "ctrl-a'd" verts. Thing is, both the model and the verts group are not a square or cube, but a rectangle, so the texture appears repeated over and over again. This means the "bricked" corner cannot be placed solely at the corners, as intended, but all over the wall as well, repeated at intervals.

  This can be handled in different ways depending on the textures AND objects involved.  Zwerkles post is a great example of using Alpha or even a Non-alpha texture on a seperate object.  More on this further down.

I figure there are two solutions to this: One is to be able to apply more than one texture to the same model, so as to "paste" the bricked corners at each corner without using a single texture over all the model, and second, to actually be able to texture, not the entire model, but it's faces separately.


Nope, an object can only have ONE texture applied.  Period.  IE, you can not assign a seperate texture to different faces. 

You CAN assign different bits of textures to different faces though.  You can select specifc faces (either by selecting the vertices OR the faces) and move them to different locations on the main texture.

'Image

They would have to be "detached" via the uvw unwrap edit window tools/options to do this. 
'Image

Now you could rotate them if you choose, or move them to a different section of the main texture.
'Image


I'm embarrassed to say this, but, could you guys give me just a little more insight on this?


No worries.  You WILL get there, if you stick with it.  '<img'>

Oops. I forgot to show you the other bits you can do... but I can just tell you, you can take those individual verts (not selected by face, but selected by vertic) and move them closer together so that they don't cross the repeats of the texture in the edit window.  There is also a way to change the number of repeats in the edit window, but I forgot to make a screen capture of that.


P.S. Zwerkules did a pretty damned good tutorial set above, I HIGHLY recomend that folks boomark this thread to capture that, and poke him to create some tutorials elsewhere, like the vault or even over on the HarvestMoonConsortium cc threads located in my sig.
               
               

               


                     Modifié par Bannor Bloodfist, 16 avril 2011 - 01:52 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Applying Textures to Model
« Reply #18 on: April 16, 2011, 09:20:20 pm »


               Something I forgot to mention in my previous post is that if you just applied a new uvw map to an object it will have a gizmo which you can move around and even rotate to affect how the texture is applied to the object.
Lets say you just added an uvw mapping modifier to an object and chose the 'box' option. Now you don't like the position of the texture on the object. You go to the modify tab and look for the uvw mapping modifier. It has a small + in front of it that will sort of open a sub menu when you click on it. There you will find the 'gizmo'. If you select that, in this case a yellow box will appear because the 'box' option was used for the uvw mapping. It could also be a plane, etc.

'Image

Now you can move the mouse pointer over an edge of that yellow box and it will change to the 'drag' mouse pointer. You can now move the gizmo and see how it affects the texture on the object.
When you have finished, make sure the uvw mapping modifierer is below the Aurora Trimesh modifier. If not, drag it there. Then right click on it and from the menu select 'collapse to'.
You have to use 'collapse to' whenever you move a gizmo or a pivot point, but also if use a 'reset Xform' from the tools menu which you have to do after you scaled or mirrored an object.
               
               

               


                     Modifié par Zwerkules, 16 avril 2011 - 08:31 .
                     
                  


            

Legacy_Jedijax

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +0/-0
Applying Textures to Model
« Reply #19 on: April 17, 2011, 06:34:02 pm »


               Oh, my! Sorry for not checking earlier! The visual tutorials are invaluable! Thank you Zwerkules and Bannor! Though I think this will require a little more time and effort than the previously tried functions, so I'll be back in a somewhat longer period, while I try and get all of this in!

And here I thought I could just drag and drop textures wherever I liked... grumble... grumble...