Thread: New technique
View Single Post
Old 11-01-15, 15:03   #66
Baratheon's Avatar
Join Date: Dec 2012
Posts: 2,260
Default Small Tutorial To Import UV Mapped Models Into The Level Editor

Before you start make sure to get the latest version of Blender and the plugin.

Open Blender and load it to factory defaults.

Import the model that is already UV mapped into Blender.

Your model should appear in the middle of the window. Don't click anything yet.

Set your models transform properties to Smooth.

Select your model and press TAB to enter Edit Mode.

While in Edit Mode press W to open the Specials menu. Select Remove Doubles.

Just below your model right click on the line between the two areas (above and below).
Under Area Options select Split Area. Now click to the right of your model window to create a duplicate area.
On your new window in the bottom left select the 3D View option and change to UV/Image Editor.

Now press A to select all of the UV layout. Under the UV option select Mirror and then the Y Axis.
It should flip your layout vertical so that it is correctly textured in the 3D viewport.

In order to see your model with the textures select the Viewport Shading option and then select Texture.

You should now see your model correctly textured.
If the texture is incorrectly flipped go back a few steps and mirror the UV again.

Duplicate your model by pressing Shift + D. It should glow white.
Without clicking anything immediately press Enter. Now select your duplicate model in the scene to the right.

Hover over the original mesh and click the eye (Restrict Viewport Visibility) to hide it from the 3D viewport.

Now if you need to edit the amout of faces on the mesh you can do the following:
Now with the duplicate mesh selected go to the Modifiers tab.
Select Add Modifier and choose Decimate.

Now it's important that you removed the doubles previously before attempting the next step.
Change the Decimate collapse ratio to 0.5 (or whatever you think appropriate) and hit Apply.

Now re-select your model and go back into Edit Mode if you left by pressing TAB.
Select all of the UV map layout and hit Unlink Datablock (cross to the end of the texture name).

Now go back to the main 3D viewport window and hit the Mesh option.
Select UV Unwrap and then Lightmap Pack.

You can use my recommended options here or play around to get the best results. I suggest:
Image Size is 512. Pack Quality is 48, and that the Margin is 1.00. Press OK.

Back into the UV viewport click New and generate any image.
You can follow my suggestions below but they're not necessary.

Holding shift select the original mesh and then the duplicate mesh.
Go to the Render option in the Properties section and scroll down to Bake.
Change Bake Mode to Textures and make sure Selected To Active Object is checked.

Now your model is textured in a way that is friendly to the Level Editor.

Back in the UV viewport select Image and Save As Image. Save your texture.

Go back to the 3D viewport and select your model.
Go to File and Export to both TextureAdd (.rec) and StrPix Metasequoia (.mqo).

Open TextureAdd and open your empty WAD.

Import your texture into the Texture Pages section using Import.

Import your TextureAdd (.rec) into the Texture Position section with Import.

Save your WAD. Open StrPix and open the WAD you just saved.
Select your empty mesh and then Import MQO.

Congratulations! You should now see your model textured correctly and ready to use within the Level Editor.


Once you have exported your texture from Blender you might want to make it look better for the Level Editor.
Especially if you don't want TextureAdd to compress your image and for it to lose quality.

Open your image in Photoshop. Select Image and then Image Size.
Change the image dimensions to fit 256 and keep the Resample on Bilinear.

Then go to Filter and select Sharpen and then Smart Sharpen.

Follow these steps and hit OK.

There you go. You now have an image that will be seamless and look good quality for the engine.

I hope I help atleast one of you do this, then it would have been worth it. Thank you for reading.
Baratheon is offline   Reply With Quote