Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Closed Thread
 
Thread Tools
Old 15-04-23, 13:08   #1
Heckler
Professor
 
Heckler's Avatar
 
Join Date: Feb 2008
Location: South Africa
Posts: 4,165
Default Blender to Wad2: HQ object workflow (Advanced)

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.



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)




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



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




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.




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.




Step 3



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 )



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.



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



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.



Lovely!



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.



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



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





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







Have fun!

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

LINK TO BARRELS (WAD2)


__________________
Tread carefully.

Last edited by Heckler; 16-04-23 at 08:15.
Heckler is offline  
Old 16-04-23, 11:49   #2
Caesum
Tomb Raider
 
Caesum's Avatar
 
Join Date: Aug 2008
Location: Poland, Warsaw Gender: Male
Posts: 12,058
Default

I love the tutorial! Very interesting and it will be of great use for new assets builders. I'd also just add one more detail that is important for level builders.

Always remember to reduce texinfo count as much as possible.

While TRNG* engine allows to use up to 32767 texture infos, in the past it has been observed that some levels tend to malfunction/crash as early as when reaching 10000 or even 9000 tex info count. It might cause crashes or texture/animation corruption, erratic behavior.

For example if you make an object that generates about 1000 texinfo, it means you have used as much as 1/9th or 1/10th of the texinfo limit for the entire level. So when you're making your static always consider if it really needs that much detail.

It is also worth considering when making objects for legacy engines. There's a growing popularity of TR1-5 custom levels thanks to Tomb Editor, but those engines are very limited.

Some tex info counts for comparison:
- Original TR4 Lara = about 600 texinfo
- Bat from TR4 = 40 texinfo
- Bull statics from TR4 = 100 texinfo
- Horus-Goddess Lara = 2700 texinfo

* - Texinfo limit is even smaller for legacy (1-5) engines. The limit does not apply to TEN.

Last edited by Caesum; 16-04-23 at 11:52.
Caesum is offline  
Old 16-04-23, 12:36   #3
Heckler
Professor
 
Heckler's Avatar
 
Join Date: Feb 2008
Location: South Africa
Posts: 4,165
Default

Quote:
Originally Posted by Caesum View Post
I love the tutorial! Very interesting and it will be of great use for new assets builders. I'd also just add one more detail that is important for level builders.

Always remember to reduce texinfo count as much as possible.

While TRNG* engine allows to use up to 32767 texture infos, in the past it has been observed that some levels tend to malfunction/crash as early as when reaching 10000 or even 9000 tex info count. It might cause crashes or texture/animation corruption, erratic behavior.

For example if you make an object that generates about 1000 texinfo, it means you have used as much as 1/9th or 1/10th of the texinfo limit for the entire level. So when you're making your static always consider if it really needs that much detail.

It is also worth considering when making objects for legacy engines. There's a growing popularity of TR1-5 custom levels thanks to Tomb Editor, but those engines are very limited.

Some tex info counts for comparison:
- Original TR4 Lara = about 600 texinfo
- Bat from TR4 = 40 texinfo
- Bull statics from TR4 = 100 texinfo
- Horus-Goddess Lara = 2700 texinfo

* - Texinfo limit is even smaller for legacy (1-5) engines. The limit does not apply to TEN.

Thank you! And yes. You are right. If you want highly detailed objects in legacy engines/TRNG, plan ahead and consider level jumps with hubs like in Titak's Mists of Avalon.
__________________
Tread carefully.
Heckler is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 02:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.