Textures
Posted: Tue Feb 08, 2005 8:40 pm
Textures (unedited post)
thallionstellani
Whenever I texture a grass plane I always set my uvm to planar, size 1000,1000, then make sure it is set to tile 2 times in each direction. Regardless of the size of the actual object i am textureing. (and of coruse the uvm is centered at 0,0) That has always worked for me.
Q: Den
I don't know if it's even possible, but I have a model that uses the upper left hand corner of a very large TGA (1024x1024). When I crop the TGA to 256x256, the mapping continues to use the upper left hand corner of this smaller image... what I would call relative mapping. Is there a quick and painless way to "convert" this to fixed mapping, so that when I crop the image it continues to use the whole 256x256 image map (fixed as it were) short of unwrapping and reapplying the texture?
A: thallionstellani
but what i do is i just apply an unwrap uv modifier and then scale the mapping coords so that the mapping now covers the entire map instead fo only the top left 1/4 of it.
Or if it is exactly scaled you could apply a uvw xform to it, which is even easier if you made an exact change like that....
if you went from 1024x1024 to 256, then you ahve changed it by a factor of 4, so in the uvwxform you just need to do the same thing..
----------------
Danmar
Hmmm, my methods vary slightly as I avoid setting tiling to anything other than 1.0.
Create a plane, you'll want to make it at least 4x4 segments or you'll get bad lighting on it. The engine needs a few vertices to compute the lighting across to smoothly shade it.
Anyway, select Create - Plane. In the top view drag a plane out, size doesn't matter. Goto the Modify tab. Change the dimensions to 1000 and 1000. Change the segments to 4 and 4.
Now go up and left click then right click the move icon to bring up the numeric move tool. enter 0,0,0 for the x,y,z values.
Now you have a properly centered plane.
Now right click in the modifer area and select Collapse to editable mesh.
Now you have a proper format plane.
Now click the UVW Map modifer to add it to your plane.
Change the mode to Box (just a general purpose texture wrap, for this you can use the default Planar as well). Now you need to adjust the size. Make it 500x500(x500)in dimensions. The (x500) is if you used the Box wrap. Next click the + mark next to the modifier and under that you'll find the gizmo. Click that so its highlighted and bring up the numeric move tool again. Change the x to 250, the y to 250, the z to 0.
Now you should have a properly textured plane.
Textures auto repeat if you make the gizmo smaller than the size of the object. By setting the texture to be 500,500 you're covering 1/4 of the plane. For the edges to match you have to set the origin of the texture, the point that the first square of texture is placed to be 250x250 which will put four squares of the texture on the plane as it extends outwards tiling as it needs to.
I'm reluctant to use the tiling feature because on a couple of occasions I've seen the texture appear properly in Max but it tiled too many times in NWN. So I quit using the tiling to set the size and use the gizmo and haven't had any issues with that.
PS: As I understand it the aabb node in the tile is a streamlined version of the walk mesh and as a result you should only have a single one I would assume.
-Danmar
---------------
Q: Tom_Banjo
i was wondering how to make the image file appear on both sides of a single plane. is it possible?
A: ThriKreen
No, because the engine backface culls the plane. You'll have to make a duplicate and flip the normals.
----------------
Q:
I have made a simple 1 m x 1 m plane and am currently attempting to apply a simple texture to it (just a flat picture of a stone wall). It has an alpha channel and is a 512 x 512 .tga saved in 32 bit. However, when I initialize UVW mapping and choose the .tga in the material editor, the plane just turns grey and doesn't show the texture. Have I done something wrong?
A: ThriKreen
You need to enable the texture map. Under the material window, you should see what looks like a checkered cube. It enables and disables showing of the texture map in the viewports.
-----------------
Q:
My problem is this: If I set the UV tiling to any setting other than 1.0, my textures do not show up correctly in the game. I have looked at the .mdl files that I exported using NWMax, and found that none of my custom UV settings are exported, only the name of the bitmap. Does the .mdl format even use UV mapping, or is there some feature in NWMax I am overlooking when exporting my models?
A: Liorbil
instead of increasing the tiling in the UV modifier, try reducing the size of the map to achieve the same effect.
then collapse the modifier in order for the export script to work correctly.
clarification: any UV settings in the material will not get exported.
------------------
Den of Assassins
OK, generally there are two things that you can do pretty quickly.
1. if the mapping is just a planar map (like water or cobble or grass), you need to figure out what the scale is, typically through trial and error. The easiest way to find out is to hide all the elements you're working with, import a model you know is already mapped correctly, delete the new wok, group the remaining elements and then shift them 1000m one direction. Then you can visually compare your mapping versus the old mapping.
Planar mapping is almost 100% of the time square (length=width), and mostly a round number that is a multiple of 50 (not always). So for grass, I know from experience that the scale is 250. Then it's a simple matter of applying a new UVW map, ticking Planar (default), set the length/width to whatever the planar map is. Done.
2. if the mapping is NOT a planar map, then you need to go in and rescale the existing map. Select Unwrap UVW, click the Edit button, use your mouse wheel to zoom out so you can see the whole mapping, select all the tvert nodes, click the scale buttun (third on top for me), and scale to your heart's content. There is probably a way to set the scaling factor manually (like typing in 150%), but I don't know how. When it "looks right" compared to the known good base model, it's probably close enough in my book
thallionstellani
Whenever I texture a grass plane I always set my uvm to planar, size 1000,1000, then make sure it is set to tile 2 times in each direction. Regardless of the size of the actual object i am textureing. (and of coruse the uvm is centered at 0,0) That has always worked for me.
Q: Den
I don't know if it's even possible, but I have a model that uses the upper left hand corner of a very large TGA (1024x1024). When I crop the TGA to 256x256, the mapping continues to use the upper left hand corner of this smaller image... what I would call relative mapping. Is there a quick and painless way to "convert" this to fixed mapping, so that when I crop the image it continues to use the whole 256x256 image map (fixed as it were) short of unwrapping and reapplying the texture?
A: thallionstellani
but what i do is i just apply an unwrap uv modifier and then scale the mapping coords so that the mapping now covers the entire map instead fo only the top left 1/4 of it.
Or if it is exactly scaled you could apply a uvw xform to it, which is even easier if you made an exact change like that....
if you went from 1024x1024 to 256, then you ahve changed it by a factor of 4, so in the uvwxform you just need to do the same thing..
----------------
Danmar
Hmmm, my methods vary slightly as I avoid setting tiling to anything other than 1.0.
Create a plane, you'll want to make it at least 4x4 segments or you'll get bad lighting on it. The engine needs a few vertices to compute the lighting across to smoothly shade it.
Anyway, select Create - Plane. In the top view drag a plane out, size doesn't matter. Goto the Modify tab. Change the dimensions to 1000 and 1000. Change the segments to 4 and 4.
Now go up and left click then right click the move icon to bring up the numeric move tool. enter 0,0,0 for the x,y,z values.
Now you have a properly centered plane.
Now right click in the modifer area and select Collapse to editable mesh.
Now you have a proper format plane.
Now click the UVW Map modifer to add it to your plane.
Change the mode to Box (just a general purpose texture wrap, for this you can use the default Planar as well). Now you need to adjust the size. Make it 500x500(x500)in dimensions. The (x500) is if you used the Box wrap. Next click the + mark next to the modifier and under that you'll find the gizmo. Click that so its highlighted and bring up the numeric move tool again. Change the x to 250, the y to 250, the z to 0.
Now you should have a properly textured plane.
Textures auto repeat if you make the gizmo smaller than the size of the object. By setting the texture to be 500,500 you're covering 1/4 of the plane. For the edges to match you have to set the origin of the texture, the point that the first square of texture is placed to be 250x250 which will put four squares of the texture on the plane as it extends outwards tiling as it needs to.
I'm reluctant to use the tiling feature because on a couple of occasions I've seen the texture appear properly in Max but it tiled too many times in NWN. So I quit using the tiling to set the size and use the gizmo and haven't had any issues with that.
PS: As I understand it the aabb node in the tile is a streamlined version of the walk mesh and as a result you should only have a single one I would assume.
-Danmar
---------------
Q: Tom_Banjo
i was wondering how to make the image file appear on both sides of a single plane. is it possible?
A: ThriKreen
No, because the engine backface culls the plane. You'll have to make a duplicate and flip the normals.
----------------
Q:
I have made a simple 1 m x 1 m plane and am currently attempting to apply a simple texture to it (just a flat picture of a stone wall). It has an alpha channel and is a 512 x 512 .tga saved in 32 bit. However, when I initialize UVW mapping and choose the .tga in the material editor, the plane just turns grey and doesn't show the texture. Have I done something wrong?
A: ThriKreen
You need to enable the texture map. Under the material window, you should see what looks like a checkered cube. It enables and disables showing of the texture map in the viewports.
-----------------
Q:
My problem is this: If I set the UV tiling to any setting other than 1.0, my textures do not show up correctly in the game. I have looked at the .mdl files that I exported using NWMax, and found that none of my custom UV settings are exported, only the name of the bitmap. Does the .mdl format even use UV mapping, or is there some feature in NWMax I am overlooking when exporting my models?
A: Liorbil
instead of increasing the tiling in the UV modifier, try reducing the size of the map to achieve the same effect.
then collapse the modifier in order for the export script to work correctly.
clarification: any UV settings in the material will not get exported.
------------------
Den of Assassins
OK, generally there are two things that you can do pretty quickly.
1. if the mapping is just a planar map (like water or cobble or grass), you need to figure out what the scale is, typically through trial and error. The easiest way to find out is to hide all the elements you're working with, import a model you know is already mapped correctly, delete the new wok, group the remaining elements and then shift them 1000m one direction. Then you can visually compare your mapping versus the old mapping.
Planar mapping is almost 100% of the time square (length=width), and mostly a round number that is a multiple of 50 (not always). So for grass, I know from experience that the scale is 250. Then it's a simple matter of applying a new UVW map, ticking Planar (default), set the length/width to whatever the planar map is. Done.
2. if the mapping is NOT a planar map, then you need to go in and rescale the existing map. Select Unwrap UVW, click the Edit button, use your mouse wheel to zoom out so you can see the whole mapping, select all the tvert nodes, click the scale buttun (third on top for me), and scale to your heart's content. There is probably a way to set the scaling factor manually (like typing in 150%), but I don't know how. When it "looks right" compared to the known good base model, it's probably close enough in my book