Getting image from sprite atlas

Node-based Shader Editor

Getting image from sprite atlas

Postby tingdo » Tue Oct 31, 2017 8:48 am

Hi,

was just wondering, I have this sprite atlas. But how do I have the shader retrieve a portion of the atlas and display it?

Thanks!
tingdo
 
Posts: 3
Joined: Tue Oct 31, 2017 8:44 am

Re: Getting image from sprite atlas

Postby Amplify_Borba » Tue Oct 31, 2017 10:37 am

Hello tingdo,

Thank you for getting in touch and for your support!

We do provide a couple of examples in the ASE package, more specifically in the Examples > Official > ReadFromAtlasTiled folder, that can point you in the right direction.

Please let me know if these examples are useful or if you have any further questions, 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: Getting image from sprite atlas

Postby tingdo » Wed Nov 01, 2017 6:18 am

AH! I see thats really great, the examples are a great help. Should have spent more time poking around in the folders!

Just one more thing. How would I add a panner to this?
tingdo
 
Posts: 3
Joined: Tue Oct 31, 2017 8:44 am

Re: Getting image from sprite atlas

Postby Amplify_Borba » Wed Nov 01, 2017 11:57 am

tingdo wrote:AH! I see thats really great, the examples are a great help. Should have spent more time poking around in the folders!

Just one more thing. How would I add a panner to this?


We do provide a Panner node with a Time property that allows panning over time or manually, would you kindly elaborate on the intended use for it?
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: Getting image from sprite atlas

Postby tingdo » Thu Nov 02, 2017 2:04 am

Oh sorry, yea I am trying to apply the panner node to the texture that was cut out from the atlas, but cant figure out where to plug the panner node in?

Trying to make a panning signboard with just that texture from the atlas.
tingdo
 
Posts: 3
Joined: Tue Oct 31, 2017 8:44 am

Re: Getting image from sprite atlas

Postby Amplify_Borba » Thu Nov 02, 2017 10:16 am

tingdo wrote:Oh sorry, yea I am trying to apply the panner node to the texture that was cut out from the atlas, but cant figure out where to plug the panner node in?

Trying to make a panning signboard with just that texture from the atlas.


The ReadFromAtlasTiled sample wasn't build to account for that specific use, so it would require some extensive modifications, however I can point out a simple way of doing it that might be useful for you to get started on your own shader, or even modify the aforementioned one!

pan.jpg
pan.jpg (127.39 KiB) Viewed 2515 times


The key node here is Fract, you may read more about it on the wiki.

Please let me know if this information was useful and if you have any further questions, 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


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 36 guests