Applying Textures to Model
#1
Posté 10 avril 2011 - 03:29
I figure it is done through a model editor, so, is there a 3DS Max tutorial on this particular?
#2
Posté 10 avril 2011 - 03:34
Alternatively, if you open up a .mdl file in Notepad or another text editor and look for lines saying, for example, bitmap thisoldtexture, you can set that to another texture name by changing the second part of the line (ie bitmap mynewtexture. Don't include file extensions like .tga in the texture name. The bitmap property appears once for every 3d object in the model file, and these may use the same texture repeatedly or many different texture names. If an object hasn't been given a texture, its texture name will appear to as NULL.
Modifié par _six, 10 avril 2011 - 03:36 .
#4
Posté 13 avril 2011 - 05:53
#5
Posté 13 avril 2011 - 06:54
That opens a new window where you can manually move the verts/faces of the object to exactly where you want them on the actual texture.
I am not trying to make it hard on you, but that is the only way to really do what you are asking. I highly suggest watching a few of the videos that come up with that uvw unwrap search.
Using the unwrap/edit mode you can have a texture, say of a dragons skull that has been sliced down the middle and flattened out. With the unwrap edit mode you can actually grabe the verts around the eye section of your skull object and move them (inside the edit window NOT on the actual object) and place them directly over the eye in the texture.
No one can tell you in a single or a couple steps how to do this, your best bet is to watch a few of those vids or grab a couple tutorials from the net.
#6
Posté 13 avril 2011 - 08:14
I mean, we get guys asking how to use the override folder all the time, or how to re-skin a tileset, and here I'm guessing my questions are just as simple as those, but every single time: Bam! You need a degree in neverwintian art and science to make this &%$· work!
Thanks for the tips and links bannor!
Modifié par Jedijax, 13 avril 2011 - 08:15 .
#7
Posté 13 avril 2011 - 08:27
I wish it was as simple as a 1-2 click.
#8
Posté 13 avril 2011 - 08:30
#9
Posté 13 avril 2011 - 09:21
JFK
#10
Posté 13 avril 2011 - 11:08
2DA works? Pfa!... Texture editing and shading in PAINT.NET? Meh... Model tweaking? childsplay! But this?! This is the &%$·!"·$% Pope!!
Just so people as ignorant on this matter as I was up till today know what I mean, you can't "move" a texture over the &%$·"! model, no, cause that would be too humane, no... the software creators, in their infinite wisdom, decided it was best for you to "unwrap" a 3d model as a &%$·"! cardboard figure and lay it all in a unspeakably weird form so you can add an equally %$·"! up texture over it, and then pray everything got in place the way you expected!!
sniff sniff... I can't take this anymore... I mean, when did NWN become so difficult... I'm sorry, I'm just too emotional today...
Modifié par Jedijax, 14 avril 2011 - 05:33 .
#11
Posté 14 avril 2011 - 10:30
'cos if you're just putting on a plain material texture, rather than a detailed laid out one, you might want to investigate the UVW Mapping modifier. It's got a bunch of half-arsed cheating methods in it that I used to use almost exclusively. They won't work nearly as well as manually mapping, but they're an excellent way to get something that looks halfway decent without any manual manipulation - and a good starting place for manually mapping something.
Modifié par _six, 14 avril 2011 - 10:32 .
#12
Posté 15 avril 2011 - 05:38
You see how the 1.69 TNO buildings have a "bricked" ended texture in the corners (which is actually dubbed "corner")? Well, I wanted to use such in the ever-growing re-skin I have been doing for TTR, but, as usual, the texture needs to be aligned so the bricked-corner is actually in the corner of the buildings, and not placed in the middle or some such. Your drag and drop method is fine for placing and quick checking new textures over a model, you know, to see immediately if a texture is smeared or flipped, or whatever, something that is very slow and hard to check when modifying via text editors, so I can't fathom why you can't simply "grab" the already placed texture as you would a model, in order to adjust it over the model's face; it just would seem so obvious...
#13
Posté 15 avril 2011 - 11:30
With this method you only need one corner texture for all kinds of walls and you only have to apply the texture of the corner once. Once you got the first corner right you can clone and turn and move it to use it for the other corners.
As for moving the texture around, you can do that either by using the uvw xform modifier. It has an u and v offset which will move the texture in the u or v direction, or you can apply an unwrap uvw modifier, select all vertices and then move all of them. If you just need to change one side of a box for example, you can select all the faces of that side of the box and then apply the unwrap modifier and it will only affect those faces. It really isn't very hard to do.
Also if you got a texture right and need it for another object with the same geometry, you can save the uvw map and then apply an unwrap uvw modifierer to the second object and load the uvw map.
#14
Posté 15 avril 2011 - 12:02

So, do that, select the real texture so it displays in the selection box.
Now your texture will display in the edit window.

There is another option to setup in the edit window, under options.

The default edit window works with verts. Regardless, do a ctrl-a to select all verts, and you can then drag them all. Drag them until the corner is where you want it.

Depending on your screen size, and if the edit window is not overlapping your main display of the object, you can "see" the texture move on the object in the main display.
Modifié par Bannor Bloodfist, 16 avril 2011 - 01:47 .
#15
Posté 15 avril 2011 - 01:55
Well, I'm actually talking about the UVW Mapping modifier. I just wanted to "adjust" an already existing texture on the model, no fancy shmancy work, I guess, but a simple "aligning" of said texture.
Actually, if you just want to scroll a texture along, there's a UVW Xform modifier that has some very simple scrolling and scaling tools without having to mess with the UVW geometry yourself.
I'd reccomend Bannor's method though once you've got used to how it works. The UVW Xform is pretty much trial and error, where via the UVW Unwrap method you can drag the texture to where it needs to be at a glance.
Modifié par _six, 15 avril 2011 - 01:58 .
#16
Posté 16 avril 2011 - 03:35
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?
#17
Posté 16 avril 2011 - 08:25
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):

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.

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

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).

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

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.

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.

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.

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.
Modifié par Zwerkules, 16 avril 2011 - 04:30 .
#18
Posté 16 avril 2011 - 01:42
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.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...
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 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.
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.

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

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

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.
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 .
#19
Posté 16 avril 2011 - 08:20
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.

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 .
#20
Posté 17 avril 2011 - 05:34
And here I thought I could just drag and drop textures wherever I liked... grumble... grumble...





Retour en haut






