Jump to content
madebygeoff

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×