Realtime Mirror Issues

I`m having a little trouble with realtime reflections that is getting me frustated with
I already downloaded every single mirror blend file around and none of em worked properly. On the plane wich was suposed to reflect all that I got was a shadeless white screen. I think the problem is with my computer or something… does someone know the solution or could help me?

Hello, Daniel. Welcome to the forums. What kind of graphics card do you have? Is the 3D view textured? Also, what mode are you in - SingleTexture, Multitexture, or GLSL? If you have a console, are there any errors present?

Hello, Thank you =]
My Graphic card is a Geforce GTX 460M. I’m using GLSL shader, textured. Since I packed the external files into the blend file I had no console, but I don’t remember any error being displayed.
I triyed at another computer and the same thing happened, but instead of a shadless blank, it was a totally black screen. But this computer not even had a GPU.
Idk, I also think that it may be a script problem, and I know nothing about Python and stuff…
If you have some updated working on 2.6 script, or even a blend file, on wich I could test again. I think it would help.
Once again, thank you.

I’ve been having trouble with this, too, and it turns out it’s a bug in 2.62. I understand a fix has submitted for the next release. As for right now, if you don’t want to switch back to 2.61, there is a workaround: change the sensor that the python script is attached to from an ‘Always’ sensor to a ‘Delay’ sensor with a Delay of 1.

Well Galan I tryed that but… nope, nothing, it not even changed the texture that shoud be replaced by the reflections when I do that. But thanks anyway.
And Solar Lune, when I click on run script, it says on the console that the module bge doesn’t exists.
Actually it says:
File"C:\User[…]Mirror.py", line 16 in
ImportError: No module named bge

Well as you may know, in the mirror.py the line 16 is:
import bge

Is that the bug Galan says, or is something wrong about the script?

Hey Galan I should say Thank You Very Much!!
I did switch back to 2.61 and everything gone smooth xD
It’s enough for my little trouble here. Thank you dude =D

Okay, another issue, that you may help me xD
The mirror is working fine by now, but it doesn’t display the sky. I think that it happens because it’s too far from the mirror. Is there any controller of the distance that I can setup?

If you want to increase the distance of the mirror effect you can use ImageMirror.clip();If you’re using the script from tutorialsforblender3d.com, this would be mirror.source.clip(). Assuming you’re using a skybox, that should work. You can get some other functions for ImageMirror from the full API, as well.

As for the ‘Delay’ trick not working, I didn’t realize that switching sensors disables pulse mode, so you may have to re-enable True pulsing. Also, I believe the error you were getting was from running it using the ‘Run Script’ button. Game engine scripts can only be run from within the game engine itself; The ‘Run Script’ button only works for non-game engine scripts. Confusing, I know.

Well, now that you mentioned the true trigger, yeah that worked =]
About the mirror.source.clip()… err… where should I put it? xD
I mean, on which line, and how exactly xD
I’m sorry, but unfortunately I’m really noob (by now) about programmation…
And yes, I’m using the tutorialsforblender3d.com script

I solved it by reducing the skybox… but it isn’t all that good…
But the biggest problem I’m having now is that when I export it as a runtime I get this message error:

“Fatal Python error: Py_Initialize: unable to load the file system code
LookupError: no codec search functions registeded: can`t find encoding”

By the way, I’m also using a videotexture for a Video Clip on the TV, by “encoding” i think that it may be related to the video…

And once again, thank you Galan! You’re a life saver xD

Hello DanielJunior.
I’ve had the same problem. If you put mirror.source.clip = (100.01) the line under mirror.source = bge.texture.ImageMirror(scene, cam, obj, matID)
The number 100.01 is the clip, it needs to be a float, any number that has a decimal ie. 1000.02 199.99 etc. make sure it is between .01 and 5000.
As for your other problem no idea
Cheers

Yep! That worked, but it had to be in the last line. when I tried under the mirror.source[…] didn`t worked. I think it was because it was parented to an ‘else’ command.

Thank you Syrak, you helped me a lot :smiley: