Jump to content

(Solved) Animated textures/materials - Spritesheet & Frame by Frame


Russell
 Share

Go to solution Solved by Russell,

Recommended Posts

Hello team, i have a question that i tried to find on the forum but there are several threads that don't specify what I need (does not exist in LEARN page either). So I will specify my case to see if you can help me by giving me a place to start learning:

I want make animated textures using LUA. Where can i find how make them or an example to learn it?

I don`t want a moving unique texture like this thread :

I have some drawings and textures in several frames, and I would like to know how I can create boxes with those animated textures with all the frames that I have.

I have seen this thread:

But i don`t know how extract the info i need for my purpose...

I want make something similar that the Water Shader (that it uses lot of images to make the movement effect) but in one BOX created with Leadwerks.

I have found this too:

But i don't know how to adapt it to LUA...

Any idea where I could start? I can't find anything to help me in the forum. Or at least nothing that as a newbie helps me play around with my own tests.

Link to comment
Share on other sites

2 minutes ago, Thirsty Panther said:

Sounds like you want a sprite sheet shader.

 

It's more like animated VTF texture files in Hammer (where you have the singles vtf file with all the frames inside, and you control them with the VMT file...

Here in leadwerks it's more like WATER1_0 in EFFECTS inside MATERIALS (there are 63 frames for the water, and then we use them when activate WATER MODER in ROOT...

Sprite sheet isn't a bad idea... But i think i prefer the way of the lot of files in the same folder or file...

Anyway i will learn this thread and the Shadmar's firepit, i can do that i need with a spritesheet too.

Link to comment
Share on other sites

12 hours ago, Marcousik said:

Hi Russel,

Maybe check this, not sure if this answers you rpoint but ok

https://steamcommunity.com/sharedfiles/filedetails/?id=699303085&searchtext=water

https://www.leadwerks.com/workshopitem?tags=Material&queryType=1&fileType=0&fileid=699303085

Out of this I managed to make this:

It applies the water classic effect to CSG boxes

Many thanks Marcousik, i will check it out and I'll tell you how it went for me...

Thank you very much!!

Link to comment
Share on other sites

  • Solution

@Marcousik, CHEAP WATER works ok for me. It's great for me to learn how to make FRAME A FRAME ANIMATIONS using LUA, viewing the code inside the Script "cheapwater.lua". So cool !!

I needed the frame animated water effect for a bath in a room, and for a sink.
Many thanks!!

By the way, yesterday I got; using Shadmar's fire shader as a base; learn how create my own spritesheet animation system.
Thanks to some 2x2 to 10x10 templates that I have prepared with Photoshop, and changing the shadder lines:

//control
float images=6.0;
float speed=150.0;

Where "6" of "images" is for a 6x6 spritesheet template, and the speed between frames, now I can get simple animations that would help me simulate lot of things... ScreenHUDS in monitors, cartoon 2D characters in other locations, and a lot of other very useful things.

2 diferent solutions to satisfy different needs in my game.

As i always say, many thanks team!!

  • Like 1
Link to comment
Share on other sites

  • Russell changed the title to (Solved) Animated textures/materials - Spritesheet & Frame by Frame

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...