It's not something you'd be able to import - it'd be a rewrite. The point I was making is that you could swipe the way the geometry is set up and port that over to UE4. At that point it wouldn't be a third party thing (T3D is MIT licensed, so there's no issue porting the code, license wise).
Originally Posted by WCode
But that wouldn't be a full solution, just a start on the part of the code that differentiates a regular bounded ocean plane from an infinite one (being attached to the camera, and smoothly stretching to the horizon).
Here's a link to the header and source file for Torque3D's WaterPlane object.
In particular, the stuff I'm talking about is all documented in the function
It explains in detail in the comments of that function what's needed to set up a vert buffer with a grid and a skirt of verts that go out to the horizon. You'd want to implement the same setup into a CustomMeshRender component or something like that.
void WaterPlane::setupVBIB( SceneRenderState *state )
That (skirt that goes out to horizon on the ocean grid) and making the grid itself follow the camera (except for height) are the main components you need for this, after which it's a matter of implementing a material and/or a way to tesselate and deform the mesh for wave purposes.
The comments start explaining the skirt and such here
I wasn't ever saying it's some sort of drop in solution. I was just pointing out that for someone working on this, it might be easier to grab or look at the code for making a regular bounded grid "infinite" from T3D's implementation, then adapt that into, say, VaOcean, rather than doing everything from scratch.
// WaterPlane renders relative to the camera rotation around z and xy position.
// That is, it rotates around the z-up axis with the camera such that the
// camera is always facing towards the front border unless looking straight
// down or up.
// Also note that the horizon verts are pulled straight up from the front
// border verts.
// The front border must be as close to the farclip plane as possible
// so distant objects clip through the horizon and farplane at the same time.
// The left and right borders must be pulled outward a distance such
// that water extends horizontally across the entire viewable area while
// looking straight forward +y or straight down -z.