Animated Textures

Forums: Animated Textures
Houdini Integrated Plugin

Moderator: juanjgon

Animated Textures

Postby bassruettler » Tue Apr 14, 2020 6:39 am

bassruettler Tue Apr 14, 2020 6:39 am
Hi,

I've got a bit of a problem:
I have several planes in my scene that I need to play an animated texture, but starting at different times.
Is there any way of achieving that procedurally? E.g. by passing a float attribute containing the frame number of the image sequence for the image texture node to load?
Problem is, I can't fake it by just having different shaders with different image textures. Being in Houdini, the setup for the scene is both large and procedural.
I tried doing it with an OSL texture, but that also doesn't work because Octane's OSL implementation doesn't support string operations. (Otherwise I could just pass the frame number as float and then concatenate a string for the actual image file to load)

Anybody have any ideas?
Thanks!
bassruettler
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Fri Jan 10, 2020 5:24 pm

Re: Animated Textures

Postby efxlab » Tue Apr 14, 2020 10:31 am

efxlab Tue Apr 14, 2020 10:31 am
if you got how to do Iam too interested. Iam too unable to animate a texture by its UV translation with any Houdini attribute (float or color).
efxlab
Licensed Customer
Licensed Customer
 
Posts: 54
Joined: Thu May 31, 2018 5:23 pm

Re: Animated Textures

Postby juanjgon » Tue Apr 14, 2020 11:16 am

juanjgon Tue Apr 14, 2020 11:16 am
Hi,

Sorry, I'm afraid that currently Octane doesn't support string attributes, or attributes in the texture nodes. You can use any kind of expression in the texture file parameters including $F to configure a frame offset, but nothing from an object attribute.

Thanks,
-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Animated Textures

Postby juanjgon » Tue Apr 14, 2020 11:18 am

juanjgon Tue Apr 14, 2020 11:18 am
The only workaround that comes to my mind is to use texture mixer nodes and a vertex attribute linked to the mix amount parameter to select the texture to be used. Not sure if this could help ...

Thanks,
-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Animated Textures

Postby fantome » Tue Apr 14, 2020 11:24 am

fantome Tue Apr 14, 2020 11:24 am
Maybe as B-Plan you could use mantra to create the texture procodurally, then render a mantra pre-pass from your camera , and then camap this prepass in your octane texture slot ?
old school , but might work ? Other options would be to apply the same logic but with COPs and a Mantra prepass in UV space ?

Those kind of things are really easier to deal , in that other GPU engine we should not named. ;)
User avatar
fantome
Licensed Customer
Licensed Customer
 
Posts: 266
Joined: Wed Dec 16, 2015 3:38 pm

Re: Animated Textures

Postby bassruettler » Tue Apr 14, 2020 11:53 am

bassruettler Tue Apr 14, 2020 11:53 am
juanjgon wrote:The only workaround that comes to my mind is to use texture mixer nodes and a vertex attribute linked to the mix amount parameter to select the texture to be used. Not sure if this could help ...

If I had to switch static textures based on attributes, that would be the way to go. Unfortunately I need to switch between sequences + offset, so that would be a few hundred image texture nodes to setup just for one sequence :D


fantome wrote:...mantra pre-pass from your camera , and then camap this prepass in your octane texture slot ?

I'm not quite sure what you mean by that, what's a camap?
bassruettler
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Fri Jan 10, 2020 5:24 pm

Re: Animated Textures

Postby fantome » Tue Apr 14, 2020 12:11 pm

fantome Tue Apr 14, 2020 12:11 pm
well.
- if you have 1000 planes that are textured with the same animated texture but with a per object time offset.
- you could create a mantra constant shader that will be able to render this texture correctly
- then render your objects throw your render camera in mantra
- then create a camera mapping for your 1000 planes to do that you will have to create your UV projection from your render camera perspective
- then you load your mantra render in your octane texture slot as an animated texture and you use your UV's created from the camera projection
- if you don't want to destroy your initial uv set you can create an extra uvset for camera projection by creating an extra uv sets with @uv1 and use it for the texture loader of your image sequence only

It might work ?
User avatar
fantome
Licensed Customer
Licensed Customer
 
Posts: 266
Joined: Wed Dec 16, 2015 3:38 pm

Re: Animated Textures

Postby efxlab » Tue Apr 14, 2020 6:19 pm

efxlab Tue Apr 14, 2020 6:19 pm
@juanjgon, you say : user vertex attribute may control the mix amount parameter when its linked to.
So is it possible to control Translation parameter (vector) from Transform node with user color vertex attribute and have a texture position different by group (prim) ?
The idea is to texturise 40 groups in one object with one material, Material has variation offset texture per group with the color vertex attribute.
efxlab
Licensed Customer
Licensed Customer
 
Posts: 54
Joined: Thu May 31, 2018 5:23 pm

Re: Animated Textures

Postby juanjgon » Tue Apr 14, 2020 6:29 pm

juanjgon Tue Apr 14, 2020 6:29 pm
I don't think so. Probably the vertex attributes only work for shading, but not to drive the parameters of the transform nodes.

Thanks,
-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Animated Textures

Postby bassruettler » Wed Apr 15, 2020 4:16 pm

bassruettler Wed Apr 15, 2020 4:16 pm
fantome wrote:well.
- if you have 1000 planes that are textured with the same animated texture but with a per object time offset.
- you could create a mantra constant shader that will be able to render this texture correctly
- then render your objects throw your render camera in mantra
- then create a camera mapping for your 1000 planes to do that you will have to create your UV projection from your render camera perspective
- then you load your mantra render in your octane texture slot as an animated texture and you use your UV's created from the camera projection
- if you don't want to destroy your initial uv set you can create an extra uvset for camera projection by creating an extra uv sets with @uv1 and use it for the texture loader of your image sequence only

It might work ?



Thanks for the tip. It works well enough for my purposes, so that's what I'll be doing for now.

Quite tedious though, would be nice if in the future we had some kind of functionality for that. A similar node to the print node in mantra + ability to set the file path in the image texture node would be great.
Though I don't know anything about how the octane plugin works, maybe the octane core has to support string attributes first. @juanjgon
bassruettler
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Fri Jan 10, 2020 5:24 pm
Next

Return to Houdini


Who is online

Users browsing this forum: No registered users and 21 guests

Fri Apr 26, 2024 2:54 am [ UTC ]