Texturing (By Matthew Peddlesden)

Texturing


Amabilis Forum: Microsoft Train Simulator Export: Texturing


andnbsp; By Matthew Peddlesden (193.237.86.201) on Sunday, July 29, 2001 – 11:56 pm: andnbsp;

Hi,

I’m working on a Class 55 ‘Deltic’ and I’m not doing too bad with the model now I don’t think, all things considered especially andnbsp;

What I could use some help and advice on is texturing.

I can’t seem to get the Unwrap operation to do what I expect, and I just don’t follow the UVMap one yet at all, though I am trying to follow the tutorials on the subject.

Ideally, I want to end up with one or more texture files that have things like the side, front and top view in them so that they’re not too awkward to repaint later.

Any help much appreciated <!– s;) –><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!– s;) –>

Matt.

andnbsp; By Simon Hachey (65.12.159.54) on Monday, July 30, 2001 – 10:49 pm: andnbsp;

Hi,

There is a nice uvmapper at geocities.com/lithunwrap

Simon

andnbsp; By Alex Grigny de Castro (24.132.1.94) on Tuesday, July 31, 2001 – 04:49 am: andnbsp;

Matthew,

What I do is this:

1. in the Material Panel, select flat wrap

2. rotate your object so that the faces you wish to unwrap face forward (that is, if you were using the orthografic front view you would be looking straight at them), and jot down the frame orientation angles for later use. I use the Properties screen a lot for doing this.

3. select these faces. Mostly what I do is paint each set of faces with a different colour. I can then select a group of faces in one operation with the point and face selector by holding down CTRL and ALT when selecting them, this selects all faces with the same material.

4. now you have: your selected faces are facing forward. In the Object Operation Panel, hit unwrap. You get a square map of your selected faces. chose the size you want, and save to disk.

5. Load this in your favorite paint program. I use Paint Shop Pro. There I change the contrast and brightness settings so that grey areas get darker and white lines stand out more. Then I reduce the colours to 2 colours, to have a black and white picture, and then change that to 256 colours. I then set the transparent colour to the background colour. All this is necessary, because transparency in PSP only works for ONE colour in a 256 colour palette.

All this has prepared my outline map for making the texture. I then get a basic texture or make a new image of the same size as the outline map. I use here 16 million colours. I create a new layer. I return to the outline map, copy it to the clipboard and paste it as a transparent selection on my texture’s new layer, make sure it is in the right place, and ‘unfloat’ the selection. In this way, I can make its layer visible and invisible when I need to and work on from there.

Using the UV mapper.

1. When your texture is ok, save it as PSP first to preserve setting (you may want to edit it later), make the outline map layer invisible and save it to your MediaTextures folder or to your model’s folder as BMP or JPG. Load it into the materials and prepare the material, adjusting specular, diffuse, ambient, opacity and the background colour (usually white). Make sure flat wrap is selected too.

2. reposition your object so that the faces face front. Use the settings you noted down when you did the unwrapping.

3. Select your faces as before

4. Open the UV mapper: you should see the same contour you had when unwrapping, and the texture you made. You can do some final adjustments here if necessary

5. hit ok and your faces get textured.

I never used cylindrical and spherical wrap, because the systems I export to don’t support this. You may want to test these options if you export to a DirectX context.

Hope this helps,
Alex

andnbsp; By Alex Grigny de Castro (24.132.1.94) on Tuesday, July 31, 2001 – 05:18 am: andnbsp;

Another tip:

In Paint Shop Pro, I usually resize the texture I am working on (all layers, including the outline map) to look a bit like the shape or size of the faces. You need either a good eye or some maths to do this andnbsp;

The maths bit:

In 3DC, select the faces you are texturing (as before, they must face front) and do a Copy and Paste operation. This copies the faces back into 3DC as an object (I call it here the faces-object). Move it away from your original object.

Next, place a cube on the scene, select the faces-object you just copied, and in the Scene Hierarchy panel move it to the frame of the cube. This ‘straightens’ the bounding box of your faces-object. Select the faces-object again, and open the Properties. Write down the X and Y dimensions of the object. This gives you the width and height of your texture in real units. You will want to rescale your texture to the same proportion. For example, if you want to modify only the width W of the texture and keep its height H unchanged:

new W = H x X / Y

or change the height only:

new H = W x Y / X

when you finish working on your texture, save it as PSP without resizing back, then resize it to 256 x 256 or whatever, and save as BMP or JPG

Alex

andnbsp; By Alex Grigny de Castro (24.132.1.94) on Tuesday, July 31, 2001 – 05:35 am: andnbsp;

And another tip (LOL, I’m getting excited here!):

3DC does not store textures in the 3DC file, it keeps a reference to the texture. This is brilliant if you want to work on a texture: you can make your first test-texture, apply it in 3DC, and then modify it in PSP (that’s why I recommended keeping the texture in PSP format), save it again as many times as you want.

To refresh the texture in 3DC, just save your scene if it is open, and (re)load it. The new texture gets applied without you having to UV map it again.

Alex

andnbsp; By Alex Grigny de Castro (24.132.1.94) on Tuesday, July 31, 2001 – 10:33 am: andnbsp;

Simon,

I downloaded the uv mapper you mentioned. It works quite nicely, but DirectX export is done wrong:

1. the Z axis direction is inverted, so the back of the object becomes the front
2. the texture filename is not in the X file

I contacted the author about it, will see what happens.

I havent tried the import yet.

Alex

andnbsp; By Simon Hachey (65.12.159.54) on Tuesday, July 31, 2001 – 11:22 am: andnbsp;

The Texture name isnt in the .x file, but it preserves the uvmapping, so you can just change the entire texture, using 3d exploration, or a script in 3DC. (I think you sent me a script that does that ).
I have done this before using the .3ds format, so it will probably work with .x.

Simon

andnbsp; By Alex Grigny de Castro (24.132.1.94) on Tuesday, July 31, 2001 – 11:28 am: andnbsp;

I can tweek the DirectX file and add the texture name andnbsp;But I can’t easily reverse the Z direction. I could by loading it in my own software and doing the job there, but it would be better if the job was done directly by the import/export routine of LithUnwrap so as not to add more rounding off errors to coords.

Alex

andnbsp; By Simon Hachey (65.12.159.54) on Tuesday, July 31, 2001 – 07:04 pm: andnbsp;

3DC pro has a mirror along z-axis function andnbsp;

Simon

You must be logged in to reply in this thread.

1 post