0
$\begingroup$

I am creating a chef model which has a knife in her hand to cut something, this is one of the animations she has. The other animations she has are walking, talking etc, where she cant have a knife in her hand.

I gave all these animations to her in the same blender file using dope sheet - action editor and gave different names to all these actions. As I want to export this model into a glb file and then import it into my 3D web environment. I do not want to render the animations.

So how is it possible that in the same glb file I can give animations where knife is in the models hand and also not in her hand in some other animations.

I tried animating the viewport display icon but all it does is makes the object invisible from the viewport and this cant be scene when I export it into a glb file.

$\endgroup$
12
  • $\begingroup$ since gltf can export material, why don't you just animate the alpha value of the material (0 -> invisible, 1 -> visible)? $\endgroup$
    – Chris
    Commented Jul 3 at 7:15
  • 1
    $\begingroup$ @HarshJoshi I'm 99% sure animating materials is not supported in glb, as in many other export formats as well. For the most part only transformation animations are supported, like translation, rotation, scaling. The question would be, if there is a way to animate the material in whatever software you want to use this character to do it there. But that's no question for this site. $\endgroup$ Commented Jul 3 at 10:31
  • 1
    $\begingroup$ We pop up in comments because we would write an answer if we had one, not a comment. No need to get snippy - some people can draw information or ideas from comments even if they are not full-fledged answers. You guessed animating materials is not supported in glb, I tried to sort of confirm since I know at least from other export formats that exactly this is the problem. And for the same reason you cannot animate the Alpha, you cannot animate the Transmission as the answer suggests (or the visibility as you already know). That's why I said you should check the target software for a solution. $\endgroup$ Commented Jul 3 at 10:50
  • 2
    $\begingroup$ Simply scale the knife to 0.0.0. and move it inside the character where needed. $\endgroup$ Commented Jul 3 at 12:48
  • 1
    $\begingroup$ For what it's worth, animated material properties and animated visibility are in development on the glTF specification side, but not yet available as exports from Blender (as of July 2024, and expect the situation to change for the better at some point!) In the meantime, animating a scale-to-zero is the only workable option. $\endgroup$
    – emackey
    Commented Jul 5 at 2:13

1 Answer 1

-2
$\begingroup$

According to the Blender documentation on this page :

The core material system in glTF supports a metal/rough PBR workflow [...] Some additional material properties or types of materials can be expressed using glTF extensions.

Then there is a chapter on transmission stating :

Transmission is intended to represent physical materials that are solid but allow non-specularly-reflected light to transmit through the material, like glass.

So I'm guessing you could use the transmission to hide your object. I didn't see any mention of an alpha channel in gltf files.

I have no idea what gltf is, I'm just reading the documentation.

$\endgroup$
4
  • $\begingroup$ I appreciate your answer man but I tried animating the transmission but nothing happens it like the same situation where I tried to animate alpha. $\endgroup$ Commented Jul 3 at 10:41
  • $\begingroup$ Does non-animated transmission work ? $\endgroup$
    – Lutzi
    Commented Jul 3 at 10:58
  • $\begingroup$ no, no matter what transmission value I put in blender but in the gltf file it shows the same result and the object is non hidden. $\endgroup$ Commented Jul 3 at 12:06
  • 1
    $\begingroup$ 100% transmission will still show a glossy glass shell, I don't think that's what you want here. glTF does have alpha. But animating material properties like alpha or transmission in an export is (as of July 2024) still in progress. Meanwhile it is necessary to keyframe the scale to 0 to hide an object, as @emackey suggests in the comment thread on the OP. $\endgroup$ Commented Jul 19 at 21:37

You must log in to answer this question.

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