Jump to content

[solved] Need Help showing difuse texture using cheapwater.lua script


Recommended Posts

Posted

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

Screenshot 2018-01-13 12.07.42.png

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.

×
×
  • Create New...