gaea2Houdini has deviations, and in some cases, the errors are extremely large

I found that the Height in Terrain Definition can affect the effect of Gaea2Houdini.

  1. gaea terrian hda collected the height of the heightfield and stored it in the Input meta file
  2. store the absolute height value in the input graw
  3. The process is Gaea.SwarmHost, which is a black box for us
  4. The following are all my guesses and might not be accurate
  5. gaea forcibly stretches the Height of the ground surface to such a height based on the height defined in the Terrain Definition, even though the original drop might have been only 20 meters
  6. gaea calculates based on the written flowchart, for example, Erosion2
  7. output meta and graw, and then compress them back according to the previously defined height difference

Let me give you an example. I built a 4096 heightfield in houdini with a drop of 25 meters. I created the effects using two methods respectively. This is a river. Except for the bottom which is -25 meters, the rest of the river is 0 meters.

method 1 :I set a heightoutput, compress it to 0-1 based on -64 to 64, and select png 16-bit fixed. I imported such a graph into gaea using the file node. I measured the height and found that it was 64 meters at the plane and 38 meters at the river bottom, with a drop of exactly 25 meters. Then add Erosion2, and the effect is correct.

I exported the png by myself and compressed it from -64 to 64 to 0 to 1. This way, the height difference is in line with the 128 setting of the project file.

So after the import, although the absolute values of each value are incorrect, the differences are correct. Since it was set to 128, the original 0 plane in png is 0.5, but in gaea it becomes 64.

method 2 :I directly used the gaea2 terrain processor in houdini, but the effect was completely wrong.

When the gaea terrain processor is processing, it first pulls the ground surface to a height difference of 128, that is, the highest point, plane 0, is 128, and the lowest point, -25, becomes 0. Then it calculates erosion2 and exports it. During the export process, it pushes it back based on the previous height difference. This back-and-forth process results in an incorrect effect.

I’ve tried other cases, and actually each one is a bit different. When the height difference approaches 128, the effect is basically the same. Usually, few people would use such a small drop, or rather, no one would notice that in houdini, the drop should be set to the exact amount in the gaea file to be the most accurate, right?

Hey @bigmi

A good way to validate this.
Test with Erosion2 disabled (Input to Output) and compare the height min/max before and after Gaea2Houdini node ( stats view), you can also test the full results in Houdini too.

If the 25m height difference becomes 128m, the bridge ( after build) is normalising the input to the full Terrain Definition height. If it stays 25m, the difference is likely in Erosion2’s simulation scaling.

You shouldn’t always need to match your terrain’s actual height difference to Terrain Definition Height
Terrain Definition is typically the bounds unless end values are normalised ( like with the unreal node ).

I’ve come up with a solution and I’ll prove it to you today. I plan to select two points on the original river plane, set the height value of one point to 64 and the other to -64. In this way, when this heightfield passes through gaea, it won’t be stretched. After such calculation, if the effect of the river part is quite different from yesterday’s, can it explain the problem?

The height difference before and after is correct, even if the effect is not right.

What I mean is that a river with an original drop of 25 meters will be forcibly stretched to a drop of 128 meters, and then erosion2 will be calculated. After that, it will be compressed back according to the previous height difference.

First of all, I did some processing on the heightfield in houdini. In the corner of the scene, I found two points, which were actually two Voxels. One was set at a height of 64, and the other was -64.

This is the original appearance of the river. The flat area is 0, the riverbed is -25, and the riverbank is slightly smoother.

This is what it looks like after dealing with those two points.

Zoom in to see.

This is the effect of the small river after calculation by the gaea terrain processor. I deliberately didn’t open any parameters and just used the default parameters set in the Gaea file without making any changes.

I disabled the processing of those two points and then recooked to get the result.

It can be clearly seen that it is wider and inconsistent with the previous one. The input of the two of them has only one difference, which is that there are two points in the corner, occupying a height value of 64 and -64 respectively.

Since two voxels occupy a height of -64 to 64, such a height map will not be stretched to 128 when placed in Gaea. Of course, this value can be changed. I have tried and found that the minimum can reach 100. In fact, I noticed quite early on that gaea2houdini was often inaccurate. It’s just that at that time, my scenes were all in the thousands of dimensions, and the difference between what was done manually and what was calculated automatically wasn’t that big. But once the scale reaches tens of meters, the problem becomes very obvious. When Gaea builds, it will definitely first stretch the houdini input to the Terrain difinition height set in the file, then process it, and after processing, push it back. It is precisely because it is pushed back that it is highly deceptive. Once the magnitude is only a few dozen meters, this problem will be magnified. Just think about it. For a 25-meter-deep river channel, could it be the same if it is directly eroded or first stretched to 128 meters and then eroded and pressed back?

Even so, it can be assumed like this. Before each houdini calculation for Gaea2 Houdini, it should first measure the height range and then modify the terrain definition height in the gaea file to match it; otherwise, the result will definitely be inaccurate. My suggestion is whether this set of algorithms can be modified to set a range, for example, 0-1 corresponds to how much to how much, just like the landscape in unreal5, where 0-1 corresponds to -256 to 256, with a strict definition to facilitate mutual conversion.

Alternatively, Terrain difinition height can be opened up, and any value greater than 1 is acceptable. At present, the minimum limit is set at 100.

Many thanks for your continued feedback.

I have checked the bridge source, and it derives the height range from the input’s Min/Max values.

Would you be able to test this by exporting once, duplicating the .graw and .meta files, then changing only the Min/Max values in one .meta file?

Run both through the same Gaea graph with fresh builds ( deny cache builds ), keeping the .graw data identical.

That should help isolate whether the height-range metadata is affecting Gaea’s erosion results when processed through Gaea2Houdini. I can then raise this internally too.

I found that there are two meta files, one for input and the other for output. I have conducted your test. I modified the input meta, changing the value to -64 to 64. I found that gaea didn’t read this value at all when inputting the file and directly forcibly stretched it to 128 internally. However, when gaea outputs, it reads this value and then pushes it back. Since it is 128 at this time, it does not compress and outputs directly. The final result will be particularly high.

First, I disable those two dots, and then edit gaea terrain processor.

Clear the cache directory.

hack it

after cook

result

Based on the results, the input meta file only serves as a reference for the values pushed back when gaea is outputting. When gaea is inputting, the gaea internally re-evaluates the graw values and then stretches them.

When we hacked this process and made the input meta record -64 to 64, gaea still stretched it. And when outputting, since the current height value range is 128, it was not pushed back, and finally the river channel became deeper.

Look, the final result, measured in houdini, is close to -64 to 64, while it was originally -25 to 0

To sum up, after our hack:

  1. When Gaea writes cache meta, the actual height value is recorded in the input graw, which is -25 to 0 at this time
  2. Meanwhile, because of our hack, the input meta file records -64 to 64
  3. gaea read the graw file, which recorded the real absolute values and directly stretched them to 0 to 128
  4. When gaea outputs, it pushes the range from 0 to 128 back to -64 to 64

No matter what height range is recorded in the meta, gaea will forcibly stretch it based on the terrain definition height. Then, when it is sent back to houdini, it will actually refer to this meta value and press it back again to make this height value seem correct.

Thanks again for looking into this, we had escalated this internally for more insight.