Lales.Charles Posted November 7, 2018 Share Posted November 7, 2018 Hi, I am currently facing an issue with an arbitrary generated terrain that is partially displayed at runtime. This project, using plugins CIGI and Vive, contains 2 worlds: One georeferenced terrain, first created One arbitrary terrain, later added Both world share some common objects, e.g. cloud, vegetation. But in order to avoid risks when generating terrains, data directory contains (among other stuff): aTerrainMontain generated -> directory containing all files from terrain generator aTerrainMontain.landscape Landscape_array_{alb,h,n}.dds gTerrainMAR generated gTerrainMAR.landscape Landscape_array_{alb,h,n}.dds aTerrainMontain.world -> refs to correct Landscape_array_xxx gTerrainMAR.world -> refs to correct Landscape_array_xxx [...] Only the world aTerrainMontain encounters an issue when starting, see attached log file: Failed to compile evaluate shader: core/shaders/terrain_global/tessellation/heig hts.eval Compilation log: (2937,18-96): error X4580: Output variable main contains a system-interp reted value (SV_POSITION) which must be written in every execution path of the s hader. Unconditional initialization may help. hlsl 2937: EVALUATE_OUT main(EVALUATE_CONSTANT_IN patch_constant, const OutputPatch<EVALUATE_IN, 4> input) { (3077,5-24): error X4580: this variable dependent on potentially uniniti alized data: output hlsl 3077: if(output.data_3 > 0.0f) (2937,18-96): error X4580: this variable dependent on potentially uninit ialized data: main hlsl 2937: EVALUATE_OUT main(EVALUATE_CONSTANT_IN patch_constant, const OutputPatch<EVALUATE_IN, 4> input) { Defines: ,BLEND_SRC_FUNC_NONE,BLEND_DEST_FUNC_NONE,TESSELLATION_FACTOR=16,MAX_NU M_LODS_HEIGHT=5,MAX_NUM_LODS_ALBEDO=5,MAX_NUM_LODS_NORMAL=5,MAX_NUM_LODS_MASKS=3 ,NUM_DETAILS=4,NUM_MASKS=2,USE_INSETS,FAST_FRUSTUM_CULLING,HAS_DISPLACEMENT,HAS_ TRIPLANAR,,RENDER_MESH_NUM_INSTANCES=341,RENDER_MAX_FIELD_SPACERS=341,RENDER_MAX _FIELD_ANIMATIONS=341,RENDER_MAX_FIELD_HEIGHTS=113,RENDER_MAX_FIELD_SHORELINES=1 13,OUT_GBUFFER_ALBEDO=0,OUT_GBUFFER_SHADING=1,OUT_GBUFFER_NORMAL=2,OUT_GBUFFER_M ATERIAL_MASK=3,OUT_GBUFFER_LIGHTMAP=4,OUT_GBUFFER_FEATURES=5,OUT_GBUFFER_VELOCIT Y=6,DIRECT3D11,EVALUATE Material::create_shader(): can't compile "terrain_global_base" It did work already, but lately I added a mesh in the scene, regenerated the terrain, and got this issue. Generating the terrain again doesn't help, nor updating texture arrays.. As screen shoots display: In editor, everything is OK At runtime, land cover objects (grass, trees) are OK but terrain albedo and textures KO Thanks in advance for support. Kind regards, Charles log.html Link to comment
morbid Posted November 8, 2018 Share Posted November 8, 2018 Hello Charles, thank you for the detailed explanation, I need to run some tests with quadro GPUs. May I ask you to check if the same issue appears with OpenGL API? And wich driver version you're using? As far as I know, Nvidia offers two drivers for quadro users - the stable one on the newest. It worth checking both of them. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
morbid Posted November 8, 2018 Share Posted November 8, 2018 Charles, also, please check if there are some remainings (data/core folder) left from evaluation version. If so, it's better to delete them. In all newly created projects core should be packed into an *.ung archive. Another thing that may help is cleaning shader cache files (shader_d3d11.cache). If nothing works and your terrain is still broken in runtime - please send us a test scene. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 8, 2018 Author Share Posted November 8, 2018 Hi, Thanks for feedback and suggestions. NVIDIA driver R396 U2 (397.93) is a QNF one. https://www.nvidia.com/download/driverResults.aspx/134638/en-us I updated and tested last ODE driver 411.81.. but not working. I have only a core.ung file, no data/core directory. The first terrain (gTerrainMAR) may has been created when using SDK 2.7.1 but the new one (aTerrainMontain) with 2.7.2. Deletion of shader_d3d11.cache and shader_d3d11_debug.cache didn't help. (as well editor.cache and unigine.cache). But.. switch to OpenGL API seems to work ;) It did work before with DirectX 11 and gTerrainMAR has no issue with this API. Would you mind we should only use OpenGL? Could you confirm it is right setup for a project with multiple (arbitrary/georeferenced) generated terrains? Kind regards, Charles log.html Link to comment
morbid Posted November 8, 2018 Share Posted November 8, 2018 May I ask you to check the following: Unparent terrain from Geodetic Pivot in aTerrainMontain and save it Run your app Will terrain work? UPD Sorry, just realized that I haven't answered your questions. 44 minutes ago, Lales.Charles said: The first terrain (gTerrainMAR) may has been created when using SDK 2.7.1 but the new one (aTerrainMontain) with 2.7.2. It shouldn't affect render anyhow, also, terrain global sees no difference between synthetic data and geo-referenced. 45 minutes ago, Lales.Charles said: Would you mind we should only use OpenGL? It looks like the easiest workaround for now. The issue could be caused by some specific in-project conditions or by mobile quadro GPU. Please, perform the short test I described above. Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 8, 2018 Author Share Posted November 8, 2018 (edited) Hi, Nop, unparent terrain from Geodetic Pivot doesn't fix it (back under DirectX 11).. Even with cache files removed in between. What about how to deal with multiple terrains in same project -> is it right what we've done? Kind regards, Charles Edited November 8, 2018 by Lales.Charles Link to comment
morbid Posted November 8, 2018 Share Posted November 8, 2018 17 minutes ago, Lales.Charles said: What about how to deal with multiple terrains in same project -> is it right what we've done? It's okay, I've checked it once more and it worked. Another thing that could be verified is debug mode. Please, try loading your project with DX in debug (just tick "Debug" in Customize Run Options window). Will shader fails to compile? Anyway, to fix this we need to see a test scene. Can you send it? Regards, Vsevolod How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 8, 2018 Author Share Posted November 8, 2018 Hi, Yes I think it is suitable that we can exchange / submit complete project for you to debug efficiently. How can we proceed? ~1.5GB archive.. Regarding DX in debug -> is it the attached SDK browser config? Engine already in dev.. Kind regards, Charles Link to comment
morbid Posted November 8, 2018 Share Posted November 8, 2018 14 minutes ago, Lales.Charles said: How can we proceed? You can use our ftp or any file hosting you like: 1. ftp://files.unigine.com 2. user: upload 3. password: iejeePheeH3che 16 minutes ago, Lales.Charles said: Regarding DX in debug -> is it the attached SDK browser config? Nope. check project settings: How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 8, 2018 Author Share Posted November 8, 2018 Hi, I'm starting MSVS 2015 debugger, with option: -data_path ../ -engine_config "../data/unigine.cfg" -extern_plugin Syncker,CigiClient,AppVive In the code, I'm loading the world after CIGI init. void AppSystemLogic::init_syncker(int master) { // get Syncker interface int index = Engine::get()->findPlugin("Syncker"); syncker_manager = (Syncker::ManagerInterface*)Engine::get()->getPluginData(index); // init Syncker Master or Syncker Slave int udp_port = atoi(udp_port_e->getText()); int tcp_port = atoi(tcp_port_e->getText()); int tcp_ping_port = atoi(tcp_ping_port_e->getText()); if (master) { syncker_manager->initMaster(address_e->getText(), udp_port, tcp_port, tcp_ping_port); // load world! Console::get()->run("world_load aTerrainMontain"); //gTerrainMAR aTerrainMontain } else syncker_manager->initSlave(name_e->getText(), udp_port, tcp_port, tcp_ping_port); Syncker::SynckerInterface* syncker = syncker_manager->getSyncker(); syncker->setView(0, views_el->getText()); // set Sync View from UI syncker->useDefaultProjections(0); // default projection is controlled by CIGI syncker->setDebug(1); // enable debug information } Kind regards, Charles Link to comment
Lales.Charles Posted November 9, 2018 Author Share Posted November 9, 2018 Hi, I uploaded the project in archive CL-AHD_aTerrain-DirectX-issue.zip Feel free to comment as well the way I tried to setup Vive + CIGI.. it is possibly not the right way to deal with camera / player, and there is an issue with objects collision when flying thanks to CIGI.. but that should be another post. Kind regards, Charles Link to comment
silent Posted November 9, 2018 Share Posted November 9, 2018 Thanks for the test scene, downloaded successfully. Right now we will try to find GPU that will behave like your mobile Quadro in order to fix that behavior. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
morbid Posted November 12, 2018 Share Posted November 12, 2018 @Lales.Charles, we've successfully reproduced this bug, your GPU has nothing to do with it. I'll keep you posted on the progress. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
morbid Posted November 14, 2018 Share Posted November 14, 2018 Hi Charles, this error occurs only in debug mode with DirectX API and is caused by a displacement feature in detail layer. While we're looking for the reason of this behavior you can use one of the following workarounds: if you need debug build only just switch to OpenGL (I assume you already did this) or temporarily disable displacement in "rocks" detail layer you also can change to release build and everything will be working fine both with DirectX and displacement Sorry for the inconvenience caused. I'll post here as soon as I find out more. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 26, 2018 Author Share Posted November 26, 2018 Hi, Not a big deal, I confirm it is fine in release build with both API and I can currently debug with OpenGL. Could you share a perspective regarding this point? Future release? Kind regards, Charles Link to comment
morbid Posted November 27, 2018 Share Posted November 27, 2018 This issue appears to be more time consuming than we expected. There's a chance we'll fix it in the nearest release, but I can't guarantee it, sorry. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
morbid Posted November 29, 2018 Share Posted November 29, 2018 We've fixed this. The error was caused by the outdated d3dcompiler_47.dll library. Just remove d3dcompiler_47.dll from bin directory of your project, the system lib will be used instead. Fix for this issue will be available in the upcoming SDK update. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 29, 2018 Author Share Posted November 29, 2018 Hi, Tried it, but not fixing from my side.. Compile debug, exec debug (IDE or batch), check that d3dcompiler_47.dll is properly removed. Kind regards, Charles Link to comment
morbid Posted November 29, 2018 Share Posted November 29, 2018 More likely its not working because of old d3dcompiler installed in system. You can try updating Windows SDK manually or just put the attached library into your project. In the next Unigine SDK version there will be no such issue. Thanks! d3dcompiler_47.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted November 29, 2018 Author Share Posted November 29, 2018 Hi, Just proceeded but still fail. Here are file detail from bin folder: Kind regards, Charles Link to comment
morbid Posted November 29, 2018 Share Posted November 29, 2018 Okay, let's try two things: The easiest - remove all cache files from data folder of your project. Then run application and check if shader was compiled If it's not working - let's check which d3dcompiler engine is linked to. You can use this tool: https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer. Pressing Ctrl+D will reveal list of dlls that are curerntly used. If it's somehow still linked to the system one I'd recommend updating windows. By the way, are you compiling x64 app? Because lib I gave you is x64. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
morbid Posted December 5, 2018 Share Posted December 5, 2018 Hello Charles, sorry, have you tried removing shader cache? Does issue still persists with dx and debug build? Thank you. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted December 6, 2018 Author Share Posted December 6, 2018 Hi, Sorry for lag. Tested, seems working fine ;) Thanks one more time for great support! Kind regards, Charles Link to comment
morbid Posted December 6, 2018 Share Posted December 6, 2018 You are welcome! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts