Jump to content

Redshift: instances with offset animated texture


Recommended Posts

Anyone know of a simple way to set a bunch of instances to each use the same image sequence as a texture, but with each instance offset by a certain number of frames.

You can't promote the file path in the RS texture node, so I can't use local overrides.

The best I've been able to do is set a bunch of individual textures each accessing the images sequence offset a little bit in time. Then use a point wrangle to write out different shop_material paths for each instance. It works, but creates a boatload of shader VOPs.

But I can't think of how to do it in a single shader VOP.

Link to comment
Share on other sites

So the solution is the good old stylesheet.

-- First edit the parameter interface on the RS material builder VOP and drag the filename field from the texture node inside the VOP into the interface, effectively promoting that file path field so it is exposed on the VOP.

-- Then add a new stylesheet and style to your object
-- Add a target: point instances
-- Add a condition: Point name or path attribbute: value=*
-- Add an override: Set material  type=Material  override path=/mat/path_to_your_shader_VOP
-- Add an override script: type=Material Parameter   Override name=the name of the parameter you promoted above (tex0 by default)  Override type=Attribute binding  Value=myFilePath

Then add an attribCreate node to your SOP chain for the packed objects

Make a string attribute myFilePath and set it to whatever file path you want complete with any expressions to offset the frame numbers per point instance. For instance: /path/to/my/image/sequence/myImgSeq.`padzero(4, $F + ($PT*10))`.exr

Offsets each instance by 10 frames.

  • Like 1
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.

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