Refraction and reflection (gemstones)


(Bartosh44) #1

Is it possible to implement that shader into Sketchfab: link?

What do you think about it? Will be something similair in nrear future in Sketchfab? I know it`s heavy for hardware. Maybe some simplified version. Sketchfab is ideal for presenting jewellry but without refraction pure gold is boring without gems :wink:


(Shaderbytes) #2

While it is not accurate you can kind of get some good gem looking results using sketchfab materials in their current form. I actually had a go at this a while ago while discussing it with other sketchfab masters group,, here have a a look :slight_smile:


(Bartosh44) #3

Thanks. Where can I find disscussion about it? I ca`t find through search.


(Shaderbytes) #4

The sketchfab masters group has its own private slack page , there are about 25 members and we discuss things daily, this was quite some time ago ,several months I think. So it is not something you can find via a search here. Would you like to know more about how I did the model above?


(Bartosh44) #5

Yes, I`m curious about that gem look. What about dispersion? It would be ideal to mask bloom effect only for gem (without ring).


(Shaderbytes) #6

bloom is calculated in screenspace so the only way to limit it to the gem is to make sure you set up a scene where the gem is literally the most brightest material and then use a low threshold. Not so easy to do and not always possible either.


(Shaderbytes) #8

All post filters are done in screenspace , chromatic aberration is a post filter. Even if you had access to shader logic the depth buffer is the only useful information to screenspace effects so you still would not be able to do any per object exclusion.

Yes I used internal geometry , but I also used two materials , outer and inner to control the transparencies and blending differently. I used the additive mode on the inner geometry. I also used the metal sliders on full for this effect as it is the only way to boost the reflection strength when using transparency. That is a hack of coarse... but it gave fairly acceptable results.


(Shaderbytes) #9

im not sure why you changed the entire post above my last response , it seems completely out of context , did you perhaps edit the post thinking it was part of some other thread you are currently engaging in as well?


(Bartosh44) #10

That was my bad. I've tried to do this: link. Now I'm trying to reproduce it inside Sketchfab. There is few diamond meshes inside (different sizes). One per RGB channels. If diffrences in size are bigger than pseudo dispersion look is bigger but on edges you can see visible (ugly layers). That`s why I scaled it with only tiny values.


(Bartosh44) #11

(Shaderbytes) #12

Glad to see you got something up and running, It looks great but a tad milky :slight_smile: