Achieve same rendering results like Sketchfab?

I think this topic was already discussed here some times ago;

how does sketchfab achieve this rendering results.

For example take this diamond; you can grab the GLB file and load it in your scene.

What kind of post processing is done there? Bloom and what else?

don’t get me wrong sketchfab is unmatched but i think as far as diamonds go these are on the cheaper end, you can do better. the only postpro you might want is bloom, the rest is physical raycasting done in the material itself.

if you’re using react + three all you have to do is type <MeshRefractionMaterial>, otherwise you find the THREE.ShaderMaterial here GitHub - pmndrs/drei: 🥉 useful helpers for react-three-fiber

it originally came from here diamond/main.js at cb8a239e14ad4e048bfd2bd77486af1dc067a050 · N8python/diamond · GitHub but n8 added some more things to the drei material, you can consider it newer.

1 Like

You could get even prettier, i’ve seen an implementation for a more simple one that looks like the sketchfab one too, however any of such effect is not exactly cheap in terms of performance. The shadertoy also isn’t really a reference to test performance since it also raymarches the scene and diamonds, the post effect is a additional pass, and there are cheaper implementations.