Page 1 of 1

Is there any way to use same texture node but with offset

Posted: Thu Sep 17, 2015 11:08 am
by Wallan
I have to apply two textures to different part of a mesh.
I have made a mask that distribute the textures on the mesh.

However, as the two textures are the same texture with some offset in the UV added it would be nice to be able to only use one texture node.
I could of course use two texture nodes with same texture offsetting the UV mapping on one of them.
As I understand it I wont use more memory on graphic card as Octane understand it's the same texture.
But, when i need to change textures I need to change twice as many texture nodes and I want to avoid that.

So is there a way to solve this.
Considering what the Color Correction node does, what I'm looking for is a "UV Correction Node" or maybe a texture node that can take another texture nod as input.
Is there possibly already some functionality in some node that can do what i need?

A possible alternative I'm thinking of could be if it's possible to use the scripted node.
I have not looked into it much so far but if it could be trigger by a change of texture in myTextureNode 1 and setting same texture in myTextureNode2 then it could be an acceptable workaround.
If so some sample code of how to do it would be appreciated.

Re: Is there any way to use same texture node but with offset

Posted: Thu Sep 17, 2015 1:07 pm
by bepeg4d
Hi,
please, could you share a simple file that shows what you want to obtain?
A scripted graph node seems the correct answer but is better to have a real example ;)
ciao beppe

Re: Is there any way to use same texture node but with offset

Posted: Thu Sep 17, 2015 1:43 pm
by Wallan
Basically the same as I could do with a ColorCorrection Node

ImageTextureNode>-------------------------------->Color Correction Node>--------------------->ImageTextureWithColorCorrection
|
|------------------------------------------------------------------------------------------------------------------------->ImageTextureOriginal



But, instead of correcting color i want to adjust UV like:

ImageTextureNode>-------------------------------->NodeCreatingUVoffset(possibly a ScriptedGraphNode)>--------------------->ImageTextureNodeWithCorrectedUV
|
|------------------------------------------------------------------------------------------------------------------------->ImageTextureWithOriginalUV

Re: Is there any way to use same texture node but with offset

Posted: Thu Sep 17, 2015 3:03 pm
by Wallan
This is as close as I get. Have made code that creates the connections for texture and transform input and texture output but cant figure out how to write the code that actually does something.
OctaneFlow.png

Re: Is there any way to use same texture node but with offset

Posted: Fri Sep 18, 2015 12:30 pm
by Wallan
Moving question to LUA coding forum instead as I'm quite sure a ScriptNode is the solution.