1 (edited by philzmz 2021-06-07 07:48:59)

Topic: Convert ASC to RAW to get better elevation values ?

As you know, I am trying to get a better precision for the terrain elevations in RWT.
I found a link to download (for free) elevations to 1m precision (or 5 or 25...) which is much better than what I get with RWT elevation providers.

https://geoservices.ign.fr/documentatio … e-alti-5-m

The values are in .ASC file (ASCII) which consists in a grid of values.

My concern is now to find a way to use these values with RWT. Maybe the easiest way to me would be (if this is possible) to generate a raw file using these values and replace the original RAW generated by RWT with this one ?

Maybe there is better way ? Any ideas are welcome !

I posted one of the asc files with a 5m resolution on this link if you want to have a look.
https://we.tl/t-v0021B8gXb

Best regards.

Phil

Re: Convert ASC to RAW to get better elevation values ?

Hello.

This can be done in this way:
https://forum.infinity-code.com/viewtopic.php?id=1538

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 40 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.

Re: Convert ASC to RAW to get better elevation values ?

Thanks,

I put the script as requested and now I have a new RWT item in the menu, and elevations are intercepted.

As far as I can understand the script (as already said, C# is not my cup of tea...) when isIntercepted = true, I have to get the elevation data by myself adding the appropriate code in the C# script?

So for instance, if my terrain is 1x1km and if I have 1 elevation point each 25 meters, I need to have a file with 40x40 = 1600 heights that will be "included" in the terrain, right?

Is there somewhere a tutorial ? Or an example using a text file with heights ?

Is there no way to build a RAW elevation file from a raster, and the replace the original RAW file ?

Best regards, Phil

Re: Convert ASC to RAW to get better elevation values ?

Yes, I know you, and I know that you probably won't be able to do it yourself.
In a different situation, I would just send you a script for your data.
This is not a difficult and not very long task (2-4 hours).
But, unfortunately, until the beginning of July I have no free time at all.
If you can wait until July, I'll make this script for you.

Kind Regards,
Infinity Code Team.

uContext is Editor PowerPack (more than 40 tools) that take your workflow in Unity Editor to a next level, simplifies working with content, adds new features, corrects and improves the editor’s built-in behaviors. Click here to download uContext Basic for free.