Sunday, 1 December 2019

UV mapped model to TRLE wad using Blender 2.79

teme9 posted a technique for getting a UV mapped model into a Tomb Raider Level Editor (TRLE) wad [link] but since the information is scattered throughout the thread I decided to gather it all together here.

Tutorial for Blender 2.80 is here [link].

Models for a TRLE wad must be low poly, the main restriction being StrPix’s limits of 1500 vertices and 1500 polygons. Also the polygons must only be triangles or quads. Make sure the model you choose meets these requirements.

Installing the add-on


Go to https://github.com/sapper-trle/sappers-TRLE-addons/releases and download version v1.1 sappers-TRLE-addons.zip file.


download

In Blender 2.79 click to File>User Preferences.

user-pref

In the dialog click Add-ons and then Install Add-on from File.

install

Select the zip file you downloaded and click Install Add-on from File.

install2

Activate the add-on by checking the checkbox. The add-on will be found in the Import-Export category. Make sure Community level is on. Click Save User Settings before closing the dialog so the add-on remains activated.

activate

In File>Export you should see the options TextureAdd and StrPix Metasequoia. These will be unavailable (greyed out) if no mesh object is selected or then selected object has no UVs or the viewport is not in object mode.

For StrPix Metasequoia export you must set a scale. Default is 1.0 but objects in Blender are usually much smaller than Metasequoia so set a scale greater than 1.0.

export

teme9 Tutorial

Download link: https://onedrive.live.com/redir?resid=203CC0B046CA1A87!566&authkey=!AC_tG8KdAgBB3DQ&ithint=file%2czip

001

002

003

004

005

006

007

008

009

010

011

012

013

014

015

teme9 Scale Setup












Baratheon Tutorial

Download link: http://www.mediafire.com/file/3uwns8555ta35v6/UVMappedModel.2.trle.rar

Before you start make sure to get the latest version of Blender and the plugin.
Open Blender and load it to factory defaults.

001

Import the model that is already UV mapped into Blender.

002

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

003

Set your models transform properties to Smooth.

004

Select your model and press TAB to enter Edit Mode.

005

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

006

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.

007

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.

008

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

009

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

010

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.

011

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

012

Now if you need to edit the amount 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.

013

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.

014

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

015

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

016

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.

017

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

018

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.

019

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

020

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

021

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

022

Open TextureAdd and open your empty WAD.

023

Import your texture into the Texture Pages section using Import.

024

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

025

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

026

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

027

Bonus:
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.

101

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

102

Follow these steps and hit OK.

103

There you go. You now have an image that will be seamless and look good quality for the engine.
I hope I help at least one of you do this, then it would have been worth it. Thank you for reading.


DJFull Video


https://www.youtube.com/watch?v=NeJQfdKMoj8&feature=emb_logo


No comments:

Post a Comment