7
$\begingroup$

as described in Blender Shader in OpenGL/GLSL, it is possible to export the (unoptimized) GLSL code generated by Blender for a given material.

Since the viewport can use such GLSL for real-time shading, my understanding is that Blender could be used to fully design and preview assets for real-time applications, without restricting materials to existing shaders/parameters (since nodes can be used to design a large variety of GLSL-exportable materials).

But exporting GLSL shaders manually for each material, then exporting geometries, and finally associating them in the final render engine does not seem like an efficient workflow.

So I was wondering if there exists any Blender model exporter (whatever file format it exports to) that does export generated GLSL code alongside geometries?

Regards.

$\endgroup$
  • $\begingroup$ As an illustration, this material setup would benefit from such an export (should the target engine accept GLSL shaders). $\endgroup$ – oparisy Jun 14 '15 at 20:20
  • $\begingroup$ I'm sorry, but as far as I am aware it is impossible to export materials with your model. You will have to export GLSL separately to the model. Using Blender as a shader editor would be cool, and is something I would want to do. $\endgroup$ – Amziraro Jun 15 '15 at 0:57
  • $\begingroup$ The Blend4Web addon does this and more. $\endgroup$ – MarcClintDion Jun 15 '15 at 18:02
  • $\begingroup$ @Amziraro my understanding is that easier design of GLSL shaders using Blender nodes will be a byproduct of the viewport improvements effort. $\endgroup$ – oparisy Jun 15 '15 at 21:16
  • 1
    $\begingroup$ @MarcClintDion Indeed, the Blend4Web documentation states that "All shaders used in the engine are processed by a compilator", but that seem rather vague. Are Blender-generated GLSL shaders exported in the intermediary json representation of Blend4Web assets? $\endgroup$ – oparisy Jun 15 '15 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.