Jump to content

Create Quick Material in foreach


Spike

Recommended Posts

Hi i want to create/assign different (quick) materials in a for each loop - somehow it doesn't work out as expected -> each loop I create an object, in the labs quick material I name the material based on "iteration" of the meta tag

but at the end the shop_materialpath is the same for every element - I guess that each loop the material gets assigned and in the next loop overwritten -> and this way all elements update their material path.

What is the best way to handle this problem - the goal is to create procedural many materials for unreal

ps: I also tried the same thing with copy stamp sop

 

Thanks for help

image (37).png

Link to comment
Share on other sites

what you want to do is to create different materials first and then generate a shop_material path attribute inside your loop, that's pointing to them. 

alternatively you can choose a reverse approach where you have a single material and for each piece you generate different parameteres (like texture path) that are then piped into the material. depends what you need to do. 

the setup i see at the picture doesn't make much sense. what you are trying to do is to have multiple names for a single node, which can't be done.

even if it somehow worked, you'd end up with having the same material for all pieces, only with a different name. so at the end of the day it'd be the same like having the same material on all pieces.

cheers, D.

 

Link to comment
Share on other sites

 
 
 
 
50 minutes ago, davpe said:

what you want to do is to create different materials first and then generate a shop_material path attribute inside your loop, that's pointing to them. 

As i mentioned - the only goal is that unreal realizes that every grid created in the foreach loop uses a different material so...

 

Quote

alternatively you can choose a reverse approach where you have a single material and for each piece you generate different parameteres (like texture path) that are then piped into the material. depends what you need to do. 

... thats the reason this solution doesnt work too

Quote

the setup i see at the picture doesn't make much sense. what you are trying to do is to have multiple names for a single node, which can't be done.

so the question is what parameters does unreal need to know that an object has a different material

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...