Jump to content

Recommended Posts

Posted

No, it doesn't do that. I was just talking about the foam on the edges, which is done in a similar manner to how my shader controls transparency.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

Okay... Could you add waves or is it that difficult? (Sorry I don't know anything about shaders, maybe I will start study this sometime.)

Because it seems to be used in so much games... I'm asking if it is that heavy to add?

The noise on the water is generated with normals, am I right? Would it not be simplier with shader noise ?

 

 

Posted

Yes it s fascinating. I wonder if the waves could become more than a skin, should actually be transformed in a physics force on swimming objects, if this is possible with a shader...???

 

 

Posted
6 hours ago, gamecreator said:

It would be great to have a simple tutorial or walkthrough for this process as I know nothing about shaders but I'm pretty comfortable learning by modifying.

Alright bro I put it up. Didn't take as long as I thought. It's in Technical Assistance. If there's a specific shader you're eyeballin' I'll make a walkthrough of it.

  • Thanks 1
Posted

Whoa!  Thank you!  I'm gonna read through it.  I don't have a specific one in mind but this opens up a lot of possibilities, if it's as straightforward as it seems.  Josh moved it to the programming forum but here's the link:

Thanks again!

  • Like 1
Posted

To come back to the titel question, "How can I get the area where two objects intersect?"

Does anybody knows anything about communication between shader and script variables?

For example: the water level is now moving because the waves; until now I checked in script the position.y of the player to determine if we nead to hear a splash sound as foot step instead of the common footstep sound. But now seems difficult because the water is not constant anymore. Any idea on this???

 

 

Posted
20 minutes ago, Marcousik said:

To come back to the titel question, "How can I get the area where two objects intersect?"

Does anybody knows anything about communication between shader and script variables?

For example: the water level is now moving because the waves; until now I checked in script the position.y of the player to determine if we nead to hear a splash sound as foot step instead of the common footstep sound. But now seems difficult because the water is not constant anymore. Any idea on this???

Send your information one way from the CPU to the shaders.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
32 minutes ago, JMichaelK said:

Send your information one way from the CPU to the shaders.

Äh thx Josh but I'm novice at this, can you explain what exactly you mean?

Actually I require informations from the shader to the script to determine the water level of the waves or am I wrong?

 

 

Posted
3 hours ago, Marcousik said:

Äh thx Josh but I'm novice at this, can you explain what exactly you mean?

Actually I require informations from the shader to the script to determine the water level of the waves or am I wrong?

Here's an old Shadmar water that shows how you can manipulate a shader in lua:

Create a large plane to be your water plane

Attach the water.lua to the plane

Drag and drop whatever your player or camera is into the "player or camera" slot

apply the normals in the normals slot (you might have to manipulate the normals to get the right size

It will show up when you run your game but not otherwise. But it shows how you can use lua to affect the shader


Edit: Some other examples of this are in the HUD Elements in the Leadwerks workshop. Actually quite a bit but they're all post-render things. The pattern is there, though.

 

shadmar water.zip

  • Like 2
Posted

In the new engine, special water shaders will only require you morph the vertex positions and surface normal and color, because the raytracing system already handles reflection on everything, so it can just use that without requiring any specialized code.

There's also refraction on all transparent surfaces, so you can just use that.

Water used to be a highly specialized system but now all surfaces are being drawn with the same properties.

My job is to make tools you love, with the features you want, and performance you can't live without.

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