Skip to content

Commit

Permalink
Merge branch 'gltf-pbr' of https://github.com/xtanion/fury into pr/715
Browse files Browse the repository at this point in the history
  • Loading branch information
m-agour committed Dec 16, 2023
2 parents b0c2aaa + 4361ab3 commit 4bec13c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/examples/viz_gltf_pbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
if interactive:
window.show(scene, size=(1280, 720))

window.record(scene, out_path='viz_gltf.png', size=(1280, 720))
window.record(scene, out_path='viz_gltf_PBR.png', size=(1280, 720))
6 changes: 3 additions & 3 deletions fury/gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ def load_mesh(self, mesh_id, transform_mat, parent):

if attributes.NORMAL is not None and self.apply_normals:
normals = self.get_acc_data(attributes.NORMAL)

utils.set_polydata_normals(polydata, normals)

if attributes.TEXCOORD_0 is not None:
Expand Down Expand Up @@ -421,7 +420,6 @@ def get_materials(self, mat_id):
"""
material = self.gltf.materials[mat_id]
pbr_dict = None

pbr = material.pbrMetallicRoughness
if pbr is not None:
bct, orm = None, None
Expand Down Expand Up @@ -535,6 +533,7 @@ def get_texture(self, tex_id, srgb_colorspace=False, rgb=False):

return atexture


def generate_orm(self, metallic_roughness=None, occlusion=None):
"""Generates ORM texture from O, R & M textures.
We do this by swapping Red channel of metallic_roughness with the
Expand Down Expand Up @@ -570,7 +569,8 @@ def generate_orm(self, metallic_roughness=None, occlusion=None):
atexture.EdgeClampOn()
atexture.SetInputDataObject(grid)

return atexture
return atexture


def load_camera(self, camera_id, transform_mat):
"""Load the camera data of a node.
Expand Down

0 comments on commit 4bec13c

Please sign in to comment.