Picking random texture map for video wall effect

   1878   3   0
User Avatar
Member
3 posts
Joined: June 2018
Offline
I have a video wall type effect that I am building out of a system of boxes. Each box needs to randomly pick a texture, where the texture map is coming from a pool of 250 videos. The videos are all in the same folder with sequential names (video1, video2… video 250). Other than the texture map itself, the rest of the material parameters are all the same, so I would prefer not to have to make 250 textures in my shopnet and just use one which I change the texture map value. Is there a way using VEX to select the texture map based on a random value or the object/particle number (modulo), maybe using a wrangle?
User Avatar
Member
323 posts
Joined: Jan. 2015
Online
https://vimeo.com/262883554 [vimeo.com]
is the webinar you want to watch…
User Avatar
Member
8554 posts
Joined: July 2007
Offline
alternative to stylesheets and much simpler to setup is to just create prim attribute of the same name and type as the material parameter that you want to overwrite

as in general attributes with the same name and type overwrite the values defined by Parameter VOP
unless the attributes are on packed primitives, then you have to use Render State VOP to bring them in

but if you want to overwrite subset of the geometry inside of packed primitives
or don't want to touch your geo in SOPs at all
or have a need to see the result in the viewport not just Mantra
then I would reach for stylesheets
Edited by tamte - July 31, 2018 23:17:21
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
3 posts
Joined: June 2018
Offline
I should have mentioned at the beginning I am using Redshift. Tried using the prim attribute, but it doesn't look like you can promote the “filename” parameter in the Redshift texture sampler node. Will look at stylesheets next as an alternative. It was also suggested that I try using the <udim> option in Redshift, which I will also look at. Other suggestions appreciated!
  • Quick Links