Water mesh smoothing code where?

MrMacintosh

New Member
What processes and classes contribute to the water mesh being rendered in a non block shape? I've been looking through rendering to find the specific processes. Can use some guidance. I want to try some tweaks, and possibly make it so that the smooth mesh renders as the water is flowing. I'll basically want to be working on water's visual qualities.
 

manu3d

Active Member
Contributor
Architecture
Hi MrMcintosh,

I've been doing a fair amount of work on the rendering engine until a few months back when I had to interrupt for a number of real-life reasons. I hope to get back on track in a few months when a number of things have fallen into place. I seem to remember what you'd like to deal with is shader-based and I barely scratched the surface there, so I can't be of much help at this stage. I imagine you already found that WorldRendererImpl is the entry point for all things rendering, in particular its render() method. If you dig enough from there you should find what you are looking for. I warn you, it might not be pretty. Much of that code is not particularly well documented, something I've been trying to address elsewhere, so far only in high-level rendering code and there still is plenty of work to be done in that direction.

If you do manage to find your way around down there in shaderland, would you mind checking if you can use the biome's tint to give a proper color to the water? I.e. the landscape underwater seen from above water should have a distinct turquoise tint in a life-like biome. Also, I don't remember if tint is a 3 or 4 components vector, but either way it should be possible to interpret that information also in regard of the opacity of the water, i.e. to render some water as very transparent or very murky. I'm not saying you have to do it, but you might just stumble on the piece of code that would allow this with little tweaking.

Again, sorry I can't be of more help at this stage.
 

manu3d

Active Member
Contributor
Architecture
Crucial piece of missing information there: the transparency/opacity of the water should be a function of both the biome's tint value AND how far you can see through the water. You seem to be interested in addressing the look of the water from -above- water, so I'm not going to make any suggestion about the look of the rendering when the player is underwater, but obviously there are similar considerations to be made.
 
Top