How to use a texture sequence?

   9027   10   2
User Avatar
Member
7 posts
Joined: Nov. 2006
Offline
How can I use an animated texture sequence in Solaris/Karma? i.e. /path/to/mytexture.$F.exr

Neither the principled shader nor the texture node will read the texture at all with $F in the path (I've tried adding the path to the rendering parameters on the containing material library as well to see if that would work but no). The OSL texture will read the texture but the expansion of $F seems to get baked in to the shader compile as it doesn't change when the frame changes.
User Avatar
Staff
4435 posts
Joined: July 2005
Offline
You have to encode an animated string attribute for the texture map, rather than putting “$F” in the string attribute. For performance reasons, it is advisable not to animate parameters on VOP nodes inside the Material Library LOP (though you can if you turn on the “Allow Shader Parameter Animation” option). Instead, you should author the initial parameter value in the Material Library LOP, and then animate it with a following Edit Properties LOP. This is all demonstrated in the attached hip file.

Attachments:
animated_texture.hip (326.2 KB)

User Avatar
Member
7 posts
Joined: Nov. 2006
Offline
Thanks, that works! How would I modify that to use a texture plugged into basecolor instead of using the texture parameter on the principled shader itself? I've tried promoting the map parameter from the texture node and then adding that to the edit properties lop, but that doesn't change the texture path in the shader.
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
In these cases it's best to author the surface shader inside a Material Builder VOP.

Otherwise, you should be still able to use Parameter VOP like you tried, but then you will need to edit the material attribute rather than shader attribute, because Parm VOP authors a shader connection from the shader prim to the material prim.
User Avatar
Member
192 posts
Joined: April 2015
Offline
Excuse me guys if I may,
But do you see these textures dynamically update/animate in the viewport when you scrub the timeline?

I do not see them being animated, also not when viewport rendering, but that may be an performance issue on my Mac. Just the one that popped on when it loaded stays.

edit:: I do see animated textures tho in the normal Houdini viewport.

further edit:: I do not see it being animated in the Solaris viewport/viewport render, also not when I write it out as .usdnc and sublayer it in a new hipfile. The frame does change in the shader property, but not in the viewport.
I assigned the exact same texture sequence in the Edit Properties LOP as in the traditional uvquickshade and /mat context.
Edited by OdFotan - Oct. 6, 2020 07:13:44

Attachments:
Screenshot 2020-10-01 at 10.21.00.png (69.7 KB)

User Avatar
Member
192 posts
Joined: April 2015
Offline
Okay I tested it on a friend who has a much better computer and there the texture also doesn't update in the viewport or the viewport-render.

Can someone (who has Houdini Indie) maybe
confirm that it does work when you output renders/USD files? (Karma/3Delight)
I’m on Apprentice.
Edited by OdFotan - Oct. 6, 2020 07:20:34
User Avatar
Staff
4435 posts
Joined: July 2005
Offline
Please post a hip file showing a mockup of the setup that isn't working (including a few frames worth of textures). Asking for other forum users to create an example file for you is a much bigger request than “can you take a look at this file and tell me what's wrong”. So you're a lot less likely to find someone with the time to help.

Also, given that @anderslanglands says it is working, there is reason to believe that the problem lies in your setup, so it makes a lot more sense for you to share that setup than get a working example and have to spend your time comparing the two to figure out the difference.
User Avatar
Member
192 posts
Joined: April 2015
Offline
Yes I get that, but that's why I asked if people saw it update in the viewport.
Implying, perhaps a bit unclearly, that saying ‘it works’, might just mean that people can render it in the USD Render ROP.

For the file: just the example file posted here is a good example. When I download it, change the extension to .hipnc and open it, I don't see the texture animate on time scrub. Also not on my friend's high speed Mac.

The property does change like in my screenshot, and this same texture "$HFS/houdini/pic/butterfly$F.pic" does animate on time-scrub on my uvquickshade sop.

I don't know what's going on, if this viewport update is expected to work, etc,
Thus there may be some variables like Apprentice version, macOS, Solaris being new, it not being a feature yet, but I do not suspect it to come from setup.

Thanks and sorry for my unclear communication,
Edited by OdFotan - Oct. 6, 2020 10:46:48

Attachments:
animated_texture2.hipnc (362.9 KB)

User Avatar
Staff
4435 posts
Joined: July 2005
Offline
I can confirm that it is not updating in the viewport for me in Houdini 18.0, using either Houdini GL or the Karma render delegates (to give it any change of working with Houdini GL, the preview texture UsdShade prim needs its own Edit Properties LOP). It looks like they are both pulling out the “default” value of the testure file attribute rather than the attribute value for the current time. But I can also say that both of them work in the upcoming Houdini 18.5 (with one small glitch in Houdini GL which I'll be reporting as a bug). So my best advice at this moment would be to wait a little while for the upgrade…
User Avatar
Member
192 posts
Joined: April 2015
Offline
Okay thanks, mtucker.
User Avatar
Member
11 posts
Joined: July 2017
Offline
how to control lots of animated textures with differnt play back parameters, offset, speed :"lots of tvs playing lots of different videos"
  • Quick Links