Blender to Wad2: HQ object workflow (Advanced) - Tomb-Raider-Level-Editor/Tutorials GitHub Wiki

Written by Jonny98 aka Heckler

Greetings, Earthlings!

As a CG tutor, I feel ashamed that I’ve never dropped a quick how-to here.

So, today I am going to try my best to demystify the previously tedious method of creating proper objects for your wads.

Np1D4VNh

While there are other great tutorials and discussions, this topic is a bit of a vague one and can seem daunting at first as people have their own habits in a 3D workflow that might be deemed unnecessary for the same result. You don’t need to follow every digit and letter by the book when it comes to 3D. We want results, not a documentary. Conventional 3D workflows and TRLE have never been part of the same Whatsapp group. Rest assured though, for a buggy mess of a first impression, it is far more straightforward than you think if you do a few things right. This really isn’t rocket science, unless…. Before we start, it is crucial that you have a basic understanding of 3D fundamentals and know your way around Blender’s interface as I'm going to be throwing you into the deep end by modeling, unwrapping, setting up your shader, texturing, lighting, baking the texture onto new UV, exporting it correctly and optimizing it with wadtool before it goes into your level as opposed to a step by step first impressions tutorial.

A few things to remember before we start:

  • This exact method is for TRNG wads in Tomb Editor (Wad2).
  • Same rules apply (sort of) for the other versions (I think TEN is a bit more lenient with polycount and UVs in that regard)
  • We are working with some UV limitations. It won’t work if a single face on your model has more than a 256x256 size texture on it so we’ll need to either segment or lower the image resolution.

Okay. Let’s begin, shall we?

Step 1: Let’s make it easier for ourselves. Create a little “workshop” room in TE. We’re going to use this as our grid and scale reference in Blender. Make sure that everything is textured. (Feel free to use my beta textures. A simple little set that helps me a lot with building and texturing)

nNVB37Kh mOvV1iU

Export your room, keep invert Z axis and Invert Faces ticked with a scale of 1024, Normal Scale (Default).

4fqEXovh

Import your room into Blender and switch on backface culling. (Or delete the roof if you’re not going to use it.)

QLCpV1Eh

Also worth noting. I use an older standalone version of Blender just for TRLE/WadBlender purposes so my viewport scale is set to 6.144 and my clipping range 0.012m – 1200m by default. As for focal range, our eyes see 50-55mm. 80-85 is a good length for a mix of perspective and orthographic while 120 and up is nice and flat if you want to do some sloppy perspective UV mapping for stubborn spherical shapes or identical backfaces if you’re lazy like me.

yUReRabh

Step 2: I’m going to create and texture a simple set of tin barrels. You can use this texture if you want. (Credit: textures.com) I made my texture 256 x 256. You can use any resolution as our baked texture will be the result. You can also use multiple materials and bake them down to one. *I’ll cover that in a follow-up with something a bit more intricate.

ZA9UbXs

Step 3

jaMu68Sh

Now that we have our barrel set modeled and textured, we want to make it pop. In industry standard asset creation for mobile platforms or painted/stylized models, or in this case a vertex lighting system without PBR, we always need make our objects stand out without the need for additional maps. So we want some Ambient Occlusion and some light data baked into our flat diffuse texture to make it seem more natural in its space.

To do this, switch to Cycles (Make sure CUDA settings are enabled in your preferences) and head over to the Shading panel.

Add an Ambient Occlusion node between your texture and shader. You can also do what I do with a colour ramp and a mixRGB with blending modes to enhance the effect. Also, add a coloured Area light to add some surface drama if you want. (*Remember to set your roughness up to avoid sheen later in the engine. And if you're thinking about glossy baking...uhm no honey, this isn't your mum's house )

p6kIiGBh

When your object looks good to your taste, head on over to the object data section and create a new UV and unwrap your model again. I prefer lightmap packing with a bit of a margin as it transfers over to tiled texturing without errors like lines, distortion, or unwanted transparency that a smart UV map or any other would give.

4IBa4qOh

*Worth noting... I sometimes use a texture packing add-on if I want more margin space between UVs

Here comes the crucial part:

In your shader nodes, add a new texture (256 for small objects with low polycounts or 512 for larger/denser. Remember though that we can't go over 256x256mm per polygon because it simply won't show in the engine)

r3tGTyGh

Connect a UV node to it and select your original UV in that node.

Important! Make sure the new texture node is selected, and head on over to Bake. Select Diffuse, leave it as is, and play with the margin if you see texture errors.

7LhTeqlh

Lovely!

QJOoZPuh

Take note: *Make sure your imported room is set not to render or move it out of the way.

*Triangulate your mesh in face mode setting the quad method to “fixed” and make sure the baked texture is linked to your Principled shader before saving your obj and texture into the same folder. When exporting your model, make sure “Selection Only” and “Material Groups” are selected.

e2NDibRh

Note: Use your workshop room to scale your objects and set the pivot origins before saving it

761E0eRh

Step 4

My favourite part! Open up Wadtool and create a new slot. Import your OBJ again setting Invert Faces and Z axis alongside Scale: 1024 in your desired slot.

Import should be the same as our export settings from earlier

4fqEXovh

Set up your mesh settings, convert to tiled and you are done!

y2uyrSch 761E0eRh Np1D4VNh

Have fun!

If you want my barrels, feel free. Just credit where due.

LINK TO BARRELS (WAD2)