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$
13
  • $\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 2 days ago
  • $\begingroup$ @Chris i tried animating the alpha value but dont know why but the glb file shows the material same as with alpha as 1. I guess animating materials is not supported in glb $\endgroup$ Commented 2 days ago
  • 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 2 days ago
  • $\begingroup$ @GordonBrinkmann the question would be how to "how to hide objects while animating them" which I have written clearly above. I don't know why guys like you pop up every time in comments like bro if you don't have a answer get going. $\endgroup$ Commented 2 days ago
  • $\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 2 days ago

1 Answer 1

0
$\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$
3
  • $\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 2 days ago
  • $\begingroup$ Does non-animated transmission work ? $\endgroup$
    – Lutzi
    Commented 2 days ago
  • $\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 2 days ago

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