How to make a texture array for buildingShader ?

Your forum for all discussions around Modding.
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

How to make a texture array for buildingShader ?

Post by olahaldor »

Does anyone know how to make a texture array to use with buildingShader?
Any limitations or pitfalls to think of?
Bersson
Posts: 46
Joined: Wed Oct 21, 2020 11:52 am

Re: How to make a texture array for buildingShader ?

Post by Bersson »

Giants has made many arrays available on GDN (you must register to download, look for Farming Simulator 19 BuildingArray Map America and Farming Simulator 19 BuildingArray Map Europe.) They are the easiest to work with because of the pre-made specular textures.

What I tend to do, is to start with one array as a template, then copy-paste albedo, normal, and specular textures from other arrays to make custom arrays. If I like the pattern but not the color, I add overlaying colors in Photoshop.

Suppose I need an array with textures other than what Giants can provide. In that case, I usually visit Textures.com, or other sites that offer PBR textures.

The good thing about PBR textures is that you get both roughness and AO textures together with the Albedo and Normal textures. Both roughness and AO textures can be used to create the specular map needed for the buildingsshader. The video below is a great guide on how to do it.

olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: How to make a texture array for buildingShader ?

Post by olahaldor »

I've seen that video already, and it was among the videos that got me on the right track with buildingshader in general. However, I'm confused about how to make my own array.
Perhaps I'm mistaken what the texture array is ? Trim sheets and arrays are not the same thing, from what I gather.

I've assembled the trim sheet in Substance Designer, as there's some very nice tools there for that, and the output is of course albedo, spec and normal. Just one click and it outputs them all.
Bersson
Posts: 46
Joined: Wed Oct 21, 2020 11:52 am

Re: How to make a texture array for buildingShader ?

Post by Bersson »

olahaldor wrote: Thu Apr 29, 2021 1:20 pm I've assembled the trim sheet in Substance Designer, as there's some very nice tools there for that, and the output is of course albedo, spec and normal. Just one click and it outputs them all.
Did you get it to work? (I see some nice screenshots in the Vertex Dezign Discord…)

olahaldor wrote: Thu Apr 29, 2021 1:20 pm Perhaps I'm mistaken what the texture array is ? Trim sheets and arrays are not the same thing, from what I gather.
Technically speaking, trim sheets and texture arrays are the same: Two or more textures assembled on one texture file.

olahaldor wrote: Thu Apr 29, 2021 1:20 pm However, I'm confused about how to make my own array.
The texture arrays you’ll find in Giants Developer Network are great templates for making your own

Some things to consider when creating your own arrays:
  • Use seamless textures – makes adjusting the UVs much easier.
  • Stack each texture on top of each other instead of side by side – (again) makes UV adjusting easier.
  • Loop cuts and UV seams make it easier to create UVs that fit the textures better.
Luckily, the Giants Engine repeats the textures even if the UVs exceeds the texture bounds:

Image
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: How to make a texture array for buildingShader ?

Post by olahaldor »

That's what I've done now. I was under the impression their building array tool has many *texture files*, spread out on udims, vertically as in a proper udim workflow.

With a single file containing a trim sheet, you still need to make it fit within a single tile (or, you could go outside in height but it would just repeat what's below, I think you know what I mean), while with the array I have a feeling it is in fact utilizing udims, where:
1 udim = unique trimsheet which has many materials within it.

If I could make one array of, say, 20-30 textures spread on 4 or more udims, that's what I'm after. Does that make sense? That's how I understood their texture array is set up.
TheSuBBie
Posts: 539
Joined: Wed Jun 10, 2020 11:38 am

Re: How to make a texture array for buildingShader ?

Post by TheSuBBie »

I was under the impression their building array tool has many *texture files*, spread out on udims, vertically as in a proper udim workflow
.

That is correct, to create a new array you would need to know how Giants coded, compiled/saved the texture array in the first place and how the shader utilises each texture.

I believe stjerneidioten did some work in this regard as well as his UDIM blender add on.
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: How to make a texture array for buildingShader ?

Post by olahaldor »

While I don't use blender; Isn't the script he did for blender for use with the vehicle shader though?

I see there's a tool on GDN, Texture Assemble. Is that the tool to use? There's no mention about how to utilize it except how to use it to make something :hmm:
TheSuBBie
Posts: 539
Joined: Wed Jun 10, 2020 11:38 am

Re: How to make a texture array for buildingShader ?

Post by TheSuBBie »

I believe stjerneidioten did some work in this regard as well as his UDIM blender add on.
I was refering to the buidings array diffuse and the current locations of the various uv maps for each of those images

The texture assembly tool was used in FS17 to create the ground texture array.
from the read me in the download zip
GIANTS Texture Assemble
=======================

The texture assemble tool packs several textures into a single array, cube or volume dds texture.
All input textures need to have the same format (usually DXT1 or DXT5), resolution and number of mip maps.
This tool can for example be used to create the ground texture arrays used in Farming Simulator 17.
See buildGroundTextures.cmd for a script to convert indiviual ground files to such a texture array.
if you activate the buildGroundTextures.cmd you will see how the textures are selected in the cmd window, wether you can do the same with the building textures you want to create I don't know, it worked quite well in FS17 when I used it to change ground texture colours for my maps, so you could try a little experimentation to find out, bear in mind all textures must be the same size/resoloution and have the same number of mipmaps assigned to each of them
ben.m
Posts: 5
Joined: Fri Feb 21, 2020 4:19 pm

Re: How to make a texture array for buildingShader ?

Post by ben.m »

From the FarmCon20 video I believe that they (GIANTS) are no-longer using the textureArray system for their buildings (Erlengrat) and each building has its own unique texture, like you have done, all on one atlas.
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: How to make a texture array for buildingShader ?

Post by olahaldor »

Ah okay. I'll see if I find the video, perhaps there's something I can pick up on.
TheSuBBie
Posts: 539
Joined: Wed Jun 10, 2020 11:38 am

Re: How to make a texture array for buildingShader ?

Post by TheSuBBie »

FarmCon 20 - Designing the new map for FS19

https://www.youtube.com/watch?v=cQOFOU3n1Lw

at 20.00
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: How to make a texture array for buildingShader ?

Post by olahaldor »

Alright, just to share what knowledge I've learned now with everyone.

The Texture Assembly tool is what you use to create your building array too. You need 16 tiles afaik to make it work with the gradient shader. I've yet to figure out exactly how it works for coloring specific textures in the array.
Post Reply