Need help with Glass in BGE

(Slithre) #1

Ok this is with cycles render and pretty much what I want my chess pieces to look like

this is what I keep coming up with I think its a reflection problem but might be wrong can someone help me every time I look at a glass tutorial its more of a transparent look and doesn’t work to good with these chess pieces I appreciate any help anyone can offer

(JustinBarrett) #2

in upbge you can use an inverse reflection to achieve this relatively easily…if you are using upbge here is a pretty easy tutorial.

in BGE you will probably need to do some witchcraft :slight_smile: I use a texture overlay and set the mapping type to reflection. It generally respects bump and overall shape of the geometry.

under texture tab > add a texture that resembles your back ground(I shrink and blur them) > under mapping click the button next to coordinates > select ‘reflection’

there are many other ways to do this…this is just the way I am doing it atm. because it is fast, looks ok(not great) and gets the job done.

(sdfgeoff) #3

Glass is a very hard material from a rasterizing point of view, and to my knowledge, there is no good simulation of it in real-time yet. Typically the approach is to sample the image-on-screen based on the reflected surface normals.

Anyway, here are some materials that use a spheremap to fake reflection. They’re not the best, but they are better than just turning down the opacity.

Blend File:
Reflect.blend (1.04 MB)

(Mirror|rorriM) #4

Not sure but I think this is what you’re looking for: Refraction.blend (1.14 MB)

Here’s the reference: Credits to koala_boy166 and the script maker. I just unwrapped the mesh and experimented with material settings to produce a more refractive look.

You might have to play with the way you unwrap your chess pieces/other methods to get your desired look. You should also set the mapping coordinates to ‘Reflection’ for the refractive texture.

(edderkop) #5

you could fake it using a matcap.

(Slithre) #6

Thank you everyone I will start testing it out and get back to you guys

(JustinBarrett) #7

second thought a really cheap way is alpha shader + bump map + reflection map(same as I said before) but adding just a little bump mapping very subtly really sells it. and it is cheap on rendering…well cheaper than real refractions/reflections

(Leanardoe) #8

Did you create the node material for that? It’s pretty impressive.

(Hdhunk) #9

I think some other easy way to do this could be using alpha transparency or depth transparency with some matcap texture or glossy/metal/shiny texture together.

sdfgeoff one is way cooler I think.

I think by seeing the nodes is something like this, it have much more control and even can add more effects like the one from sdfgeoff

(Hdhunk) #10

Take a look at this tutorial too, it’s very interesting. I remembered it right now.

he kind of create a glsl glass material through nodes

(Slithre) #11

Thank you to everyone that helped this is what I needed easy to change colors and everything
Thank you