GithubHelp home page GithubHelp logo

Comments (2)

bitsalive-ron avatar bitsalive-ron commented on August 10, 2024

PS: Tried to export the maps via the Labs tool and those are going full 0-1 white. So i guess this is the required workflow.

from houdiniengineforunreal-v2.

dpernuit avatar dpernuit commented on August 10, 2024

Hi Ron,

Sorry for the late reply, it took me a while to get to the bottom of that issue ;)

So here's how the landscape layers are converted by the plugin:

  • by default, we use the layer's min/max value to convert it from float (H) to uint8 (UE). Basically [min max] ends up as [0 255] in the landscape layer.
  • we also allow conversion using [0 1] instead of [min max].
    Any HF value that is out of the range is clamped to [0 1] before converting the values.
    Basically this ends up converting [0 1] to [0 255].
    That mode can be enabled by adding the "unreal_unit_landscape_layer" primitive attribute, with the value set to 1 on the layer that you want to convert this way.

Note that if the HF mask that you are converting has values out of [0 1], the default conversion will look grey compared to the one clamped to [0 1].

For the labs tool, I guess you used "terrain layer Export", it basically works by default by limiting the values to [0 1] before exporting the file.
If you first remap your mask (via a HF_Remap) so its value are converted to [0 1], then you' ll see that the labs tool will produce grey images as well.

Here's a few pictures to illustrate my point, all from the same HF (the Houdini Engine pictures are flipped due to axis conversion).
The Original range of values on the source water volume is [-2.38419e-07 3.82061].

Here's the water layer, converted straight from my HDA. (min-max to 0-255)
he_water_norm

and here's the same when using the "unreal_unit_landscape_layer" attribute (0-1 to 0-255):
he_water_unit

Here's the default output of the labs tool, that actually thresholds the values in [0 1]:
Layer_water

and the labs tool output after I remapped the water mask to [0 1] before the export.
Layer_water_remap01

TLDR: if you'd rather use the whiter/thresholded images, then use the "unreal_unit_landscape_layer" attribute. But thresholding the values actually destroys some of the details on the image, as anything out of range will be clamped.

from houdiniengineforunreal-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.