Page 1 of 2

Move a texture with an object?

Posted: Fri Oct 06, 2017 3:51 pm
by ruuterdetuuter
Hi,

Is there a possibility to let textures move with an object? Like in LW you can set a reference object and the texture follows this?

I was thinking about spot info connected to the U and V translation inputs... but that doesnt do anything..

thanks in advance.
Ruud

Re: Move a texture with an object?

Posted: Sat Oct 07, 2017 9:41 am
by juanjgon
The spot info is not going to work because this information is not available in the Octane context, but I suppose that you can link the position info from any object item info node to the translation input of the Octane projection node.

Be aware that perhaps this workflow is not going to work in realtime in the IPR, but if you reload the scene or redraw it, the texture should move with the reference object.

Thanks,
-Juanjo

Re: Move a texture with an object?

Posted: Sat Oct 07, 2017 3:54 pm
by ruuterdetuuter
Thanks, but whenever I move the object, the texture on the surface goes another way..

Thanks in advance,
Ruud

Re: Move a texture with an object?

Posted: Sat Oct 07, 2017 6:03 pm
by mikefrisk
ruuterdetuuter wrote:Thanks, but whenever I move the object, the texture on the surface goes another way..

Thanks in advance,
Ruud
Just a hunch, you could try using "world position" instead of "position".

Re: Move a texture with an object?

Posted: Sun Oct 08, 2017 9:06 am
by ruuterdetuuter
I did, but it didn't make a difference.
Thanks for the suggestion

Re: Move a texture with an object?

Posted: Sun Oct 08, 2017 9:21 am
by juanjgon
ruuterdetuuter wrote:Thanks, but whenever I move the object, the texture on the surface goes another way..

Thanks in advance,
Ruud
Probably you need some math nodes to adjust the coordinates system. Octane has the Z axis inverted, so you should try to invert this axis to see if it works.

Thanks,
-Juanjo

Re: Move a texture with an object?

Posted: Mon Oct 09, 2017 6:40 pm
by ruuterdetuuter
I can get it to invert (-100 scale on the Add Scaled Node) But then it inverts on the X axis also... Is there a way to invert only the Z-Axis?

Re: Move a texture with an object?

Posted: Mon Oct 09, 2017 8:53 pm
by juanjgon
You could use the Vector Scalar node to extract the X, Y and Z components, invert the Z and use the Make Vector node to build the vector again.

Thanks,
-Juanjo

Re: Move a texture with an object?

Posted: Tue Oct 10, 2017 6:37 pm
by ruuterdetuuter
Thanks Juanjgon for thinking along. But I cannot make it work. The nodes are not working as I'd like them to work... Maybe for the next update of Octane it would be an idea to just invert the Z axis? or otherwise deliver a node that does just that?

Thanks again. Hoping for other suggestions.

Re: Move a texture with an object?

Posted: Tue Oct 10, 2017 11:02 pm
by juanjgon
Weird. It should work. Attached you have a sample scene. Put any file in the texture node and check what happens if you move the Null object. Remember that you must reload the scene in the IPR to see the changes.

Thanks,
-Juanjo