Setting procedural texture materials in Unigine Script


photo

Recommended Posts

Hi all,
 
I'm inheriting a post materials in unigine script using "engine.materials.inheritMaterial", however I can't figure out how to set procedural texture materials in unigine script.
 
In the following example, I can inherit "post_filter_height", "post_filter_gen" and "post_filter_flow" as "post_filter_height_0", "post_filter_gen_0" and "post_filter_flow_0". But after inheriting, how to set "post_filter_gen_0" and "post_filter_flow_0" as the materials for "height" texture in "post_filter_height_0".
 

<material name="post_filter_height">    
	....    
	<texture name="color" pass="post" type="procedural" />
	<texture name="height" pass="post" type="procedural" materials="post_filter_gen,post_filter_flow"/>    
	....
</material>

 
Thanks

Link to post

Try to call setImageTextureProcedural() function on inherited material.

Link to post