Announcement

Collapse
No announcement yet.

38 textures, I got one material network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    We make heavy use of instancing all through our game, and it makes a huge difference in performance. This is really how you should be doing it. I built a master material similar to what you are wanting and used scalars and some fancy math to make a full featured material editor used via instancing that allows everything from tinting to uv scaling to more advanced things such as inverting normals and tweaking opacity contrast. Since it's all instances of the same material, it only re-figures the nodes that change. So, if you don't tell it to invert your normals, that part is never loaded into the instance. And, being able to load new textures into it directly from the instance screen and being finished is a huge time saver. This also allows scripters to modify materials directly through scripts at any instanced level, which is the part I like (I'm a scripter).

    ffejnosliw is correct. Learn instancing and use it often. Your master material idea is a very good idea.

    EDIT:
    And, just to clarify, you can make child instances of instances. So, you can set up your materials in a fashion similar to UScripts. Your material would be the same as the object script. You make instances of your material for each category that you'll use if for. We have first level instances such as foliage, city exterior and flooring. You can then create sub instances of each of those instances. You may make sub instances of flooring named Tile, Wood, and Stone. Now, if you alter any of the settings in a parent instance, it'll also change any children that have not already altered that setting themselves.

    For example: You decide that you want all of your foliage to have a higher spec power and you have a spec power scalar in your main material. You can open up the foliage instance, change the value, and all of your foliage will use the new value. Any children of foliage that used a custom spec power already will keep their custom value. If you only wanted to change the spec power on a single foliage instance; say, Oak_Tree_Canopy, then you would just open that instance and change its spec power. The rest of the foliage instances would be unaffected because Oak_Tree_Canopy has no child instances.

    That may be confusing until you learn instancing, but keep in mind that using a master material tends to require good organization to make the best use of it.

    If you need any help with it, let me know.

    Leave a comment:


  • replied
    It sounds like what you want to do is create a "master" material which uses parameters for any aspects that should be configurable and then create MaterialInstanceConstants from the material by right-clicking in Content Browser and choosing Create New Material Instance (Constant) for all the different variations, i.e each of your 38 textures. There are various types of parameter expressions, Texture, Scalar (Float), Vector, etc., that you can use in the "master" material. Any or all of the parameters in a parent material (the "master" material) can be modified in a child (each MaterialInstanceConstant).

    http://udn.epicgames.com/Three/InstancedMaterials.html
    http://udn.epicgames.com/Three/Mater...eConstant.html
    http://udn.epicgames.com/Three/Mater...UserGuide.html

    Leave a comment:


  • replied
    Also to expand this question:
    If have have one kind of material network, can I have one network that can be changed across all materials?

    In case I wanted to tweak the one material network across all materials with the same network, how can I do that? If even possible to be done.

    Leave a comment:


  • started a topic 38 textures, I got one material network

    38 textures, I got one material network

    I need a material for each texture. How can I do this as fast as possible?

    I have a material network that I want applied on all of the textures.

    Any insight would help a lot. Thank you ahead of time.
Working...
X