Parallax Height Map From Unity

Hey guys i am trying to export height maps from Unity. Here is what i am going for:

But this is what i get in Babylon.js:

The height is packed into the ALPHA channel of the bump map as shown above

Console Output:

The useParallax = true and parallaxBiasScale = 0.1

That should be all the variables to height mapping… But my babylon version looks nothing like Unity version.

Any body got ANY thoughts as what i am doing wrong ???

@Deltakosh @sebavan … Anybody ???

Are you able to provide a PG? It should work indeed (try to change the value of parallaxBiasScale / the type of the light, just in case…).

1 Like

I am doing exactly what the sample is doing https://playground.babylonjs.com/#10I31V#23

But i cant say fur sure if i am packing the heightmap into the alpha channel correctly

Can you tell me HOW this normal map alpha channel was pack…

Is it just the GREEN channel copied over from the heightmap texture ?

Is it an avergage of all the heightmap channels (r + g + b / 3) ?

Is a black and white pixel ?

Is is grayscale pixel ?

What is actually packed into the alpha of this normal map

GtIUsWW

The alpha channel is just the height, with 0 = flat and 1=max height and you can use all the values in-between. The final perceived height depends on the value of parallaxScaleBias.

Note that the sample demonstrates parallax occlusion and not simply parallax. Have you tried to enable it and see if it makes any difference?

Regarding the sample, I don’t know how the alpha channel has been generated…