2
$\begingroup$

I am trying to create a stylized bottle of potion.
and I need to export it to glTF (.gltf/.glb)
exactly like this:
https://sketchfab.com/3d-models/stylized-low-poly-potions-pack-01-c53614906d934b0b99f5540240e0b9d7

Stylized Potion

How do I create the transparency effect of the bottle? And then export it to .glb
I tried the following method but, I am not able to export it, Magic Transparency part (0:00-0:36):
https://www.youtube.com/watch?v=n9ZNGVvMOSQ

Magic Transparancy

Thanks in advance!

$\endgroup$

1 Answer 1

2
$\begingroup$

The Magic Transparency method is correct: the bottle uses backface culling + flipped normals to make the side facing towards you invisible.

To make exporting to glTF work, you just need to make sure the material you use follows one of the patterns the exporter supports (see the manual).

Here's the material I used. The node setup is recognized by the exporter as an unlit vertex color material. To enable backface culling, turn on the Backface Culling option in the sidebar. (The exporter understands that option; it doesn't understand the Geometry->Backfacing trick in your video.)

Normally this would cull the polygons that are facing away from you, but if you flip the normals, it will cull the ones facing towards you instead so that you can see the contents through the bottle.

To flip normals, go to edit mode and with the bottle's faces selected, pick Mesh > Normals > Flip.

That's it, you can export now.

Here's the .glb I exported: https://files.catbox.moe/z563qh.glb. You can import it to see how it works if you want.

The same trick works for outlines, just use a pure black "bottle" (a black RGB node instead of a Color Attribute node should work).

$\endgroup$
1
  • $\begingroup$ Now I get it!!! The node used in the video for backface culling is not exported, as the glTF exporter doesn't look anything like that. Thanks! $\endgroup$
    – TanX-009
    Commented Aug 29, 2022 at 5:11

You must log in to answer this question.

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