Jump to content

Assign dynamic texture name to multiple objects (REDSHIFT)


Recommended Posts

Hello,

I have multiple planes in the scene and I want whem to have same material, but different textures. There will be like 20 of them (named l1.png, l2.png, ...), so I would like to assign texture somehow using dynamic texture name.

I tried using iteration number in material network, but it doesn't work - it uses only the last number.

Added project file with textures. Thank You!

 

image.thumb.png.24aa20c45360c11c36eff0512f2bebff.png


image.thumb.png.9b3ab63ba655ecab09993f14a68485d7.png

example.zip

Edited by wyy
Link to comment
Share on other sites

  • wyy changed the title to Assign dynamic texture name to multiple objects (REDSHIFT)

redshift is a bit limited in this respect as it cannot use string attributes directly.

one way how to do it is what Atom says, but with large amount of textures it would be quite hard to work with, as you need to remember what number is what texture, and connect large amount of nodes (one for each texture, which starts to become a problem if you have dozens or hundreds of textures). 

another way how to go about it is to use Stylesheet, which is much more powerful, but also more tricky to setup. Basically you can create a string attribute that contains name of an image file per primitive, and then read it in Stylesheet a apply it in render time.  

with mantra or karma, you can read string attributes directly in shader, which makes this much more simple and easy to setup.

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...