unlimited planar reflections & refraction (update)


(carlo697) #261

It’s good hear that, in the v0.95 the lines are: 51, 52, 53, 66, 80, 81, 82 and 94.


(GraphiX) #262

Ah. I was searching for the fix to this a while ago. Good to see someone found a fix.


(carlo697) #263

Well that can be considered a fix, but it delete a part of the water system (the clipping plane). That the clipping plane does not work on some graphic cards is an issue with the card or an issue with blender itself? (maybe a bug with its integration in python?)


(adriansnetlis) #264

Thanks, carlo… However, why do we need the clipping plane? Doesn’t it decrease performance?


(carlo697) #265

The clipping plane basicly create a virtual plane in the world, every thing under it will no be rendered.
This happens when you don’t use them:


As you can see, the cube is completely under the water, but it still appears in the reflection (same with the other shape).


(adriansnetlis) #266

But it works on watersurface v1.1. Why it doesn’t on this? Maybe someone could try to optimize this with method used in watersurface v1.1? It’s just for low-end PCs(for example- if I want to have smooth setup in my graphics settings water section)…


(carlo697) #267

You say that the clipping plane works in the file watersurface v1.1? the functions used in all the files to do the clipping planes are the same. In my case it doesn’t work in any file, it runs at 0.5 fps and looks like this:


(adriansnetlis) #268

Oh, the shading doesn’t work for you. All of the w/uw works on ~ 8 FPS in ~480p window, but watersurface works on ~22 FPS in ~720p window and appears to work(altought there appears to be some artifacts).


(carlo697) #269

That image I posted is what I get when I leave the clipping plane, without them it works good, except for the strange reflections (What I said beofre).


(KENKEN) #270

Hi i am wonder how could remove the relfection and refraction just the specular and sun if possible as there I need to optimize for the low end machine anyone?


(adriansnetlis) #271

The reflection/refraction doesn’t use much PC resources, because theese are simple textures gathered by the rendercam…


(adriansnetlis) #272

Doesn’t it look like expected?


(adriansnetlis) #273

So the watersurface isn’t supposed to look like it looks for you and me when we have the clipping plane?


(rtavakko) #274

This is absolutely mental. Amazing work man. I’m just wondering is it possible to change parameters like Choppy or windspeed realtime. i.e. user presses a key and the value changes. I tried putting something like choppy += 0.1 in the main() function and it stops working properly


(JohnTDA) #275

This is stunning work.


(AKashyap) #276

Hi . If I may ask you. How do I make myself the depth.png file using the same water and a different terrain. I wish to make an open source game out of it. All the other 3d models will be made by me. I wish to change the terrain, which I did in edit mode, and added my own with its own UV map, but the problem is the depth.png image does not match, and so at some places, the water waves are not visible.
Also, where can I find the code which parents the sun on mouse click ? I want to disable it because I want to make a day / night cycle out of it.
EDIT:
I am editing the ground mesh which is above water for some variation, and will try to make something completely different now, but the shoreline would be the same.


(carlo697) #277

Use paint texture to change the depth texture. There’s some basic tutorials on youtube.


(Jackii) #278

Place an orthographic camera pointing downwards and make a node setup that only renders object under water level with their Z-Depths and use Blender internal or cycles to render into an image.


(AKashyap) #279

OK I will try both your advices , the first one cario looks easy but Ill have to work hard for it, the second one seems to be automatic but might be a little difficult to set up… Thanks both, but Ill try your advice first Jackii


(PeterBluewin) #280

Hi Martinsh,
the background has checkmarks (plus sign on the ground). Is it possible to hide this marks?
Peter