Havent been on here for a while. Life got in the way had to take a job none developer, just to get by. S4!t happens huh!
Anyway. Im way behind the times with Engine versions and anything thats changed, so that said the question:
Last i know the only way to change parameters inside a material at runtime was using Dynamic Materials which are assigned at runtime.
Problem:
Im making a base material for textures that are or can be exposed to the elements.
An example of this is the enabling of rain effects (drips, drops, ripples etc) that can be changed in realtime depending on the weather.
If i create the base material with all these functions inside it would make it more productive to work of this for all the required materials so they all have the same effects.
This means LOTS of materials. How on earth can I reduce the impact on how to interact with these materials? My understanding is find all the materials that use the base material, find their assigned meshes, and raise dynamic instances.
This sounds slow and memory consuming and just downright performance hitting.
Has anything changed in respect to this? or is dynamic materials still the only way to do this? or am I missing something silly ie. can the material get information (like it gets vertex or world coords info) that will allow it to read the information in material at runtime?
My suggestion is to look into material functions that can be used in all materials, as well as global parameter collections. These are parameters that can be reused in all materials. It should be all you need, and thus no need for “dynamic materials”. By changing the parameter collection values, the materials should update with the change.
I was already planning using a material function to handle this. But can the parameters be changed at runtime directly into the function? if so this would be perfect, but i was under the impression you couldn’t manipulate the functions from outside the GPU (except via dynamic materials)
If this IS the case however this would be great, I will indeed try this out!