Reflection probe and arc camera

HI,
I m struggling to achieve fixed reflection of PBR material from object. but my findings are.

Here, you can see in while using a free camera reflection is in same place

free camera object reflection : https://playground.babylonjs.com/#FEEK7G#458

here, you can see using arc camera the reflection moving with camera rotation
arc camera object reflection : https://playground.babylonjs.com/#FEEK7G#459

i want to achieve reflection to be at same position using arc camera like achieved in free camera.

can anyone plz help. thanks

@sebavan - it feels like one of them is not working as expected?

Looks the same to me assuming the same position ?


What I am referring to is to the behavior when the camera’s position changes, which is exactly what the OP is asking - one camera’s reflection behaves differently that the other one when the camera changes its position

I can t see it happening let me ping you offline :slight_smile:

Discussed offline! :slight_smile:

@amark, would you be able to explain what the actual issue is, or what the expected behavior a little more than a single screenshot?
My assumption is that you mean that when you rotate the arc rotate camera the reflection doesn’t behave the same. This is the expected behavior, since you are only changing your position but not changing the target

With the arc camera, you will see the same behaviour if you do panning (right click mouse button + move mouse).

Hi,

thanks for quick response, i guess my explanation was not clear.

if you see i this room the shadow of commode in room is unchanged in different rotation of the camera, here i m using arc camera to rotate this cube.

the same way i m expecting the reflection of the object on floor must be same from any rotation angle. i understand that reflection changes with camera view angle, but here i don’t want reflection of object on floor to be change.

can you reproduce this on the playground, explaining with code? I am still not sure what exactly you are asking…

I guess I’ve understand what you said. In the first PG, reflection don’t change because the camera’s position don’t change while you move around using your mouse, but in the second PG, the arcrotatecamera’ position will be changed. It is the camera’ position that effects the reflection.
If you try to use arrow keys to move the camera in the first PG, you will also see the reflection change.
For what you want to achieve, maybe you can create a rtt to create a static texture for reflection and bake it to the diffuseTexture / albedoTexture.

1 Like

here, is the below image for reference to understand.

in this image, The reflection of chair, which is appeared because of light and surface glossiness, the position of reflection wont be change, if i move around it in real life.

the same thing i m looking for in program, but in current program while moving camera , the reflection position is kept changing because of behavior .

i agree, change of camera position reflection position will change too, Here that shouldn’t happen. this is what i m expecting.

you need to bake the reflection in the albedo or emissive texture. Or to use NME to customize the shader with a new texture for this.

by the way the chair example would look really weird looking at the table from the opposite corner.

HI, here all object are dynamically adding in to room, all 3d objects are in glb format, baking will be process again.

so nme might be the best fit to use a custom extra map.

i found mirror texture, can we achieve this on PBR material ?

ohhhhh it is what you meant by not moving from the beginning … sorry for the confusion !!!

Yes it would work if you place it in the reflectionTexture of a PBR Material. But it will not handle blurring from the roughness correctly unfortunately :frowning:

I really think this is something we should try to improve. Maybe @Evgeni_Popov have some ideas ?

It seems the roughness is taken into account? See:

However, it does more a dimming than a blurring…

There’s also the possibility to apply a custom blur pass if the effect from the roughness is not visible enough:

1 Like