Page 1 of 1

UV Select Tile node

PostPosted: Tue Aug 28, 2018 3:33 am
by DuvE
Hi,

Does ASE have a node similar to this one? https://prnt.sc/knnall

Basically, a node to select a tile from sprite sheet for example.

Re: UV Select Tile node

PostPosted: Tue Aug 28, 2018 10:14 am
by Amplify_Borba
Hello, although we don't have an equivalent node, you can achieve similar results by using the node setup in the Read from Atlas sample, which you can find in the AmplifyShaderEditor\Examples\Official\ReadFromAtlasTiled folder.

Please let me know if this helps, thanks!

Re: UV Select Tile node

PostPosted: Tue Aug 28, 2018 11:42 am
by DuvE
Hi,

It's not quite what I was looking for. In that example, you need to know the size of the texture. But I want to just send the random int from 1 to 9 and select the tile according to this number.

Re: UV Select Tile node

PostPosted: Tue Aug 28, 2018 1:34 pm
by Amplify_Borba
In the above sample you'd have to tweak it in order to accommodate to your needs, however, there might be a simpler solution through the use of our Flipbook function, as per the example below:

Image

Even though its supposed to animate the transition, you can set the Time parameter to 0, and be sure to have your texture's 'Wrap Mode' set to 'Repeat'. In your particular case, you'll also have to pass the random number to the Start Frame Input.

You can also edit this function in order to see how we've set it up and, if you prefer, create your own simplified custom function.