[TODO] X3D Export: Add support for basic material node setups #34
Labels
No Label
bug
confirmed
duplicate
enhancement
help wanted
High
known issue
Low
Normal
not a task
question
task
v2.4
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: extensions/io_scene_x3d#34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unfortunately the current addon version does not support (or work if implemented already, not checked yet) blender materials node export of any kind.
Basic node setups could be read via blender python api (go through node tree and get the properties of each node used).
More complex node setups would need to get either baked to image texture or processed as glsl shader code (like H3D Extensions did in blender 2.79); this is currently out of scope and may or may not be added.
Blender nodes to get supported:
@vmarchetti I believe you already started work on supporting image texture nodes of the exporter on your fork? What feature scope do you plan to cover?
I am re-enabling exporting an ImageTexture X3D node in x3d exporter. The new code is in the image-export branch of https://projects.blender.org/vmarchetti/io_scene_x3d . I am testing and my goal is to create a pull-request on Nov 11.
The implementation follows the course you describe, it traverses the material node tree and identifies the case that closely matches X3D's image as texture capabilities; the image is applied as the "Base Color" of Blender BSDF node tree.
Another new feature of the code is that it will write the image to disk as part of the export, even when the image is a "Packed File" in the Blender data. This is intended to support the workflow
import glTF/glb --> edit Blender Scene --> export as X3D
in which case the image may not exist on disk as a separate image file. I'm still thinking about how this would be integrated with the existing path-mode mechanism in blender, which looks like it depends on the image file existing somewhere on disk that can be copied to where the user wants it.
I do intend to next work on the correct export of a Blender node-defined material which will at least for now get mapped into X3D's RGB-based colors. There are other members of the X3D community who will be working on physically based material export once a ground trail is blazed.
@vmarchetti Alright, great to hear, i'll be happy to merge once finished. So current features being worked on: Export support of the nearest image texure node and copy file to output directory.
Two additional proposals from my side regarding your current work:
Path Mode
like the fbx exporter, as it would allow the user to specifiy, whether the texture file should get copied, or an absolute/relative Path get used. Though, i'm unsure if this would be helpful for users or just add ui-complexity...c94f3847bb
.Could you already create a WIP Pull Request? Tracking features/bugs being currently worked on as well as open communication would be easier. By the way, don't stress about time; extensions are not bound to any release cycles, so anytime meaningful changes appeared, a new version can get published.
So support of the above mentioned blender nodes is planned on your side?