Mission to Minerva workflow

Started by Hannes, November 16, 2022, 07:39:44 AM

Previous topic - Next topic

Hannes

As I wrote in this thread:
https://planetside.co.uk/forums/index.php/topic,30331.0.html
I was curious about the Mission to Minerva contest and the provided models by Kitbash 3D.

I'd like to share some of my experiences to maybe make things easier for those who want to try it as well (in Terragen. That's why I post it here in this section).
First of all a big thanks to the Kitbash team for these incredibly beautiful and detailed models. And they are free!!!!

The file size is really huge. You can decide which kind of files you want to download, and whether you want 2K or 4K texture images.
I decided to download the "OBJ & FBX" option and the 4K images. This took a while, since it's more than 5GB.
As I saw in their tutorial videos, it seems to be pretty easy to use the models right away in apps like Blender or Unreal. For Terragen it takes a lot more work.

Setting up the shaders is really tedious. There are combined meshes and single ones, and each one has a lot of shaders. Most of the models share these shaders with other ones, so creating a set of shaders for each model might take ages.
So I found out (the hard way!! That's what initially took so long), it's the easiest way to do it once: This is how I did it:

The downloaded file was one single huge FBX (or OBJ). For later use it has to be separated, but I'll write about that later. First it's good to take care of the shaders.
I imported the whole thing into Terragen (only for the shader work). So each and every shader of the whole Minerva kit is listed at once. And it's quite a lot. I think more than sixty shaders!!
Some of the shaders have quite similar names and use textures with these explicit names, but they are distinguishable and well sorted.
I added the textures to the appropriate slots and adjusted the values for all shaders using Matt's PBR workflow. I didn't even control it visually. It works pretty well with the provided maps. All this took almost a complete day, but the good thing is, you only have to do this once for all of the models.
Then I went up in the hierarchy to find the parts shader, where all my edited shaders are included, renamed it to something like "Minerva Complete Shaders" and saved it as clip file (tgc).
Thus, whenever you create a scene using one or more of the Minerva models, you only have to load the TGC and assign the renamed parts shader to the model(s). No need to find the appropriate shaders for each model group. TG will always find the correct ones.
The TGC itself is very small, only a few KB, but it will take a few minutes to load, until it has collected all the 4K texture images.

It might be a good idea to create an extra TGC file for the five glass shaders (the ones with "glass" in their names - who would have thought?), since it's less problematic in Terragen to have the glass parts as separate models set to not cast shadows. If you don't do that, the areas behind the glass parts casting shadows might look quite noisy.

You don't have to keep the whole model in Terragen, it was only for the shader creation.

That's for the shaders.
In your favourite 3D app load the whole FBX or OBJ and separate the groups. For each group there's a .grp dummy with all the appropriate parts linked to, so you can move this around, and each connected part will follow. For each group hide everything except the grp plus the connected parts, move it to 0,0,0 and export it as OBJ.
I tried to run the exported model groups through PoseRay to recalculate the normals, but most of the models were to big in size, and PoseRay refused to do its work. So I did it in 3ds Max. Somehow the smoothing groups got lost, which resulted in slightly faceted objects, but I think it's neglectable, since they are quite high res.

Separating the glass parts (if you want to) is a bit tricky, since they aren't separate parts insinde the OBJ. I had to select faces by material ID in 3ds Max and exported the resulting model as separate OBJ. No fun, but in the end it's worth it.

After you have done all that, you only have to load the shader TGCs, load whatever model you want and assign the (renamed?) parts shader inside the TGC to the model.
Do the same for the glass objects. Put the appropriate objects and glass objects to the same location (don't forget to set the latter to not cast shadows - it's not stored in the object file), and you're done.
Unfortunately there's no way to delete the original parts shader of an object. You don't need it, since you assigned the "master shader" to it. But it's not deletable. So Terragen has to load the textures in the "master shader" plus those that come with the object and use the same images.

I hope that makes things easier... Have fun!!!

Hannes

A small addition. I just remembered this:
https://planetside.co.uk/forums/index.php/topic,27943.0.html
A PBR Node generator. I haven't tested it, but it might make things easier. Unfortunately it's not downloadable at the time, since Aokcub is rewriting the application to support the Terragen RPC feature introduced in v4.6.

Dune

Holy cow, that's quite a workflow. Nothing for me ::)


Quote from: Hannes on November 16, 2022, 07:39:44 AMUnfortunately there's no way to delete the original parts shader of an object.
There is; CTRL+D the parts and you double them, the you can delete all. At least it worked that way maybe 6 years ago, when I last did that.

So, do you load the heavy image maps for every smaller object? And most use the same shaders? Then it might be less heavy to load all once and link inside object to that one "all shaders" thing.

Hannes

#3
Quote from: Dune on November 16, 2022, 09:07:11 AM
Quote from: Hannes on November 16, 2022, 07:39:44 AMUnfortunately there's no way to delete the original parts shader of an object.
There is; CTRL+D the parts and you double them, the you can delete all. At least it worked that way maybe 6 years ago, when I last did that.

Ah, I only tried to delete the "parts shader" itself, which doesn't work even with your method, but it works, when you do that inside the parts shader. Good to know!!! I wonder how you found out, that you have to duplicate the stuff to make it deletable. Doesn't sound logical at all, but as long as it works...

Quote from: Dune on November 16, 2022, 09:07:11 AMSo, do you load the heavy image maps for every smaller object? And most use the same shaders? Then it might be less heavy to load all once and link inside object to that one "all shaders" thing.
As far as I understood you, that's exactly what I meant. I load the "all shaders" thing once, and inside each object node I assign the "All shaders" thing to it. So, no matter how many objects I load, they will have the correct shaders.

Hannes

Quote from: Dune on November 16, 2022, 09:07:11 AMHoly cow, that's quite a workflow. Nothing for me ::)
Yes, it's definitely no fun to do that, but this method can be used for probably every Kitbash set, and maybe for other huge object sets as well.

Dune

Quote from: Hannes on November 16, 2022, 09:31:25 AMthat's exactly what I meant
Maybe I didn't read too carefully, sorry. But it's a great method if you don't want to overload TG (which is actually not really a problem, but still...)

Hannes

Quote from: Dune on November 16, 2022, 09:49:32 AMBut it's a great method if you don't want to overload TG
I can tell you, I overloaded TG in my first tries!!! I tried to make a scene with almost all models. I was able to watch the RTP progress, but rendering stopped after a few seconds, and TG said goodbye without any warning. ;D

Dune