burgelkat Posted January 13, 2018 Share Posted January 13, 2018 i have a fx-explosion animation converted in 54 pictures now i would use the cheap water lua to display the explosion. this is the Script (edited) from the cheap Water.lua (Workshop) but this script use the normals. What can i do that it use the difuse texture ? -- Make this the material you used on your face. Script.Material = ""--path function Script:Start() self.textures = { } --(old) Fetch workshop animated water normals(old) for x=0,9,1 do local name = "footagecrate-simpleexplosion22_"..x..".tex" self.textures[x] = Texture:Load("Materials/Effects/Explosion/"..name) end for x=0,54,1 do local name = "footagecrate-simpleexplosion22_"..x..".tex" self.textures[x] = Texture:Load("Materials/Effects/Explosion/"..name) end -- Load material --self.mat = Material:Load(self.Material) self.mat = self.entity:GetMaterial() self.entity:SetMaterial(self.mat) self.model = self.entity self.index=0 end function Script:UpdateWorld() -- Animate normals for texture1 for material if self.index > 54 then self.index=0 end local count = 0 self.index=self.index+Time:GetSpeed()*0.25 count=math.floor(self.index) if self.mat ~= nil then self.mat:SetTexture(self.textures[count],1) end end i have build a spirtesheet too but i have no control over the start picture. iIf I load the material over a script, then it may happen that the explosion starts in the middle. Therefore I can not use the firepit shader. or an ermitter does not work that way. So I had the idea to try the single pictures. sorry for the english i hope you understand what i mean and someone can help by the way this is a nice webside: https://vfx.productioncrate.com/explosion-vfx-categories.html#_ga=2.63300844.238680612.1515842131-1939002152.1515230501 Quote Link to comment Share on other sites More sharing options...
burgelkat Posted January 13, 2018 Author Share Posted January 13, 2018 found it: if self.mat ~= nil then self.mat:SetTexture(self.textures[count],0) end 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.