UV Select Tile node

Node-based Shader Editor

UV Select Tile node

Postby DuvE » Tue Aug 28, 2018 3:33 am

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.
DuvE
 
Posts: 43
Joined: Thu Nov 23, 2017 6:46 pm

Re: UV Select Tile node

Postby Amplify_Borba » Tue Aug 28, 2018 10:14 am

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!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: UV Select Tile node

Postby DuvE » Tue Aug 28, 2018 11:42 am

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.
DuvE
 
Posts: 43
Joined: Thu Nov 23, 2017 6:46 pm

Re: UV Select Tile node

Postby Amplify_Borba » Tue Aug 28, 2018 1:34 pm

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.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests

cron