mystara
Member
|
Dynamically create water areas
Hello!
I'm wondering if anyone has any ideas of how I can create water areas dynamically (i.e. in-game)?
I noticed that WaterArea used to have a create() function, but this no longer seems to be present, and it's not obvious from the documentation as to how one might create a WaterArea without using the editor.
Specifically what I'm trying to do is create a portal with a water/ripple effect. I can create the mesh for the portal itself dynamically. But I'm at a loss as to how to produce an animated ripple/water effect on the mesh.
Obviously I want to avoid using the Water class, since that seems to cover an entire plane rather than a single mesh.
Thoughts?
|
|
07-30-2011 11:52 AM |
|
kulesz
Member
|
RE: Dynamically create water areas
Wasn't there some global container for lakes/ rivers (just like grass etc) ? Or it was just in the roadmap?
(This post was last modified: 08-01-2011 08:28 AM by kulesz.)
|
|
08-01-2011 08:28 AM |
|
mystara
Member
|
RE: Dynamically create water areas
hmmm, interesting.
There *is* a "WE Water" file, forming part of the Edit namespace.
It does contain a Lake object, which contains a WaterArea. Though I'm not sure if this is available for use. Obviously there are no examples :/
|
|
08-01-2011 08:32 AM |
|
mystara
Member
|
RE: Dynamically create water areas
@Esenthel:
Any chance you could let us know how to manually apply the water shader to a mesh? I think it's necessary to set a bunch of parameters, but I don't know what they're all called or do
I figure that if I can do that, it would give the effect I'm looking for
|
|
08-01-2011 05:55 PM |
|
Esenthel
Administrator
|
RE: Dynamically create water areas
do you need the portal to be vertical? (standing) or horizontal (laying down)
water shader supports only laying down orientation.
|
|
08-02-2011 12:30 PM |
|
mystara
Member
|
RE: Dynamically create water areas
Yeah, I need them to be vertical (standing).
Dang.
Any ideas how I might best produce what I'm looking for?
|
|
08-02-2011 12:31 PM |
|
Esenthel
Administrator
|
RE: Dynamically create water areas
You can make your own blend shader, as in tutorials, and add ripple effect manually.
I know you have some problems with running the shader tutorials on Mac. Please give me some time to investigate this (at the moment I don't know why CG is producing incorrect results for you), I will need to check this.
|
|
08-02-2011 12:33 PM |
|
mystara
Member
|
RE: Dynamically create water areas
hrm, does that involve some clever use of RippleFx, or would I basically need to write my own shader from scratch?
When you say blend shader, do you mean Shader Combinations?
|
|
08-02-2011 12:37 PM |
|
Esenthel
Administrator
|
RE: Dynamically create water areas
RippleFx is builtin 2d effect, so it won't help you.
Yes you will need to write your own shader.
I think 1st shader tutorial uses blend shader (also "shader parameters for different instances" tutorial)
|
|
08-02-2011 12:40 PM |
|