jMonkeyEngine / jMonkeyEngine/jmonkeyengine

Texture Channel Packing

Open
#999 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
1.2k
Avg merge
4d 7h
Merged PRs (30d)
14

Description

So I've intentionally kept this description a bit more broad, since there is discussion going on here

In the unreal documentation they outline their format as:
R = Metallic
G = Roughness
B = Ambient Occlusion

And in another UE article it’s:
R = Ambient Occlusion
G = Metallic
B = Roughness

Whereas ours is:
G = Roughness
B = Metallic

See: https://github.com/jMonkeyEngine/jmonkeyengine/blob/d57c362ec3b510c1ba6356f719efa3b1576b95c6/jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.j3md#L30

GLTF Spec also uses "our" format and yet that leads to problems when trying to export a GLTF Project from blender instead of hand crafting Textures to our format. See https://hub.jmonkeyengine.org/t/environment-cam-and-light-probe-question/41241

Under Texture Requirements they also pack Ambient Occlusion into the R channel, which we don't do yet, opinions?

Maybe the GLTF Exporter is broken or our importer is broken? It definitely looks like Roughness and Metallicness is swapped somewhere for users importing from blender.

I didn't want this issue to end like this, I was expecting the GLTF Spec to say something different (namely the Unreal Definition 1), we should still keep track of this in an issue. I'll report back if I find more information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with jme3-core/src/main/resources/Common/MatDefs/Light/PBRLighting.j3md at the referenced channel definitions, then review the linked GLTF and Blender discussions. Determine whether the exporter or importer swaps metallic and roughness channels and whether ambient occlusion should be included. Done requires an agreed format and verified channel mapping.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.