Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GLTF KHR_texture_transform extension #1696

Open
tonpix opened this issue Nov 8, 2024 · 3 comments
Open

Add support for GLTF KHR_texture_transform extension #1696

tonpix opened this issue Nov 8, 2024 · 3 comments

Comments

@tonpix
Copy link

tonpix commented Nov 8, 2024

Describe the bug
If tiling for texture is set 1 in blender, exported .glb is viewed correctly in F3D (mesh and viewport grid are visible). If I set tiling higher than 1, F3D viewport is empty - no visible mesh or grid, despite file size indicating there's mesh data inside.

Tiling set at 1:
f3d_RPG7S7G60V

Tiling set at 2:
f3d_jYec9pJDoI

To Reproduce

  1. open invisbleMesh.glb https://drive.google.com/file/d/1OSo28XK-DHT4vItJ1mqeSOTo_UuriRIR/view?usp=sharing

Expected behavior
Visible mesh+viewport grid.

System Information:
OS: Windows 10
GPU and GPU driver: GTX 1080, drivers 551.76

F3D Information
Version: 2.5.0.
Build date: 2024-07-01 21:30:06.
Build system: Windows 64-bits.
Compiler: MSVC 19.40.33811.0.
External rendering module: ON.
Raytracing module: ON.
VTK version: 9.3.0-3457-gecf3646d64 (date: 20240620).

@Meakk
Copy link
Member

Meakk commented Nov 8, 2024

Can you parse the logs when using the --verbose option?
I suspect setting the uv scale will produce GLTF files with the texture transform extension

@tonpix
Copy link
Author

tonpix commented Nov 8, 2024

========== Initializing ==========
Loading plugin "alembic"
  Version: 1.0
  Description: Alembic support (version 1.8.5)
  Readers:
    Alembic
Loading plugin "assimp"
  Version: 1.0
  Description: Assimp support (version 5.4.0)
  Readers:
    Filmbox
    Collada
    AutoCAD DXF
    Object File Format
    DirectX File Format
    3D Manufacturing Format
Loading plugin "draco"
  Version: 1.0
  Description: Draco support (version 1.5.6)
  Readers:
    Draco
    GL Transmission Format
Loading plugin "exodus"
  Version: 1.0
  Description: VTK Exodus support
  Readers:
    Exodus II
Loading plugin "native"
  Version: 1.0
  Description: Native VTK I/O support
  Readers:
    Autodesk 3D Studio
    CityGML
    DICOM
    GL Transmission Format
    MetaImage
    Nearly Raw Raster Data
    Wavefront OBJ
    Polygon
    Point Cloud
    Standard Triangle Language
    TIFF
    VRML
    VTK Legacy
    VTK XML UnstructuredGrid
    VTK XML PolyData
    VTK XML ImageData
    VTK XML RectangularGrid
    VTK XML StructuredGrid
    VTK XML MultiBlock
    3D Gaussian splats
Loading plugin "occt"
  Version: 1.0
  Description: OpenCASCADE support (version 7.7.2)
  Readers:
    STEP ISO 10303
    Initial Graphics Exchange Specification
    Open CASCADE BRep
Loading plugin "usd"
  Version: 1.0
  Description: USD support
  Readers:
    Universal Scene Descriptor
Loading plugin "vdb"
  Version: 1.0
  Description: VTK OpenVDB support
  Readers:
    VDB
Using config directory C:\Program Files\f3d\share\f3d\configs\config.d
using `global` config from C:\Program Files\f3d\share\f3d\configs\config.d\10_global.json
+ animation-progress: true
+ anti-aliasing: true
+ axis: true
+ camera-direction: -1,-0.5,-1
+ filename: true
+ grid: true
+ hdri-ambient: true
+ progress: true
+ scalars: 
+ tone-mapping: true
+ translucency-support: true
========== Configuring engine ==========
Engine configured
========== Loading 3D file ==========
No file to load provided.
========== Rendering ==========
Render done
========== Loading 3D file ==========
using `global` config from C:\Program Files\f3d\share\f3d\configs\config.d\10_global.json
+ animation-progress: true
+ anti-aliasing: true
+ axis: true
+ camera-direction: -1,-0.5,-1
+ filename: true
+ grid: true
+ hdri-ambient: true
+ progress: true
+ scalars: 
+ tone-mapping: true
+ translucency-support: true
Found a reader for "[redacted]" : "GLTFDraco"
Loading 3D scene: [redacted]

ERROR: In vtkGLTFDocumentLoaderInternals.cxx, line 1339
vtkF3DGLTFDocumentLoader (000002101A3D09C0): glTF extension KHR_texture_transform is required in this model, but not supported by this loader. Aborting


ERROR: In vtkGLTFImporter.cxx, line 395
vtkF3DGLTFImporter (000002100B09ECE0): Error loading model metadata


ERROR: In vtkGLTFImporter.cxx, line 837
vtkF3DGLTFImporter (000002100B09ECE0): The GLTF model is nullptr, aborting.


No animation available in this file
ERROR: In vtkGLTFImporter.cxx, line 622
vtkF3DGLTFImporter (000002100B09ECE0): The GLTF model is nullptr, aborting.


No camera available in this file



Scene bounding box: 1,-1,1,-1,1,-1

Camera position: 0,0,1
Camera focal point: 0,0,0
Camera view up: 0,1,0
Camera view angle: 30


========== Rendering ==========
Render done

@Meakk
Copy link
Member

Meakk commented Nov 8, 2024

Indeed that's the problem.
Related issue: #608

@Meakk Meakk changed the title Empty view if texture tiling is higher than 1 Add support for GLTF texture transform extension Nov 8, 2024
@Meakk Meakk changed the title Add support for GLTF texture transform extension Add support for GLTF KHR_texture_transform extension Nov 8, 2024
@mwestphal mwestphal added this to F3D Dec 19, 2024
@mwestphal mwestphal moved this to Investigate in F3D Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Investigate
Development

No branches or pull requests

3 participants