Hi fellas,
I’ve got some issues optimizing the landscape shader(material). Could you help me out and take a look at it perhaps?
I’ve got the feeling that it’s freaking out on the textures that I applied. Even though it’s got 12/12 unique textures (says it up top)
I create some layers that are merged (LERP’d) from 2 other unique textures. For example, the SandMud layer. When I start to paint this layer, the landscape just turns blue-white (default material). Once removed, it’s good again.
Does this have to do with the total amount of textures that are used on 1 polygon?
What do you think of the pixel-alpha blend for the UV’s ? Does this eat performance, shall I just leave it to be or keep it in?
The way I blend layers, is there a more efficient way to do this?
Is there a way to make a cheaper tiberium mask ? (see tiberium section in material) It’s quite expensive right now with many rotators and stuff.
General feedback on how I’ve setup this material please. I thought I had done it well but it seems that UDK can’t handle it somehow. When I keep working with it I have many random UDK crashes (god knows why). It’s very frustrating.
Link to file containing landscape shader (M_Shader_Landscape)
I can’t help you because I have not very much experience with landscape materials.
In my material I only have 9 textures. Using more, some black areas appears in the map. I think that there are a limitation of textures used in each landscape component.
I have a plan to use texture atlas for the landscape, but not yet. Perhaps using atlases you can replace blend nodes by textures previously blended.
To test the performance, I have some places in the map, bookmarked. I run the game from these places, removing all the pawns and foliage, without framerate limitations. So I can compare the performance before and after changing something.
The thing is that, once I start using texture atlasing i can no longer hot-swap the textures in the editor for the landscape on an individual basis. I’d have to edit them in photoshop and re-import them every time. That’s not what I want to actually but thanks for the tip anyway. I’m looking for something else.
You can use texture atlas to resolve texture count, and use temporally individual textures to test and adjust, setting the texture properties or using nodes in the material. Better if you are using a material instance to change values in runtime. Once you have the desired values, edit the atlas to add the changes and remove the individual texture or use for another test with another layer.
the 12/12 textures are only what is being sampled by the material editor based on the preview weights you put on your layers on the landscape blend nodes. if you put the preview weights of all layers to 1 it would be the equivalent of painting all layers, and you’ll also see how it breaks there in the material editor.
the issue with your material is that you’re blending too many textures already in each layer. the most obvious thing to do is to pack your SpecularMap into the alpha channel of your Diffuse, and optionally multiply that with a vector (color) if you want colored speculars.