blendergltf icon indicating copy to clipboard operation
blendergltf copied to clipboard

Create a BLENDER_materials_nodes extension

Open Moguri opened this issue 7 years ago • 7 comments

This extension would export shader nodes to be consumed by an engine. This is easier to consume than raw GLSL, but it still allows for shader creation in Blender.

Moguri avatar Aug 15 '17 17:08 Moguri

sounds great, with Cycles and Eevee support please! :D

reduz avatar Aug 15 '17 17:08 reduz

Easier to consume by which engines? Only Blender would be able to make use of these, would probably be easier to stick that data in extras than formalizing an extension.

stevenvergenz avatar Aug 15 '17 18:08 stevenvergenz

@stevenvergenz Any engines. In Godot this would work great, in fact. There isn't really any kind of abstract shader language that would work, and writing directly to something like GLSL or SPIR-V is useless due to them being too low level.

If the node graph is exported, however, it is easy for a parser to convert it to the shaders used internally by any engine.

reduz avatar Aug 15 '17 19:08 reduz

I have created a material_nodes branch to begin work on the spec for this extension. No implementation work has started yet.

@reduz My current thought is to export a graph with each graph node having a type and a list of inputs and outputs (i.e., sockets). These sockets also have a type and value. The types on the sockets should be fairly well defined (e.g., color, scalar, node reference), but interpreting the node type will be mostly up to the consuming application. Does this rough cut align with what you were expecting? I have also listed you as a contributor for this extension.

Moguri avatar Oct 16 '17 02:10 Moguri

Yeah.. a graph would work best as I can convert it to either godot shader language or visual shader (if i succeed in implementing the same..)

On Oct 15, 2017 11:17 PM, "Mitchell Stokes" [email protected] wrote:

I have created a material_nodes branch to begin work on the spec for this extension. No implementation work has started yet.

@reduz https://github.com/reduz My current thought is to export a graph with each graph node having a type and a list of inputs and outputs (i.e., sockets). These sockets also have a type and value. The types on the sockets should be fairly well defined (e.g., color, scalar, node reference), but interpreting the node type will be mostly up to the consuming application. Does this rough cut align with what you were expecting? I have also listed you as a contributor for this extension.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kupoman/blendergltf/issues/82#issuecomment-336763078, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z2zAcurJmUl4Ms9E0SwOMHi0vguA-ks5ssrzVgaJpZM4O35m3 .

reduz avatar Oct 16 '17 02:10 reduz

I'm very sorry if my question doesn't fit the topic, but since I'm kind of new to github and programming stuff - maybe you can help me out.

I came from the Khronos glTF-Exporter for Blender to see, if the animation exportation of this exporter works properly - and it does. Very intuitive and reliable, so thanks for that!

My problem is, that with the Khronos exporter and their KHR-Shader Groups I could easily create materials that looked a lot like in Blender-Cycles, when rendered via three.js (WebGL). Until now, I couldn't figure out a way to create materials with your exporter - all objects are displayed shiny (100% metallic, 0% roughness, color: ffffff). Do you have a documentation or something like that somewhere? I wasn't able to find it yet.

Thanks and best regards

ghost avatar Jun 16 '18 14:06 ghost

@dustronauts This exporter exports Blender Internal materials, but not Cycles materials. If you look at the material panel while the renderer is set to "Blender Render", you should see a "PBR Export" panel that allows you to set some PBR related settings.

Kupoman avatar Jun 16 '18 16:06 Kupoman