Jump to content

[SOLVED] Import terrain from Houdini


photo

Recommended Posts

So I've got the same mask shift with double precision. However, we recommend areas up to 10 x 10km with float binaries.

How exactly you made this mask? Have you made a single albedo texture?

I suggest the following approach:

  • Use your imagery as a basis for mask
  • You need to stitch all tiles and process them to create easily distinguishable colors (at the moment it's too green and landscape hex color filter wouldn't give you good results)
  • Expected result — simplified RGB texture that can be used to scatter grass and trees.

You also can experiment with masks made out of channels, not hex colors.

Thanks.

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

The mask was created in Paint.NET, just adding a new layer over the albedo texture (used only as reference) and next exporting the single layer at native resolution (the albedo was 16k, so the new layer inherited the same resolution).

Next I load the created mask picture in Affinity Photo and stripped down to 0 the red and blue channels using Channel Mixer so to leave only the green channel, saved with the same encoding as before.

I set in Unigine the mask to be read as single color and not RGB since a single color was used.

If you can suggest a more linear workflow I will be very happy to comply with.

Edited by davide445
Link to comment

Zooming to check if painting over the albedo from lower zoom make me paint in the wrong position, seems all is ok (in the meantime added another layer for grass, in red, with the same problems when used to spawn the grass)

image.png.802566dbe47282ab9a48efdf13fb0303.png

I didn't have other ideas, maybe something in my final exported mask format?

Or maybe having the albedo 16k and the heightmap 4k create some misalignment?

Edited by davide445
Link to comment

Ok, let's try to start from scratch.


First of all I want to suggest you to see our tutorial where explains basics about how to work with landscape tool into "flat" mode, especially part about using landcover masks which is starts from 7:46 till the end of the video Arbitrary Terrain - UNIGINE Editor 2 Essentials

Basically there is two ways to use landcover masks. In the first case you use RGB-channel mask or grayscale in the second way. Using RGB in the general case is a rather time-consuming process cause it requires careful tuning of thresholds of each tags and it colours. Using black/white scheme or grayscale  will be significantly easier to adjust. Just separate each nodes between tags and use individual map for each tag. Where black means no placement of the object and white means opposite. That's simple.

Speaking of RGB there is few tricks and tips I could suggest:

1) Make sure landcover mask you use definitely contains target channels, you can check this looking through asset browser in the preview window:
rgb.gif

2) You click on that button in red circle on image below to confirm colour your picked using RGB image and also adjust threshold slider to cover whole gradient of colour you choice (pay attention zero value for threshold works very rarely)

saved.png

3) You turn on checkbox opposite tag here and choice needed target tag here:

tags.png

4) You turn ON channels at editor you use to create landcover mask (PAINT.NET, CorelDraw, Photoshop, etc)

editor.png

I hope this bit of information could helps to solve your problem.

Thanks!

Link to comment

Thanks @bmyagkov this add another bit of info.

My setup in the Landscape tool already consider a single channel, Green for trees and Red for grass

image.png.4561ad3a5b5d3623dc3e9174e9f92028.png

What I didn't noticed (I never accessed this panel) it's the imported mask in Unigine is setup in the Red channel

image.thumb.png.b23e62fd8053c31fabfffc11ab9b1283.png

Not sure why, will check if this have any effect.

Btw a different topic: what are you using to capture the screen in animated gif?? I was testing ShareX but the output it's always too big.

Edited by davide445
Link to comment
  • 2 weeks later...

Tried to add more details and I'm stuck with the alignment problem.

A couple of weeks ago I discovered the height mask does have a problem (a column without data) generating this result in Houdini

2010882403_Heightmapproblemeffect.JPG.b560f4b5a6f552da5175be4a00afd3f7.JPG

Corrected this and added a new mask for details this also is misaligned as from this image where in red current location and in green the supposed.

image.png.5a56f2d3c64c4e3afefa6439264b97a6.png

The problem is solvable for grass or trees since I can shift their position independently from the landscape, but for this kind of masks I didn't find a solution.

I can in theory manually paint the map in the right position and delete it from the wrong, but first I never was able to add manually any detail using brushes in this world, and also this mean I will need to redo this any time I update maps (as I need to manually reposition trees and grass). 

Attached the map used to generate the detail, generated stripping G and B channels in Affinity Photo and saving as grey map. 

terrain_color_mud_R16.zip

Edited by davide445
Link to comment

Hello Davide,

I made the very same thing as you described:

  1. Took an imagery TIFF file
  2. Opened it in Photoshop
  3. Created a layer and made a blue-colored area where the river runs
  4. Saved this layer as a new TIFF file
  5. Generated flat terrain with these sources

As you can see no discrepancy can be found. My mask (green area) lies in the place where it supposed to be:

image.png

As for your issue I suggest checking the following:

  1. Is imagery and mask have the same proportions (aspect ratio) and resolution?
  2. Are files correctly positioned in the landscape tool? No offsets or shifts?

As I saw you have huge tileset for albedo (4000+ files). How exactly you're aligning the mask over the tileset in Landscape tool? I suggest creating a single 16k raster file for albedo and painting over your mask.

Thanks/ 

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hello morbid, really a big thanks in your effort in trying to help me.

I have finally finished with this project and the result, even if didn't make justice of the potentialities of the engine, is good enough for our needs

image.thumb.png.328ffe80c71ef72a057fe49da82b56e3.png

image.thumb.png.a07164b5b01cf71fdaff701d5494dd1c.png

image.thumb.png.e4d8fefddb3be5a852cf9652e149024a.png

Regarding this problem I finally solved deleting by hand the wrong patches and painting them in the right position.

Checking now I think a problem might be the height map is in 4k resolution vs the albedo and details in 16k, but didn't have the time doing it all the process again to test this. Height map needed to be 16k but I have had problems obtaining it trough Houdini, noticed now I settled for a 4k.

I'm working on another similar project now so will have the opportunity to test this again, in the meantime I considered successfully closed the topic.

Thanks!

Link to comment
×
×
  • Create New...