How to export whole base texture from a Terrain?

Hi guys,

I’m just using Marmoset shaders on my terrain. Shader wants base diffuse and normal maps. Terrain contains 4 textures. I could’nt find a way to export my whole terrain texture. All i can do that, export my splatmap. I can open splatmap in Photoshop, but i can’t add each texture for each color channel.

So is there a way to do this?

Best Regards,

Great question! You could definitely write a script to accomplish this. The script would need the splat map, the four terrain textures (or however many this shader allows), info about how the textures tile, a desired output size, and an empty texture to write the output to.

Determine and keep a variable representing each texture’s relevant splatmap color. For a nested loop the size of your output (in other words, for each pixel of the output texture), examine the splat map to determine the intensity of each texture at that pixel, then determine the pixel’s color by asking “what color would this pixel be if each texture were that visible, tiled as they’re actually tiled on the terrain” and write it to the output texture pixel.

A bit tricky, but not impossible! I don’t know of any alternative to this. I guess you could temporarily flatten the terrain, view it with an orthographic camera at a high resolution, render that camera’s output to a file, and use that. In fact, that might even be easier / superior if you only need to do this operation once. So there’s two ideas for ya! :wink: