Jump to content
Crazycarpet

Cheap water

Recommended Posts

I feel like it'd be great if there was a way to create almost an "environment probe" or something over water, or the area you'd be standing in, that'd make it become "cheap". Cheap water being water without reflections, or any of that really resource intensive stuff. I think in scenes with distant water there's no need for the reflections and huge FPS drop.

 

I think It'd be really cool if there was a way to have inexpensive water in the distance at some point in LE's future.

Share this post


Link to post

Here is a water material I've made. Apply it to a face of a box brush and set the collision type to trigger.

 

You also need to add this script to it so it animates the normal map. This is based off an old script Shadmar made but it checks what face the water is on. Just make sure self.Material is the same as the material you've placed on your face.

 

It uses probe reflections so it's very inexpensive when it comes to that.

 

-- Make this the material you used on your face.
Script.Material = ""--path
function Script:Start()
 self.textures = { }
 -- Fetch workshop animated water normals
 for x=0,9,1
 do
		 local name = "water1_"..x..".tex"
		 self.textures[x] = Texture:Load("Materials/Effects/Water/"..name)
 end
 for x=10,63,1
 do
		 local name = "water1_"..x..".tex"
		 self.textures[x] = Texture:Load("Materials/Effects/Water/"..name)
 end
 -- Load material
 self.mat = Material:Load(self.Material)

-- Only apply the water texture to the face where we've assigned it.
if self.entity:GetClassName()=="Brush" then
tolua.cast(self.entity, "Brush")
System:Print(self.entity:GetFace(0):GetMaterial())
if self.entity:GetFace(0):GetMaterial() == self.Material then
self.entity:SetMaterial(self.mat)
end
end
 self.index=0
end
function Script:UpdateWorld()
 -- Animate normals for texture1 for material
 if self.index > 63 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

cheepwater.zip

Share this post


Link to post

Basic marketing: it's not "cheap" water, it's inexpensive water. ;)

Share this post


Link to post

Fixed, When it comes to game assets, I don't see the word "cheap" negatively, but I see your point.

Share this post


Link to post

Joking, but I have actually had that discussion before and was corrected.

Share this post


Link to post

Thanks for this! I had a bit of a go at this a while ago but the results weren't pretty.

Share this post


Link to post

Hey,

Since I can't create pools of water with the leadwerks water solution, I tried to use this asset made by reepblue, idk why but there is no reflections and color in the water in my tests. The animation works fine.

Ip2YsPJ.png

I remember the game Evaluation Abridged by Einlander has a nice water:

tS1XaIv.jpg

Anyone know how I can get the same results?

I really appreciate your help :)

Share this post


Link to post

Set water quality to 1 or 2.  What you are showing is the default for integrated graphics (low).

Share this post


Link to post

The global water is working great, its his water that I am having trouble :P

Also I think that the water in the Evaluation Abridged is the global leadwerks water.

XICHOTv.jpg

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...