question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

normal chanel texture transformation is ignored

See original GitHub issue

Describe the bug

hi my gltf contains a texture transformation for the normals chanel.

  "materials": [
    {
      "name": "Material_0",
      "normalTexture": {
        "extensions": {
          "KHR_texture_transform": {
            "scale": [
              0.1,
              0.1
            ]
          }
        },
        "index": 1
      },

the transformation is ignored by Three.js editor my normals map contains a white polygon. see snapshots from from Three.js (wrong) and khronos viewer (correct) normals polygon is marked with red after snapshot, I attached the gltf inside a zip file. please advise To Reproduce

Steps to reproduce the behavior:

  1. open https://threejs.org/editor/
  2. import attached rectangle.gltf (extracted from rectangle.zip)
  3. in the scene dialog, double click rectangle.gltf
  4. in the Environment, select MODELVIEWER
  5. ERROR - The normal image should be much larger becase the KHR_texture_transform scale is 0.1

Code

// code goes here

Live example

Expected behavior Since i was using scale transformation for the normal chanel in the material, i was expecting the normal texture to be much bigger, as viewd in khronos viewer. ד

Screenshots 1

Rectangle.zip

Platform:

  • Device: [Desktop]
  • OS: [Windows]
  • Browser: [Chrome]
  • Three.js version: [dev, r138]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
mrdoobcommented, Mar 22, 2022

I’m currently working on a PR that enables offset-repeat in all maps 🤓

0reactions
iuriiiurevichcommented, Sep 27, 2022

I’m currently working on a PR that enables offset-repeat in all maps 🤓

@mrdoob are there any updates on this feature? It would be great to support different offsets-repeats, for example, because glTF already works this way, so GLTFLoader does not work correctly in some cases, which can be misleading (as described in the docs: “UV transforms are supported, with several key limitations … No more than one transform may be used per material”).

Read more comments on GitHub >

github_iconTop Results From Across the Web

normal chanel texture transformation is ignored #3278 - GitHub
hi my gltf contains a texture transformation for the normals chanel. the transformation is ignored by model viewer in this example, my normals...
Read more >
Tutorial: Types of Normal Maps & Common Problems - 80 Level
Freeing up a channel on our normal map allows us to reduce the texture size or use the channel for metalness/roughness/opacity.
Read more >
Compact Normal Storage for small G-Buffers · Aras' website
In my case, main target is minimalist G-buffer, where depth and normals are packed into a single 32 bit (8 bits/channel) render texture....
Read more >
UE4 Material Tricks you didn't know - YouTube
This is a long video because it's several small tutorials in a single one. I've separated it in chapters in case you're interested...
Read more >
Texture 2.0 VOP node - SideFX
This operator computes a filtered sample of the texture map specified and returns an RGB or RGBA color. If the image does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found