Getting image from sprite atlas

Node-based Shader Editor
Post Reply
tingdo
Posts: 3
Joined: Tue Oct 31, 2017 8:44 am

Getting image from sprite atlas

Post by tingdo »

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!
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Getting image from sprite atlas

Post by Amplify_Borba »

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!
tingdo
Posts: 3
Joined: Tue Oct 31, 2017 8:44 am

Re: Getting image from sprite atlas

Post by tingdo »

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?
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Getting image from sprite atlas

Post by Amplify_Borba »

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!
tingdo
Posts: 3
Joined: Tue Oct 31, 2017 8:44 am

Re: Getting image from sprite atlas

Post by tingdo »

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.
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Getting image from sprite atlas

Post by Amplify_Borba »

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 (126.98 KiB) Viewed 3558 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!
Post Reply