I want to render thin bumpy glass with refraction. But it offsets too much(look at the black frame of the glass). Looks thick.
How to do thin glass refraction properly? Or is it possible to exclude object(e.g. the black frame) from refraction?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.
Sign up to join this communityI would look into the Refraction Depth Bias
parameter of the material you are using. It is mentioned in the Unreal Engine documentation.
I would suggest parameterizing several of the pins of bumpyGlass, especially those that are currently fed by constants, instantiate the material to the shower door, and play with the values in real time. I wonder if lowering the value for metalness would do the trick.
This is how: In the material editor, cut the connection to the constant. Right-click on the pin and promote the pin to parameter. Right-click on the mat in the content browser to create an instance. Drag the instance to the shower door. Double-click the instance in content browser to access the sliders. I created an eyeball in Unreal, and jockeying the sliders while observing in real time was the only sensible way to arrive at reasonable values.
You definitely can apply a different mat to the door frame with a seperate (or disabled) refraction, and, since it's black, you could exclude it from being affected by Unreal's lighting engine entirely (left panel in Material Editor). I can tell you how to break a single model into regions that will take seperate materials in Blender and port to Unreal, but unfortunately I don't know how to do this solely in Unreal.
Of course, you can scale the door to make it thinner, but I don't think that will give you the desired results.
This is my first ever answer on Stack Exchange. If I have suggested the obvious (or the useless), it was not my intent.