Hi all, I’m trying to render a glass. I wanted to make it have transparent sides and be refractive from all sides. Though there is this cut-out pie shape in the base when looking through the side.
I’d appreciate some pointers on the topic I should read more to achieve desired effect.
It’s a huuge topic.
There really isn’t a single technique to get proper transparent materials except for raytracing which is super expensive.
Do you have side:THREE.DoubleSide on your material?
You could try using MeshPhysicalMaterial.. it can do proper refraction but is also costlier to render.
Hi @andyg901 ,
Maybe this link helps:
Based on this @prisoner849 work, I did this one:
And I got satisfied with the result.
I made an animation once of a model stirling engine featuring a glass displacement cylinder. The glass properties include two-sided reflections, transparency and transparency falloff, if I remember correctly:
The geometry assets were modelled in Blender, exported to glb and displayed in my Three.js based interactive 3D viewer: "Laura" virtuell " Play with it to get a feel of the transparency falloff as you rotate the view.
The material properties of the glass cylinder were also defined within Blender and “came along” with the glb File, so I can’t give the literal Material properties as would’ve been defined in Three.js. Seems like there was/is some shader magic involved, of which I can’t give any further details, sorry!
The material properties of the glass cylinder were modeled in Blender following this video-tutorial by Ryan King Art: https://www.youtube.com/watch?v=JYyUMMboZFk
I’ll leave the translation between the Blender settings into the glb, and from there into Three.js to more knowledgeable people than I am.
For reference, you can use my original Blender file from which the glb export was created:
assembly.blend (5.2 MB)
Thank you all for answers. I’ll study it during the weekend 