4
$\begingroup$

I created the following model by following an online tutorial in order to add it in a game:

sphere

Here is the shader graph that I used to create the same:

shaders

But when I tried to export in .glb format and view it in a glb viewer, I found out that it was just showing a sphere which was emitting white light, and no other colors/textures were visible.

output

But I want to export (into .glb) the exact figure that is visible in blender.

I am new to blender, and might be making some silly mistake. I searched about this issue online, but I am unable to find the solution to it. I might be using the wrong terminology for the same.

$\endgroup$
7
  • $\begingroup$ Generally speaking, materials are not exportable-- they are specific to each rendering engine. There are some exceptions, as with glsl exports, but even then the exceptions are limited-- you're probably not going to get your nodes anywhere but Blender. Consider baking your emission color * strength to an image texture (look up texture baking); consider designing materials in the engine where you're going to be rendering them. $\endgroup$
    – Nathan
    Commented Apr 23, 2021 at 5:21
  • $\begingroup$ Noise texture is only in blender, can't be exported to other programs. You'd need to recreate it. $\endgroup$ Commented Apr 23, 2021 at 5:22
  • $\begingroup$ @Duarte, you have a nice detailed answer on that other question, but this question is very specific and deserves its own answer, it's not a duplicate. glTF has a complex and evolving material system, and there may be ways using glTF to create effects similar to what the OP is asking for here. $\endgroup$
    – emackey
    Commented Apr 23, 2021 at 13:22
  • 1
    $\begingroup$ @b30wulffz For procedural textures like this, there's no direct equivalent in glTF (....yet?), but Blender can "bake" textures like this into glTF. Here's a YouTube link showing how to bake fractal noise into glTF models. For your case, you'll want to turn on some kind of Bloom post-process effect in ThreeJS or whichever viewer you use. $\endgroup$
    – emackey
    Commented Apr 23, 2021 at 13:29
  • $\begingroup$ @emackey I reopened the question. Can you provide an answer for this particular case? $\endgroup$ Commented Apr 23, 2021 at 14:19

1 Answer 1

4
$\begingroup$

There are three different issues interfering with your ability to export this particular model. Let's take them one at a time.

  1. Arbitrary material nodes not supported.

The glTF format has a system of materials that's more sophisticated at this point than many other public 3D formats, but it doesn't support the full set of Blender material nodes, many of which are specific to Blender itself. There's documentation in the Blender Manual on which nodes can be exported to glTF.

For a complex graph like the one you've shown here, you will need to "Bake" the resulting pattern to a simple UV texture image. The process is a bit complex but well worth learning, in my opinion. There are various tutorials online, including a YouTube video on baking fractal noise into glTF that I put together last year with a coworker.

  1. Lots of "bloom" is shown in your Blender screenshot.

Bloom is what causes that glowing effect around the model, where the bright parts spill over into neighboring pixels. I've long wanted a setting in glTF to enable bloom, but there is some opposition. Many people use glTF for models, not whole scenes, and bloom is more of a scene or camera setting. Still, if you have control over the viewer (such as access to the JavaScript driving a ThreeJS visualization, or similar), there may be an option in the rendering engine to enable bloom.

  1. Emissive strength

This one is a little problematic, but will get fixed someday hopefully soon. The core glTF 2.0 format has a clamp on emission, it can't go higher than 1.0. This is believed to have been just an oversight, but the clamp is in the official JSON schema where it can't just be ignored. Still, this can be fixed at the format level by introducing a glTF extension for "emissive strength," and at least one draft of that has appeared on GitHub recently. So there's hope this will get fixed.

Even so, emissive strength by itself won't give you the glow effect, you need a strong emission paired with a bloom effect. So for now, you would need to load the model into an engine where you have control of a few things, crank up the emission strength and turn on bloom.

If you get strong emission and bloom going, with a baked texture showing the pattern above, you should be in business.

$\endgroup$
2
  • $\begingroup$ is there a way to animate this kind of effect using baked textures? I'm trying to solve this problem in this link blender.stackexchange.com/questions/228540/… but after that I need to export it to a gltf/glb file. Is it possible ? In my case I want to animate the effect that he was supposed to bake. I don't know if it is clear what are my issues $\endgroup$ Commented Jun 24, 2021 at 18:49
  • $\begingroup$ Currently, the glTF 2.0 core format does not support animated textures. But, several image formats have been added by way of extensions (such as webp, KTX2), and it's possible that an animated texture extension could become available someday. $\endgroup$
    – emackey
    Commented Nov 10, 2021 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .