gordon-vart / opensource

Open Source projects by Gordon Vart
MIT License
12 stars 3 forks source link

(NewFeature) Request for stitching/merging height map tiles. #4

Open cyber-speed opened 2 years ago

cyber-speed commented 2 years ago

Hello,

Is there a way to add support for stitching/merging height maps that where already tiled, that also happen to overlap by any desired pixel number. Lets say i have a section of a map in tiles that is formed out of 8x8 tiles, each tile is a 257x257 pixels, meaning they must overlap by one pixel, once merged/stitched you get a 2049x2049 final map. First column would be from bottom left at section_00-00.raw going up vertically up to section_00-07.raw Followed by section_01-00.raw -> section_01-07.raw to the right, overlapping as well by one pixel, loading vertically as well, etc. The format of the height map tiles can be RAW 8-bit, 16-bit or 32-bit float in my case, including PNG, TIFF, etc.

The ability to change direction of the tiles to load, be it vertically up/down, bottom left or bottom right corner, horizontally left/right, bottom left or or bottom right corner. To change the pixel number to overlap. To select for import what format the map tiles are for RAW. As well the ability to import a large map to get it ready to tile back to a desired pixel resolution, if required to be overlapped or not, if yes by how many pixels is required and save it to desired/needed format, be it RAW 8, 16, 32-bit, PNG, TIFF, etc.

I can provide a sample if need be.

gordon-vart commented 2 years ago

Interesting. Are these height maps that you are working with, or are they just pictures that you are trying to stitch together?

On Fri, Jun 24, 2022 at 4:09 PM Unknown @.***> wrote:

Hello,

Is there a way to add support for stitching/merging height maps that where already tiled, that also happen to overlap by any desired pixel number. Lets say i have a section of a map in tiles that is formed out of 8x8 tiles, each tile is a 257x257 pixels, meaning they must overlap by one pixel, once merged/stitched you get a 2048x2048 final map. First column would be from bottom left at section_00-00.raw going up vertically up to section_00-07.raw Followed by section_01-00.raw -> section_01-07.raw to the right, overlapping as well by one pixel, loading vertically as well, etc. The format of the height map tiles can be RAW 8-bit, 16-bit or 32-bit float in my case, including PNG, TIFF, etc.

The ability to change direction of the tiles to load, be it vertically up/down, bottom left or bottom right corner, horizontally left/right, bottom left or or bottom right corner. To change the pixel number to overlap. To select for import what format the map tiles are for RAW. As well the ability to import a large map to get it ready to tile back to a desired pixel resolution, if required to be overlapped or not, if yes by how many pixels is required and save it to desired/needed format, be it RAW 8, 16, 32-bit, PNG, TIFF, etc.

I can provide a sample if need be.

— Reply to this email directly, view it on GitHub https://github.com/gordon-vart/opensource/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIO5EOF3UWCCYEW7GI3D3TVQYPYXANCNFSM5ZY76WQQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cyber-speed commented 2 years ago

Yes they are actual terrain height maps.

Each and every one of them is a actual full 32-bit floating point RAW height map.

I only meant in my case they are float 32-bit RAW, and would be extremely helpful to have other input format support other bit depth for RAW or even PNG, TIFF, DDS, etc Ability to even support albedo, normal, masks, etc would be actually helpful too, along side the height maps. To have support for various needs not just Unreal Engine specs. which is if i am not mistaken only PNG at 16-bit?

I have searched high and low on the www, came up empty handed until i found your GitHub, also the only other interesting links i found that could potentially be useful are the following, they include code example: https://stackoverflow.com/questions/16433122/how-can-you-stitch-multiple-heightmaps-together-to-remove-seams https://thegroundtruth.blog/2021/02/28/creating-maps-by-stitching-map-tiles/ https://www.rastertek.com/dx11ter08.html

gordon-vart commented 2 years ago

Just curious, are you doing game development? Or are you doing something else with these height Maps? if you send me an example set of files, I think I know what you're looking for. I will play around with it. I assume you are trying to stitch together the edges of the height map so that you don't have gaps in between them, correct?

On Fri, Jun 24, 2022 at 10:32 PM Unknown @.***> wrote:

Yes they are actual terrain height maps.

Each and every one of them is a actual full 32-bit floating point RAW height map.

I only meant in my case they are float 32-bit RAW, and would be extremely helpful to support other bit depth as RAW or even PNG, TIFF, etc To have support for various needs not just Unreal Engine specs. which is if i am not mistaken only PNG at 16-bit?

I have searched high and low on the www, came up empty handed until i found your GitHub, also the only other interesting links i found that could potentially be useful are the following, they include code example:

https://stackoverflow.com/questions/16433122/how-can-you-stitch-multiple-heightmaps-together-to-remove-seams

https://thegroundtruth.blog/2021/02/28/creating-maps-by-stitching-map-tiles/ https://www.rastertek.com/dx11ter08.html

— Reply to this email directly, view it on GitHub https://github.com/gordon-vart/opensource/issues/4#issuecomment-1166182274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIO5EO7H7U2HUHPSPWD5QTVQZ4UTANCNFSM5ZY76WQQ . You are receiving this because you commented.Message ID: @.***>

cyber-speed commented 2 years ago

I guess i can say i am a 3D enthusiast, over all, anything that is related to CGI including 3D art, currently trying to learn how to deal with various types of terrain maps, RAW maps seem to be the best option in terms of lossless quality, of course other 3D editors might be limited to lets say PNG 16-bit, which the preview sample is in, attached.

The RAW tiles might require to be inverted on the Y axis (flipped vertically), for example on the tiles i provided the last float value of the first tile will match the first value of the adjacent tile, and once overlapped in this case by one pixel they match keeping the values accurate and proper scale across entire height map, with out any type of seams or errors as well.

I am basically looking for ways to automate the loading/importing and generating/exporting of thousands of tiles, or whole height map/albedo/normal/etc, old or new map projects that can have features described above in initial post, so far found zero such tools to aid in such tedious and time consuming tasks.

https://mega.nz/file/TUlzSTIb#s550HtsKd1qty5LGjzu1WmW8zPHDa58G1dnMnuCm7QI

I also want to learn how to import such maps in Unreal Engine, too, you seem to have some very interesting videos, and that should help in testing, as i want to see how that would work for my projects.

gordon-vart commented 2 years ago

I did some looking last night and this is not a trivial task. It's going to take some time, and to be honest I've got too many other things going on right now. I may look at this in the future, but I think you're going to have to take on this task yourself for the time being and thanks for the interest.

On Tue, Jun 28, 2022 at 5:49 PM Gordon Vart @.***> wrote:

understood. The files that you sent me are 32-bit Raw, right? Anyway, I'm not exactly sure why I'm doing this because I don't have the time but I am intrigued. LOL

I'm not making any promises oh, but let me see if I can come up with something. You would make a pretty decent product manager.

On Sun, Jun 26, 2022 at 2:41 PM Unknown @.***> wrote:

I guess i can say i am a 3D enthusiast, over all, anything that is related to CGI including 3D art, currently trying to learn how to deal with various types of terrain maps, RAW maps seem to be the best option in terms of lossless quality, of course other 3D editors might be limited to lets say PNG 16-bit, which the preview sample is in, attached.

The RAW tiles might require to be inverted on the Y axis (flipped vertically), for example on the tiles i provided the last float value of the first tile will match the first value of the adjacent tile, and once overlapped in this case by one pixel they match keeping the values accurate and proper scale across entire height map, with out any type of seams or errors as well.

I am basically looking for ways to automate the loading/importing and generating/exporting of thousands of tiles, or whole height map/albedo/normal/etc, old or new map projects that can have features described above in initial post, so far found zero such tools to aid in such tedious and time consuming tasks.

https://mega.nz/file/TUlzSTIb#s550HtsKd1qty5LGjzu1WmW8zPHDa58G1dnMnuCm7QI

I also want to learn how to import such maps in Unreal Engine, too, you seem to have some very interesting videos, and that should help in testing, as i want to see how that would work for my projects.

— Reply to this email directly, view it on GitHub https://github.com/gordon-vart/opensource/issues/4#issuecomment-1166626488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIO5EPO224GB6YHGGPPRPTVRCXADANCNFSM5ZY76WQQ . You are receiving this because you commented.Message ID: @.***>

cyber-speed commented 2 years ago

Thanks for taking a look at it.

gordon-vart commented 1 year ago

understood. The files that you sent me are 32-bit Raw, right? Anyway, I'm not exactly sure why I'm doing this because I don't have the time but I am intrigued. LOL

I'm not making any promises oh, but let me see if I can come up with something. You would make a pretty decent product manager.

On Sun, Jun 26, 2022 at 2:41 PM Unknown @.***> wrote:

I guess i can say i am a 3D enthusiast, over all, anything that is related to CGI including 3D art, currently trying to learn how to deal with various types of terrain maps, RAW maps seem to be the best option in terms of lossless quality, of course other 3D editors might be limited to lets say PNG 16-bit, which the preview sample is in, attached.

The RAW tiles might require to be inverted on the Y axis (flipped vertically), for example on the tiles i provided the last float value of the first tile will match the first value of the adjacent tile, and once overlapped in this case by one pixel they match keeping the values accurate and proper scale across entire height map, with out any type of seams or errors as well.

I am basically looking for ways to automate the loading/importing and generating/exporting of thousands of tiles, or whole height map/albedo/normal/etc, old or new map projects that can have features described above in initial post, so far found zero such tools to aid in such tedious and time consuming tasks.

https://mega.nz/file/TUlzSTIb#s550HtsKd1qty5LGjzu1WmW8zPHDa58G1dnMnuCm7QI

I also want to learn how to import such maps in Unreal Engine, too, you seem to have some very interesting videos, and that should help in testing, as i want to see how that would work for my projects.

— Reply to this email directly, view it on GitHub https://github.com/gordon-vart/opensource/issues/4#issuecomment-1166626488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIO5EPO224GB6YHGGPPRPTVRCXADANCNFSM5ZY76WQQ . You are receiving this because you commented.Message ID: @.***>

cyber-speed commented 1 year ago

Hello,

First and foremost, thank you for getting back to me with an intrigued interest to at least discover what can be truly done about my initial feature request, very much appreciated.

I know it may seem like a trivial task as previously described, yet if supported the mentioned features, a time saver with out any doubt, as the technology progresses at a rapid phase, this will come handy for many 3D artists, new and old alike that want to learn, or currently working in the filed that would require such specific dedicated software.

To answer your question, yes they are indeed 32-bit RAW height maps.

Regardless of what you come up with, i am grateful you took a genuine interest in it, for that alone, thank you once again.

I suppose I too am intrigued, by the following: "You would make a pretty decent product manager."

cyber-speed commented 7 months ago

Hello, happy 2024, hope all is well.

Was wondering if you happen to have had a chance at all in looking in to the options i had mentioned previously by chance?

gordon-vart commented 7 months ago

Hello and happy 2024 to you as well. I have not looked into that. I have been so busy with work and I kind of stopped doing unreal development so this fell far down on the priority list. I will take a look and see if there is something quick I can do. What is your use case?

On Wed, Jan 31, 2024 at 7:05 PM Unknown @.***> wrote:

Hello, happy 2024, hope all is well.

Was wondering if you happen to have had a chance at all in looking in to the options i had mentioned previously by chance?

— Reply to this email directly, view it on GitHub https://github.com/gordon-vart/opensource/issues/4#issuecomment-1920282790, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIO5EOMKIOL6LHQTM2FWTLYRLS4PAVCNFSM5ZY76WQ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJSGAZDQMRXHEYA . You are receiving this because you commented.Message ID: @.***>

cyber-speed commented 7 months ago

Thank you for your response.

My use case is to use old projects where there are no more full size height maps, and use already made tiles that are in either RAW 32-bit, 16-bit, or EXR, PNG, TIFF, to be able to stitch them back to that full size they have, overlap them by 1 pixel or more if needed, and to also support their diffuse, normal, mask, alpha, etc maps to stitch them as well back to their original full size.

Later on to export them in to UE5.x supported formats/sizes, would be current/main example.

So far i have yet to find a solution out there free or paid that can do batch the way your tool does but to export already made full height maps to tiles ones such as hundreds, thousands or even tens of thousands of height maps, to stitch back in to one, all based on options i described in OP.

cyber-speed commented 4 months ago

Sorry if i come across as a broken record by now, has anything at all been considered for support of the mentioned features from before?

gordon-vart commented 3 months ago

I appreciate the interest, but I do not have the time to invest in this. The code was made open source so that others could take and improve because I do not have the time to invest in making things better. Good luck.

On Mon, May 6, 2024 at 8:41 PM Unknown @.***> wrote:

Sorry if i come across as a broken record by now, has anything at all been considered for support of the mentioned features from before?

— Reply to this email directly, view it on GitHub https://github.com/gordon-vart/opensource/issues/4#issuecomment-2097213778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIO5EOE2HZWFV2FF5RT75DZBAWMVAVCNFSM5ZY76WQ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBZG4ZDCMZXG44A . You are receiving this because you commented.Message ID: @.***>