Pretty vague question but is there a rough amount for something like a landscape? A Dev posted in another forum that they tried to stay under 100 for mobile but not sure the exact details. Right now I have a landscape with 10 texture samples and 226 instructions but I want to get an idea of how many instructions I can have before I start to run into problems. Any advice how how to bench mark something that specific or good techniques to use would be very appreciated.
It all depends on the system your client is using (if you’re asking what I think you’re asking). The more times the device has to call upon a texture the slower the game will run. So, for instance, if you’re making the above mentioned mobile game - you might limit the actual number of textures to 100 by grouping objects together like you would a sprite sheet maybe (setting up the UV maps so that one object is completely in the lower right hand corner while the other is in the upper left). That way several objects could use one texture map and the device need only load that one map as opposed to two or more?
226 seems a bit high. From what I’ve been told there is not limit on the number of instructions you can have, but you will be limited by your computer’s ability.
Also I was told that if you’re targeting PC follow the instructions for the Base Pass shader and if you’re targeting mobile you’ll want to keep an eye on the Vertex instructions.
Thanks for the quick responses. I should probably be more specific about what I’m trying to do. I’m trying to make write a paper on creating landscape materials for a Tech writing class. The problem is that I don’t really know to make landscape materials. I’ve been messing around with the engine for a couple months but still have no idea what I’m doing.
I know that each landscape component can only have 10 textures samples. 2 or 3(still not sure exactly) are used by the engine for lighting.
This only leaves you with 6-7 textures person landscape component.
I wanted as many different types of ground textures as possible so I did something odd that may or may not be more trouble than it’s worth.
I used four different ground textures and “hid” the red channel of the normal map in the alpha channel of the diffuse.
I then added a fifth texture that holds the green channel of each of the texture’s normal map and used the function DeriveNormalZ to rebuild the normal maps.
This give me 4 ground textures with normal maps and 1 additional texture for noise(not sure what else)
I used a bunch more instructions by taking each texture, rotating it, and randomly lerping it back together to prevent the textures from tiling.
Here are screen shots of what I have. I feel like I’m kind of shooting in the dark and stitching together a Frankenstein material so and input would be tremendously helpful.
My biggest concern is the number of instructions.
For a PC based game 224 instructions is really not bad at all for a large landscape material that blends multiple surface types. As an example, the landscape material used in the Vehicle Demo project has 211, the Landscape Demo project material uses 288.
I have built a water material that at one point was over 1200 instructions, it worked just fine but affected performance quite a bit. Currently it is using up 625 instructions (needs some more optimizing), but my FPS is in the 80’s on a GTX 660ti. You are doing the right thing by using the extra channels of a texture for storage though, it will definitely help.
Here’s an updated picture of my material with the normal maps working.
well now I’m using 12 texture samples with no problem.
I found this in the documentation
“This reduces overall Material complexity, allowing the Material applied to the Landscape to contain any number of texture samples as long as the number of samples being used on any individual component never exceeds the maximum set forth by the shader model specifications (16 for SM 3.0).”
And in 4.6 you will be able to have up to 128!!!
Can’t wait! Because of my material setup requirements, I am only able use 6 actual textures with the rest being used by the engine :eek: but not for too much longer!
woah what? was that in the twitch?
I just found out last week after asking a question about the SM5 limit, but have a look here:
Also check out this thread for more info, Daniel from Epic explained it a bit more in depth.
sandford 87 ,that last pic you posted is really nice scene.
keep posting any help/hints you can think of, landscapes for me are a big headache at the moment, stupid black spots keep popping up. and after I get rid of them, they come back if I edit anything.
but that’s a really sharp pic, like it a lot.
Thanks, a lot. Yeah, I feel the same way. I been trying all kinds of stuff and still haven’t gotten the look I wanted or something broke. I’ve also been working on foliage. I’ll post what I have with that when I get a chance.
One thing that would be a break through is a water layer but so far no luck. You can layer diffuse and normals but I haven’t had any luck with the others.