powerspeed_de Posted September 28, 2011 Share Posted September 28, 2011 FPS decreases a lot when ObjectWater is enabled. Used material was taken from the Passage demo. Link to comment
manguste Posted September 29, 2011 Share Posted September 29, 2011 What video card are you running it on? And what rendering API do you use? Here are screenshots on DirectX 10: as you can notice, the difference is only 20 FPS, though there are dynamic reflections, foam and caustics at the same time. If you can turn off dynamic reflections and use a baked texture instead. That should provide considerable framerate increase. Link to comment
danni.coy Posted September 30, 2011 Share Posted September 30, 2011 It there a tutorial for baking water reflections? Link to comment
powerspeed_de Posted September 30, 2011 Author Share Posted September 30, 2011 with directX 10 the problem is solved, but what to do with directX 9? passage does not have this problem dynamic or nondynamic reflect not substantially affect the fps video card Geforce GTX 580 Link to comment
manguste Posted October 6, 2011 Share Posted October 6, 2011 It there a tutorial for baking water reflections? Baking reflections works only in case there are no objects around your water mesh. For example, in case trees are leaning over the pool, baked reflections won't do, because changing the viewpoint will result in incorrect reflections of these trees. Dynamical reflections would be the only option here. Static reflections stored in the cube map can be used if, for example, you have an open sky above. Baking itself is easy: Disable all surrounding objects, if any. Basically, only sky and ground should remain. Open Tools -> Grabber tab and choose Cube option. Save cubemap in the dds format. Go to Materials settings -> States tab and uncheck Dynamical reflections. Go to textures tab and Set Reflection -> Static texture. 1 Link to comment
alexei.garbuzenko Posted October 6, 2011 Share Posted October 6, 2011 Actually it is possible to write a simple code that invokes a grabber from current position and sets an environment texture to your water material, but if called too frequently it causes huge render stalls :( float znear = 0.01f; float zfar = 2048.0f; Image image = new Image(); int size = 512; Material waterMaterial = engine.materials.findMaterial("water_lake"); int refMat = waterMaterial.findTexture("reflection"); Player player = engine.editor.getPlayer(); if (player == NULL) player = engine.game.getPlayer(); vec3 position = player.getPosition(); mat4 projection = frustum(-znear,znear,-znear,znear,znear,zfar); engine.render.renderImageCube(projection,position,image,size,NULL,false); waterMaterial.setImageTextureImage(refMat, image); I've just added a suggestion to use frame buffer data for cheap-and-dirty reflections to improve FPS in such cases: https://developer.un...r-optimization/ Link to comment
manguste Posted October 6, 2011 Share Posted October 6, 2011 with directX 10 the problem is solved, but what to do with directX 9? passage does not have this problem dynamic or nondynamic reflect not substantially affect the fps video card Geforce GTX 580 We have performed some tests - seems it's a graphics card driver issue. On cards other than Geforce GTX family rendering of water mesh under DirectX9 does not cause such FPS drops. We'll pass this bug to NVIDIA engineers to see what we can do about it. Link to comment
manguste Posted October 6, 2011 Share Posted October 6, 2011 Actually it is possible to write a simple code that invokes a grabber from current position and sets an environment texture to you water object, but if called too frequently and causes huge stalls :( Anyway, thank you for the idea, Alexei :) Link to comment
hintuc_de Posted November 11, 2011 Share Posted November 11, 2011 When will be problem resolved with DirectX 9 and GTX family of Nvidia cards? Link to comment
manguste Posted November 17, 2011 Share Posted November 17, 2011 Water is heavy for DirectX 9 in any case, so we can only recommend to optimize your art assets: check the number of triangles, surfaces, lights, etc. You can also try enabling Query flag for the mesh. Link to comment
alexei.garbuzenko Posted November 17, 2011 Share Posted November 17, 2011 I'm sorry for posting here, but we are still having dx9 water issue - there is some kind of 'sparkles' when camera is close to water. It was reported already but I can'd find the topic. Link to comment
ulf.schroeter Posted November 17, 2011 Share Posted November 17, 2011 It was reported already but I can'd find the topic. At least here in August... Link to comment
frustum Posted November 18, 2011 Share Posted November 18, 2011 I'm sorry for posting here, but we are still having dx9 water issue - there is some kind of 'sparkles' when camera is close to water. It was reported already but I can'd find the topic. What type of GPU and OS do you use? Link to comment
alexei.garbuzenko Posted November 18, 2011 Share Posted November 18, 2011 GeForce 9600GT. Windows 2008 Server R2. ForceWare driver 280.36. Actually, I saw this bug a year or more ago on Windows 7 x64 too. Link to comment
ulf.schroeter Posted November 18, 2011 Share Posted November 18, 2011 In our casse WIndowsXP SP 2, NVIDIA QuadroFX 3700 M Link to comment
alex.dovgodko Posted December 2, 2011 Share Posted December 2, 2011 We found a problem mentioned by alexei and ulf too (GeForce 8600 GT + Win XP SP2). Any chance to fix this problem? Link to comment
watchvombat Posted December 6, 2011 Share Posted December 6, 2011 Can you give some info on graphical settings and rendering API you use? Log file or/and small test case would be highly useful, if possible:) You can send it here: support@unigine.com Link to comment
powerspeed_de Posted December 7, 2011 Author Share Posted December 7, 2011 когда будет решение всех версий directx? when the solution to all versions of directx? Link to comment
manguste Posted February 8, 2012 Share Posted February 8, 2012 We found a problem mentioned by alexei and ulf too (GeForce 8600 GT + Win XP SP2). Any chance to fix this problem? Really can't reproduce it. Tried and failed multiple times. There will an SDK update next week (most probably) so please check if it is still present. About this whole low performance issue, again, it's on the driver level. The only option is to optimize the scene (which is good in any way). Check this post for recommendations on improving performance when rendering water. Link to comment
Recommended Posts