#.gltf model not rendering correctly

14 messages · Page 1 of 1 (latest)

slate nimbus
#

Hi all! I've been struggling to make this model render correctly. I've attached a zip of it. It's from quixel megascans - this one (https://www.fab.com/listings/e7f99e78-4e0d-4096-8b83-7b6f21044091)

The .gltf contains multiple variations and LODs, but you can ignore them - the same problem manifests in all of them except the billboard LODs, which is that it's supposed to be a model of grass, but parts of it are not correctly transparent (see pics - rendered vs how the preview is supposed to look)

It's also showing some weird colours, which can be fixed if vertex coloring is turned off.
I suspect that either these vertex colours are supposed to be somehow interpreted as a mask so that we get the correct transparency, or one of the textures isn't getting loaded correctly, or a secret third thing - I really have no idea.

Any help would be super appreciated!

Fab.com

Maps: Specular Normal Cavity Basecolor Translucency Bump Displacement Gloss Opacity Roughness Create high-quality 3D experiences and worlds with Quixel Megascans. Browse thousands of photorealistic assets and environments, including materials, 3D assets, plants, decals, and more available here on Fab.For any questions or support regarding Quixel...

slate nimbus
#

I believe this is the texture that is supposed to define transparency

#

I am not sure how to interpret it though! It's called T_rbEkP_2K_ORT.png. I am guessing that stands for Opacity, Roughness, Translucency?

slate nimbus
#

I am getting a little closer

#

so yes, I think this is a texture that packs different information each into one channel

#

the opacity information is in the red channel

#

The Three.js texture RedFormat:

RedFormat discards the green and blue components and reads just the red component.

#

If I do the exact same thing to the ORT texture using imagemagick to preview what it looks like, I get this

magick Tall_Grass_rbEkP_Mid_2K_Opacity.jpg -alpha off -channel GB -evaluate set 0 +channel red-only.png

#

That looks almost exactly how I want! Only problem is, I can't use it as an alphaMap, because the red needs to be white

slate nimbus
#

I am super stumped. I downloaded the fbx version, which lays out the textures separately. But the opacity one is still with a red color, like the one above, and I can't figure out for the life of me how to get it to work

slate nimbus
#

The only way I was able to get it working correctly is by using the FBX version and converting the opacity texture to grayscale (manually), so that the red becomes white

pulsar urchin
#

the vertex colors for physics/wind sim in unreal.

by default three.js does
ORM (red:occ, green:rough, blue:metal) this image can be directly be plugged into AOmap, roughnessMap and metalnessMap

transparency is read from the alpha channel of the albedo/diffuse/map
and if alphaMap channel is used it only reads the green channel https://threejs.org/docs/?q=meshsta#api/en/materials/MeshStandardMaterial.alphaMap

converting the images manully is ideal since its a one time task and then its plug and play

#

ideal texture layout

  • Color Image with transparency
  • Orm image with ao , rough, metal
  • Normal map in openGL format (lighting will look weird with directX)