Mordred Posted February 4, 2014 Share Posted February 4, 2014 Hello Leadwerkers, [EDIT] Please be aware of my change at the end of the topic, might not be an error at all? [/EDIT] i recently were playing arround with the free edition of World Machine. I managed to get a decend island finished and wanted to export / import it in Leadwerks. Problem is: Everytime i use the .raw or .r16 format i do get an error "Failed to load heightmap", if i use the r32 format it does import the data, but i do only see sharp rock edges, not the actual isle i did export. Now i thought it might've been a setup fault from myself, so i tried another isle that i used before already, i had it saved and exportet the height map files again, but now i cannot import the heightmap without flaws (again, if it's raw or r16 it gives me an errour, if it's r32 it's only the sharp edges instead of the island). Then i thought: Maybe you're really too dumb, try the heightmaps Aggror provided earlier in the workshop. --> same error. So follow these steps to reproduce: 1. download the heightmaps from here: http://www.leadwerks.com/werkspace/files/file/472-21-high-detail-heightmaps/ 2. create a terrain (i tried size 1024 and 2048, as far as i know the terrain can be bigger than the hightfield, as long as the hightfields ain't bigger than the terrain). 3. import one of those heightfields 4. you do get the error mentioned above It might refer to a beta branch problem, because last week, when i was at release branch, i didnt have that problem at all. [EDIT] Might not be an error at all? If i choose the correct size of the terrain i can import the .raw files again. But it did work earlier without the need to create the exact same terrain size as the heightmap are as long as the terrain was bigger than the .raw. I was able to import a 512 size heightmap in a 1024 sized gameproject before... [/EDIT] Link to comment Share on other sites More sharing options...
Josh Posted February 4, 2014 Share Posted February 4, 2014 If I create a terrain that matches the size of the heightmap, it works perfectly. The easy way to test is that the file size should be the terrain size squared times two. For a 1024x1024 terrain, the file size of an .r16 heightmap is 1024x1024*2 = 2097152 bytes. If the file size corresponds to an .r32, it is assumed the file is made of floating point values, which may or may not be what your program is exporting. Maybe it does unsigned integers? I never really encounter these files, so I don't know. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Mordred Posted February 4, 2014 Author Share Posted February 4, 2014 Thanks Josh, that's what i figured out too, but i am (well....was....) quite sure that it did work before using a terrain map in leadwerks of 1024by1024 and importing a 512by512 heightmap. But i'm not so sure as i was before anymore. If it's intended that the Leadwerks map has to be the same size as the heightmap you're importing than it's working as intended and we can close this topic. Link to comment Share on other sites More sharing options...
Josh Posted February 4, 2014 Share Posted February 4, 2014 Okay. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts