Russell Posted October 6, 2020 Share Posted October 6, 2020 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. Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted October 6, 2020 Share Posted October 6, 2020 Sounds like you want a sprite sheet shader. 1 Quote Link to comment Share on other sites More sharing options...
Russell Posted October 6, 2020 Author Share Posted October 6, 2020 I'm trying to learn this: with the help of the Firepit of Shadmar in workshop. I think is a good point to start of to learn. Quote Link to comment Share on other sites More sharing options...
Russell Posted October 6, 2020 Author Share Posted October 6, 2020 Just now, Thirsty Panther said: Sounds like you want a sprite sheet shader. JAJAJAJAJAJAJAJAJAJAJAA!! LOL!! We were writing at the same time!! ? 1 Quote Link to comment Share on other sites More sharing options...
Russell Posted October 6, 2020 Author Share Posted October 6, 2020 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. Quote Link to comment Share on other sites More sharing options...
Marcousik Posted October 7, 2020 Share Posted October 7, 2020 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 1 Quote Link to comment Share on other sites More sharing options...
Russell Posted October 7, 2020 Author Share Posted October 7, 2020 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!! Quote Link to comment Share on other sites More sharing options...
Solution Russell Posted October 7, 2020 Author Solution Share Posted October 7, 2020 @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!! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.