travis.trigg Posted January 29, 2012 Posted January 29, 2012 Hi all! I am new to unigine and am playing around with it. I am in the process of enabling the double precision system with the scratch project. Using this link as a guide:https://developer.unigine.com/en/docs/1.0/code/environment/double_precision,I copied the lib/double_precision into the lib folder, this didn't work. I also copied the lib/double_precision into the scratch/bin folder, and this didn't work. Any advice on getting this to work?Also, when enabling the double precision, does camera space (ie camera relative objects) enable itself by default? And, last one, do you enable the use of a logarithmic depth buffer in shaders (this was our last solution to large worlds in shaders, http://www.gamasutra.com/blogs/BranoKemen/20090812/2725/Logarithmic_Depth_Buffer.php)?Thank you in advance for the help!
ulf.schroeter Posted January 29, 2012 Posted January 29, 2012 And, last one, do you enable the use of a logarithmic depth buffer in shaders (this was our last solution to large worlds in shaders Has been proposed long time ago but has not found its way into the engine yet
travis.trigg Posted January 29, 2012 Author Posted January 29, 2012 Well, that answers that question, thanks!!
ulf.schroeter Posted January 29, 2012 Posted January 29, 2012 Also, when enabling the double precision, does camera space (ie camera relative objects) enable itself by default? Devlog - Support of huge worlds July 21, 2011 From now on Unigine can handle as large worlds as required. In addition to effective data streaming the engine supports double precision of coordinates instead of float data type. It's possible to create virtually unlimited worlds with the highest level of details (maximum coordinates are effectively 536,870,912 times larger). If a single precision world compares to an Earth range, double precision allows to create the whole Solar System and beyond. This feature can be very helpful for some VR/simulation applications, e.g. for flight simulators. World management: Added support of double precision coordinates (requires replacing standard engine libraries with special ones; use "scons double=1" to rebuild). All objects are rendered in camera space. All nodes works in relative space.
travis.trigg Posted January 29, 2012 Author Posted January 29, 2012 fantastic! I looked for details but never found them, thank you again!
travis.trigg Posted January 29, 2012 Author Posted January 29, 2012 Added support of double precision coordinates (requires replacing standard engine libraries with special ones; use "scons double=1" to rebuild). I haven't done this, would this enable the double precision? I am not sure how to do this.
ulf.schroeter Posted January 29, 2012 Posted January 29, 2012 This is just required for building double precision libs from source code. In your case replacing the libs with the pre-build ones from double-precision sub-folder should do the trick. How do you check that following the instructions does not work ? Within the log.html file in your <sdk-root>/bin folder) there should be a 'Features' log entry at the beginning stating double precision support Just re-copy the double-precision libs and than try to start from the demo-folder e.g. sanctuary_d3d9/10.bat and than check log.html in your bin folder. I just did that for testing and it worked without problems. If unsuccesful post your log.html file
travis.trigg Posted January 29, 2012 Author Posted January 29, 2012 I was checking in game with the console, and the log.html file. I coppied from <root>/lib/double_precision to <root>/lib. Ran the <root>/demos/sanctuary_d3d9.bat, checked the console and the output, still the same. Would it make a difference if I was an evaluation client? Here is the log file: Unigine log file 14:37:02 Loading "C:/Unigine Evaluation Kit/bin/../data/demos/sanctuary/unigine.cfg"... 14:37:02 Loading "d3d9.dll"... 14:37:02 Loading "openal32.dll"... 14:37:02 Set 1024x768 windowed video mode 14:37:02 Set 1.00 gamma value 14:37:02 Unigine engine http://unigine.com/ 14:37:02 Binary: Windows 32bit Visual C++ 1600 Release Dec 28 2011 r8220 14:37:02 Features: OpenGL Direct3D9 Direct3D10 Direct3D11 OpenAL XPad360 Joystick Flash Editor 14:37:02 App path: C:/Unigine Evaluation Kit/bin/ 14:37:02 Data path: C:/Unigine Evaluation Kit/data/ 14:37:02 Save path: C:/Unigine Evaluation Kit/bin/ 14:37:02 14:37:02 ---- System ---- 14:37:02 System: Windows 7 (build 7601, Service Pack 1) 64bit 14:37:02 CPU: Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz 2792MHz MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 HTT x8 14:37:02 GPU: NVIDIA GeForce 9800 GT 8.17.12.7061 x1 14:37:02 System memory: 4095 Mb 14:37:02 Video memory: 512 Mb 14:37:02 Sync threads: 7 14:37:02 Async threads: 8 14:37:02 14:37:02 ---- MathLib ---- 14:37:02 Set SSE2 simd processor 14:37:02 14:37:02 ---- Sound ---- 14:37:02 Renderer: DirectSound Default 14:37:02 OpenAL vendor: OpenAL Community 14:37:02 OpenAL renderer: OpenAL Soft 14:37:02 OpenAL version: 1.1 ALSOFT 1.13 14:37:02 Found AL_EXT_LINEAR_DISTANCE 14:37:02 Found AL_EXT_OFFSET 14:37:02 Found ALC_EXT_EFX 14:37:02 Found EFX Filter 14:37:02 Found EFX Reverb 14:37:02 Found EAX Reverb 14:37:02 Found QUAD16 format 14:37:02 Found 51CHN16 format 14:37:02 Found 61CHN16 format 14:37:02 Found 71CHN16 format 14:37:02 Maximum sources: 256 14:37:02 Maximum effect slots: 4 14:37:02 Maximum auxiliary sends: 2 14:37:02 14:37:02 ---- Render ---- 14:37:02 Renderer: NVIDIA NV50 512Mb 14:37:02 Direct3D9 desc: NVIDIA GeForce 9800 GT 14:37:02 Direct3D9 driver: nvd3dum.dll 14:37:02 Found required D3DPTEXTURECAPS_CUBEMAP 14:37:02 Found required D3DPTEXTURECAPS_VOLUMEMAP 14:37:02 Found required D3DPTADDRESSCAPS_WRAP 14:37:02 Found required D3DPTADDRESSCAPS_CLAMP 14:37:02 Found required D3DCAPS2_CANAUTOGENMIPMAP 14:37:02 Found optional D3DPMISCCAPS_INDEPENDENTWRITEMASKS 14:37:02 Found optional Vertex shader 3.0 14:37:02 Found optional Pixel shader 3.0 14:37:02 Found optional Vertex texture fetch 14:37:02 Found optional HDR blending 14:37:02 Found optional HDR filtering 14:37:02 Found optional NULL texture 14:37:02 Found optional RGB10A2 texture 14:37:02 Found optional DXT texture compression 14:37:02 Found optional ATI texture compression 1 14:37:02 Found optional ATI texture compression 2 14:37:02 Found optional NVIDIA hardware shadow 14:37:02 Found optional NVIDIA alpha to coverage 14:37:02 Vertex instructions: 4096 14:37:02 Pixel instructions: 4096 14:37:02 Maximum texture size: 8192 14:37:02 Maximum texture units: 16 14:37:02 Maximum texture renders: 4 14:37:02 14:37:02 ---- Physics ---- 14:37:02 Physics: Multi-threaded 14:37:02 14:37:02 ---- PathFind ---- 14:37:02 PathFind: Multi-threaded 14:37:02 14:37:02 ---- Interpreter ---- 14:37:02 Version: 2.47 14:37:02 14:37:02 Loading "sanctuary/unigine.cpp" 42ms 14:37:02 Loading "demos/sanctuary/locale/unigine.en" dictionary 14:37:02 Loading "core/materials/default/unigine_post.mat" 20 materials 37 shaders 1ms 14:37:02 Loading "core/materials/default/unigine_render.mat" 40 materials 314 shaders 7ms 14:37:02 Loading "core/materials/default/unigine_meshes.mat" 18 materials 11031 shaders 68ms 14:37:02 Loading "core/materials/default/unigine_terrains.mat" 2 materials 432 shaders 2ms 14:37:02 Loading "core/materials/default/unigine_grass.mat" 1 material 69 shaders 2ms 14:37:02 Loading "core/materials/default/unigine_particles.mat" 1 material 101 shaders 3ms 14:37:02 Loading "core/materials/default/unigine_billboards.mat" 1 material 51 shaders 3ms 14:37:02 Loading "core/materials/default/unigine_volumes.mat" 6 materials 45 shaders 7ms 14:37:02 Loading "core/materials/default/unigine_guis.mat" 1 material 82 shaders 1ms 14:37:02 Loading "core/materials/default/unigine_water.mat" 1 material 205 shaders 8ms 14:37:02 Loading "core/materials/default/unigine_skies.mat" 1 material 13 shaders 7ms 14:37:02 Loading "core/materials/default/unigine_decals.mat" 1 material 99 shaders 2ms 14:37:02 Loading "core/properties/unigine.prop" 2 properties 0ms 14:37:02 Unigine~# world_load sanctuary 14:37:03 Loading "sanctuary.cpp" 65ms 14:37:03 Loading "demos/sanctuary/sanctuary.mat" 55 materials 78ms 14:37:04 Loading "sanctuary.world" 1282ms 14:37:14 Close "openal32.dll" 14:37:14 Close "d3d9.dll" 14:37:14 Memory usage: none 14:37:14 Allocations: none 14:37:14 Shutdown
travis.trigg Posted January 29, 2012 Author Posted January 29, 2012 give me a sec while I try reinstalling, and doing this with a clean slate
travis.trigg Posted January 29, 2012 Author Posted January 29, 2012 Still a no go. Hrm. Unigine log file 14:45:47 Loading "C:/Unigine Evaluation Kit/bin/../data/demos/sanctuary/unigine.cfg"... 14:45:47 Loading "d3d9.dll"... 14:45:47 Loading "openal32.dll"... 14:45:47 Set 1024x768 windowed video mode 14:45:47 Set 1.00 gamma value 14:45:47 Unigine engine http://unigine.com/ 14:45:47 Binary: Windows 32bit Visual C++ 1600 Release Dec 28 2011 r8220 14:45:47 Features: OpenGL Direct3D9 Direct3D10 Direct3D11 OpenAL XPad360 Joystick Flash Editor 14:45:47 App path: C:/Unigine Evaluation Kit/bin/ 14:45:47 Data path: C:/Unigine Evaluation Kit/data/ 14:45:47 Save path: C:/Unigine Evaluation Kit/bin/ 14:45:47 14:45:47 ---- System ---- 14:45:47 System: Windows 7 (build 7601, Service Pack 1) 64bit 14:45:47 CPU: Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz 2793MHz MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 HTT x8 14:45:47 GPU: NVIDIA GeForce 9800 GT 8.17.12.7061 x1 14:45:47 System memory: 4095 Mb 14:45:47 Video memory: 512 Mb 14:45:47 Sync threads: 7 14:45:47 Async threads: 8 14:45:47 14:45:47 ---- MathLib ---- 14:45:47 Set SSE2 simd processor 14:45:47 14:45:47 ---- Sound ---- 14:45:47 Renderer: DirectSound Default 14:45:47 OpenAL vendor: OpenAL Community 14:45:47 OpenAL renderer: OpenAL Soft 14:45:47 OpenAL version: 1.1 ALSOFT 1.13 14:45:47 Found AL_EXT_LINEAR_DISTANCE 14:45:47 Found AL_EXT_OFFSET 14:45:47 Found ALC_EXT_EFX 14:45:47 Found EFX Filter 14:45:47 Found EFX Reverb 14:45:47 Found EAX Reverb 14:45:47 Found QUAD16 format 14:45:47 Found 51CHN16 format 14:45:47 Found 61CHN16 format 14:45:47 Found 71CHN16 format 14:45:47 Maximum sources: 256 14:45:47 Maximum effect slots: 4 14:45:47 Maximum auxiliary sends: 2 14:45:47 14:45:47 ---- Render ---- 14:45:47 Renderer: NVIDIA NV50 512Mb 14:45:47 Direct3D9 desc: NVIDIA GeForce 9800 GT 14:45:47 Direct3D9 driver: nvd3dum.dll 14:45:47 Found required D3DPTEXTURECAPS_CUBEMAP 14:45:47 Found required D3DPTEXTURECAPS_VOLUMEMAP 14:45:47 Found required D3DPTADDRESSCAPS_WRAP 14:45:47 Found required D3DPTADDRESSCAPS_CLAMP 14:45:47 Found required D3DCAPS2_CANAUTOGENMIPMAP 14:45:47 Found optional D3DPMISCCAPS_INDEPENDENTWRITEMASKS 14:45:47 Found optional Vertex shader 3.0 14:45:47 Found optional Pixel shader 3.0 14:45:47 Found optional Vertex texture fetch 14:45:47 Found optional HDR blending 14:45:47 Found optional HDR filtering 14:45:47 Found optional NULL texture 14:45:47 Found optional RGB10A2 texture 14:45:47 Found optional DXT texture compression 14:45:47 Found optional ATI texture compression 1 14:45:47 Found optional ATI texture compression 2 14:45:48 Found optional NVIDIA hardware shadow 14:45:48 Found optional NVIDIA alpha to coverage 14:45:48 Vertex instructions: 4096 14:45:48 Pixel instructions: 4096 14:45:48 Maximum texture size: 8192 14:45:48 Maximum texture units: 16 14:45:48 Maximum texture renders: 4 14:45:48 14:45:48 ---- Physics ---- 14:45:48 Physics: Multi-threaded 14:45:48 14:45:48 ---- PathFind ---- 14:45:48 PathFind: Multi-threaded 14:45:48 14:45:48 ---- Interpreter ---- 14:45:48 Version: 2.47 14:45:48 14:45:48 Loading "sanctuary/unigine.cpp" 301ms 14:45:48 Loading "demos/sanctuary/locale/unigine.en" dictionary 14:45:48 Loading "core/materials/default/unigine_post.mat" 20 materials 37 shaders 55ms 14:45:48 Loading "core/materials/default/unigine_render.mat" 40 materials 314 shaders 10ms 14:45:49 Loading "core/materials/default/unigine_meshes.mat" 18 materials 11031 shaders 628ms 14:45:49 Loading "core/materials/default/unigine_terrains.mat" 2 materials 432 shaders 20ms 14:45:49 Loading "core/materials/default/unigine_grass.mat" 1 material 69 shaders 12ms 14:45:49 Loading "core/materials/default/unigine_particles.mat" 1 material 101 shaders 5ms 14:45:49 Loading "core/materials/default/unigine_billboards.mat" 1 material 51 shaders 138ms 14:45:49 Loading "core/materials/default/unigine_volumes.mat" 6 materials 45 shaders 37ms 14:45:49 Loading "core/materials/default/unigine_guis.mat" 1 material 82 shaders 2ms 14:45:49 Loading "core/materials/default/unigine_water.mat" 1 material 205 shaders 43ms 14:45:49 Loading "core/materials/default/unigine_skies.mat" 1 material 13 shaders 65ms 14:45:49 Loading "core/materials/default/unigine_decals.mat" 1 material 99 shaders 3ms 14:45:49 Loading "core/properties/unigine.prop" 2 properties 0ms 14:45:50 Unigine~# world_load sanctuary 14:45:50 Loading "sanctuary.cpp" 146ms 14:45:50 Loading "demos/sanctuary/sanctuary.mat" 55 materials 80ms 14:46:06 Loading "sanctuary.world" 15526ms 14:46:16 Close "openal32.dll" 14:46:16 Close "d3d9.dll" 14:46:16 Memory usage: none 14:46:16 Allocations: none 14:46:16 Shutdown
ulf.schroeter Posted January 30, 2012 Posted January 30, 2012 Would it make a difference if I was an evaluation client? I wouldn't expect this. Quite strange, maybe there is some path problem. You could check your windows PATH and UNIGINE_DIR settings and make sure that they point to the right folders. Othterwise you will have to wait for some UNIGINE support.
travis.trigg Posted January 30, 2012 Author Posted January 30, 2012 UNIGINE_DIR = c:\Unigine Evalualtion Kit PATH = c:\Unigine Evaluation Kit\bin;c:\Unigine Evaluation Kit\lib;c:\Unigine Evaluation Kit\externs\bin;;c:\Unigine Evaluation Kit\bin;c:\Unigine Evaluation Kit\lib;c:\Unigine Evaluation Kit\externs\bin I also checked system_32 to see if they might be in there.. they aren't. I agree, this is quite strange. I tried to remove the dll's, and I do get an error. I wonder if the release I have is using single precision in both folders (ie, dev mistake putting them there)?
manguste Posted January 30, 2012 Posted January 30, 2012 Sorry, it seems double precision libs in the Evaluation pack are actually single precision ones. Thanlk you for pointing that out. We'll fix it with the next update. After that enabling double precision coordinates for Scratch project is very simple: Copy Unigine_x86d.dll (as well as Unigine_x86.dll and 64-bit versions) from lib\double_precision into scratch\bin (Scratch project stores all its resources separately). First, the engine will check libraries stored in the same folder as binary executable, if they are not found there, it will search in the lib folder. The second step is to modify the code to support double precision coordinates (or both single and double variants). In the level1.cpp you'll find a function that sets camera position (camera.setPosition()). It takes either vec3 (in case of single precision) or dvec3 (double precision). By default it is vec3, which will cause an error as double precision libraries are used. 1st variant is to support double precision only: camera.setPosition(dvec3(2.0f,0.0f,1.5f)); 2nd variant is to support both single and double precision: //required to define Vec3 data type #include <core/unigine.h> ... camera.setPosition(Vec3(2.0f,0.0f,1.5f));
travis.trigg Posted January 30, 2012 Author Posted January 30, 2012 (edited) I am glad I am not going crazy! Thanks for the help! Oh, and when do you usually do updates? Edited January 30, 2012 by travis.trigg
manguste Posted January 31, 2012 Posted January 31, 2012 Usually we are releasing an update once a month (or in about 1.5 months) - the cycle depends on how many features were added/modified and need to be tested.
travis.trigg Posted March 8, 2012 Author Posted March 8, 2012 I don't think you put the double precision libs in the evaluation pack. I tried to enable it again, and nothing.
watchvombat Posted March 11, 2012 Posted March 11, 2012 I don't think you put the double precision libs in the evaluation pack. I tried to enable it again, and nothing. In the step 1: 1. Copy Unigine_x86d.dll (as well as Unigine_x86.dll and 64-bit versions) from lib\double_precision into scratch\bin (Scratch project stores all its resources separately). you should actually replace the existing libraries with libraries from lib\double_precision
travis.trigg Posted March 12, 2012 Author Posted March 12, 2012 Did that; when I tested it, it was on the samples and the scratch project. I am working with the evaluation pack, if this makes any difference. I re-downloaded and installed, same issue.
watchvombat Posted March 13, 2012 Posted March 13, 2012 Yes, you are absolutely right, the bug is confirmed for EvalKit
travis.trigg Posted March 14, 2012 Author Posted March 14, 2012 hah, no worries. I program for a living and I know how easy it is to miss small stuff like that; much to the chagrin of my boss, who swears I am the worlds worse programmer...
watchvombat Posted March 15, 2012 Posted March 15, 2012 Thanks for understanding, the issues is in bug tracker, so we will put these libraries in the next SDK
Recommended Posts