Skip to content

Commit

Permalink
Fixed Material Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Menithal committed Jan 6, 2020
1 parent a1477ae commit 4f715a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Currently Supports
- VRC
- Tower Unite

## 2.0
## 2.0 works only with 2.81 or later, use older version for 2.80.

# Installation Guide

Expand Down Expand Up @@ -108,7 +108,7 @@ Work in progress module to try to stream line some "gotchas" when converting ava
- `Generate VRC Shapekeys` - Generates empty shapekeys (for now, later will allow the use of various methods, including CATS, and custom)
- `Sort Shapekeys` - Utility function to quickly sort shapekeys to match VRC requirements.

### Tower Unite tools
### Tower Unite Tools (WIP)

Work in progress module to try to stream line some "gotchas" when converting avatars to TE.

Expand All @@ -124,10 +124,18 @@ Work in progress module to try to stream line some "gotchas" when converting ava
### 2.0
- `hifi_tools` is now `metaverse_tools`
- Added Tower Unite specific tools
- Fixed 2.81 FBX export (but may have forgotten 2.8)

### 1.5.5

- Hifi_tools is in the process of renaming to mvt_tools, in version 2.0 this will occur
- Added VRChat Specific tools (WIP) for experienced blenderers.
- Prepared framework for ability to import and on-the-fly create multiple platform skeletons and retarget animations cross-platform.
- Fixed issues with Hifi FBX export, regarding emissions


### 1.4x

- 2.8 RC support
- Removed eBPBRS infavor of just using the PBR Materials.
- Lots of Refactoring
6 changes: 5 additions & 1 deletion metaverse_tools/ext/modified_fbx_tools/mod_export_fbx_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,15 @@ def fbx_metav_toolset_data_material_elements(root, ma, scene_data):
elem_props_template_set(tmpl, props, "p_number", b"SpecularFactor", 0.0)
# elem_props_template_set(tmpl, props, "p_number", b"SpecularFactor", ma_wrap.specular / 2.0)

if ma_wrap.base_color_texture is not None:
print(ma_wrap)

if ma_wrap.base_color_texture is not None and ma_wrap.base_color_texture.node_image is not None:
print("Color Texture")
elem_props_template_set(tmpl, props, "p_color", b"DiffuseColor", (1.0, 1.0, 1.0))
elem_props_template_set(tmpl, props, "p_color", b"Maya|base_color", (1.0, 1.0, 1.0))
elem_props_template_set(tmpl, props, "p_bool", b"Maya|use_color_map", True)
else:
print("No Color Texture")
elem_props_template_set(tmpl, props, "p_color", b"DiffuseColor", ma_wrap.base_color)
elem_props_template_set(tmpl, props, "p_color", b"Maya|base_color", ma_wrap.base_color)

Expand Down
6 changes: 0 additions & 6 deletions metaverse_tools/utils/helpers/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@ def correct_all_color_spaces_to_non_color(context):


class HifiShaderWrapper(PrincipledBSDFWrapper):



NODES_LIST = PrincipledBSDFWrapper.NODES_LIST

def __init__(self, material, is_readonly=True, use_nodes=True):
Expand All @@ -229,7 +226,6 @@ def __init__(self, material, is_readonly=True, use_nodes=True):

def update(self):
PrincipledBSDFWrapper.update(self)

print("HifiShaderWrapper", self.use_nodes, self.node_principled_bsdf)


Expand All @@ -246,7 +242,6 @@ def emission_set(self, value):
emission = property(emission_get, emission_set)

# Will only be used as gray-scale one...

def emission_texture_get(self):
print("Emission Texture Get", self.use_nodes, self.node_principled_bsdf)
if not self.use_nodes or self.node_principled_bsdf is None:
Expand Down Expand Up @@ -283,7 +278,6 @@ def find_env_texture(nodes):

def fix_env_rotations():
try:

for world in bpy.data.worlds:
nodes = world.node_tree.nodes
links = world.node_tree.links
Expand Down

0 comments on commit 4f715a7

Please sign in to comment.