Author Topic: Node optimization tips  (Read 1409 times)

Copying this from the thread on optimization.

On the topic of optimization, i read the new published guidelines for optimization and I still have some doubts.

I started a substance our team is aiming to use ingame. We need to texture a hard surface type of props, which are the main objects in the game and have different materials on them. The idea is to nail down or texture/material pipeline to be optimized for VR and mobile for the very scratch, even though for now the game is aiming to PC's. The art direction allows us to aim for a general optimization from the very start.

I tried two a approches, one which to me seems minimal (even though it uses more nodes) and one more streamlined:

The minimal approach is: Create masks from the ID map using the Color to Mask node, then create a bunch of blend nodes to combine each mask accordingly. That means, imagine there are 3 materials on the prop, then i use 3 Color to Mask Nodes, then there is a section with 3 blend nodes for color, another section with 3 blend nodes for roughness and similarly for metallic (there is no height and the normal and AO are baked). The blend nodes combine the color required with the mask and then with the next color and so on.

The streamlined approach is to use the Multimaterial Blend. In this case i have a custom node with exposed parameters to define the materials i need, then combine them using the Multimaterial Blend.

Judgingd by the time of each node on the graph it seems that the minimal approach is better, but i want to be sure on how to judge this kind of constructions.

On the other hand, i have a similar question regarding the Mask Builder (and nodes derived from it). I create a simple 2 blend node setup using the curvature and AO (plugged in to the mask of each blend) to create wear in our props which mostly works. Time wise it is faster than the Mask Builder, but i need a little bit more complex mask creator, probably adding two more blend nodes. Is it worth to create a custom one or am i wasting time and should use the Mask Builder?

In general

How much the time displayed on the nodes matter to consider it in optimization?

Is there any way of prioritizing which node i should primarily use and which are meant to be used just if needed (or not at all)? something on the lines of: "Blend, thisNoise, thatNoise, thatNode... are usually ok to use but forget about this other ones". For example, the Grunge Maps are a bad idea if you want to use the substance in an engine (more over on mobile), right? which nodes are as bad or in the next step of "badness" and so on.

I hope I explained myself.