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

[WIP] major material rework #100

Closed
wants to merge 62 commits into from
Closed

[WIP] major material rework #100

wants to merge 62 commits into from

Conversation

Tarcontar
Copy link
Collaborator

@Tarcontar Tarcontar commented Feb 8, 2020

Got most of the stuff for import working so far. Export still needs some work.
Encountered some issues with missing functionality in the blender python api in order to complete this:

  • can not set 'default_value' for custom node sockets since no dedicated interface can be defined for them (is always NodeSocketInterface which does not provide a default_value)

This way stuff like the alpha pipeline can not be provided as node group templates since a user would have to fill in the default values for math nodes himself which is not feasable.

  • can not set the 'type' of custom node sockets thus they always default to 'VALUE' which causes e.g. ColorSockets to provide only the red channel as output

@Tarcontar Tarcontar force-pushed the material branch 3 times, most recently from 27c54ac to 1cac534 Compare February 12, 2020 12:10
@Tarcontar Tarcontar changed the title [WIP] introduced prelit changes [WIP] major material rework Mar 11, 2020
Comment on lines 142 to 156
def test_shader_material_type_name_fallback(self):
mesh = get_mesh(shader_mats=True)

for source in mesh.shader_materials:
source.header.type_name = 'LoremIpsum'
source.properties = []

(material, principled) = create_material_from_shader_material(
self, mesh.name(), source)
actual = retrieve_shader_material(self, material, principled)
source.header.type_name = 'DefaultW3D.fx'
compare_shader_materials(self, source, actual)

def test_shader_material_type_name_upgrade_to_normal_mapped(self):
mesh = get_mesh(shader_mats=True)

for source in mesh.shader_materials:
source.header.type_name = 'LoremIpsum'

(material, principled) = create_material_from_shader_material(
self, mesh.name(), source)
actual = retrieve_shader_material(self, material, principled)
source.header.type_name = 'NormalMapped.fx'
compare_shader_materials(self, source, actual)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readd these

@Tarcontar Tarcontar added the insufficent api the blender api does not provide the necessary functionality label Apr 30, 2020
- support prelit materials and multiple material passes
- support for per face materials
- support for per face surface types via face maps
- support for vertex colors
- apply modifiers to meshes on export
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move these to appropriate version

@Tarcontar
Copy link
Collaborator Author

Found a solution for the NodeSocketInterface problem as described here:
https://developer.blender.org/T78075

@Tarcontar Tarcontar removed the insufficent api the blender api does not provide the necessary functionality label Jun 30, 2020
@Tarcontar Tarcontar closed this Sep 17, 2020
@Tarcontar
Copy link
Collaborator Author

replaced by PR #170

@Tarcontar Tarcontar deleted the material branch September 17, 2020 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants