Forum

Reflection / cubemap bug?

objects which are moving closer to the object with the connected realtime cubemap becoming bigger and bigger(at the reflection) and then they are not reflected anymore. anyone know why?

testpatch.v4p (23.0 kB)

bump… no text …

that sounds like the expected behaviour as a cubemap is built by rendering six orthagonal cameras from one point. so if some objects get to close to those 6 virtual cameras they get clipped which sounds right to me…

thank you for the info,
i didnt find a pin to change the near-plane of this virtual cameras, is this possible?

that is indeed an interesting question :)

maybe our beloved devvvvs can shed some light?

have you checked the config pins of DX9Texture (EX9.Texture)?

ok joreg, i remember this pins - but the near-plane input doesnt change this (incorrect?) behaviour described above. the reflected objects are clipping earlier then expected.

if the virtual cameras are orthogonal - why are the objects so big when close to the virtual camera?

i don’t really get the patch/problem. maybe you can describe your actual goal a bit…

in the attached pictures im trying to describe the look of close reflected objects.(1st pic)

have you tried \girlpower( mirror ) ?

ok thank you for the hint, will check this

anyway, still the question why the objects are scaling bigger…

the mirror-patch is ok but for the whole cube i would need 6 textures? is there a way to have a orthogonal cubemap

you can patch your own cubemap with some MultiViewport and corresponding view- and projectiontransforms…

then you could make your near- and farplanes as desired, but might be a bit slower and i think you can’t use it like a real cubemap.

or don’t you need a whole cubemap but only some mirrorings in a plane? then >> girlpower/mirror

hrovac, i don’t understand?! your sketch demonstrated that you need a mirror, so i pointed you to the mirror. but now you want a box that mirrors to all sides?

the mirror is fine - but i would like to have a cubemap so i can use it in a shader…

my sketches and testpatch are simplified so i didnt scribble/patch the rotation of the object nor i used the original (more complex) 3d-object.

anyway, i will tweak my expectations here and improvise with mirrors there and it will work.

I have run to the same problem as hrovac.

Try the patch that I have uploaded and try to change the mash and move things around. When I use Sphere or Teapot it looks good but when I use Box it seems like the texture applied to it is bigger than it should be, compare the size of the chess plane and it’s reflection size in the Box.

I have tried mirror patch but that won’t help me in my case.

Kubus.v4p (44.6 kB)