Mirror texture is rendered with distortions.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Andrey01
Posts: 62
Joined: Mon Jul 27, 2020 9:08 pm

Mirror texture is rendered with distortions.

Post by Andrey01 »

I am trying to render a round-shaped mirror with using a mesh made in Blender as a geometry. However, the mirror render its image askew. I created two materials in Blender, the first is assigned to the mirror frame, the second is directly to the mirror glass surface and set two textures for each of those materials. That's how it looks like in the program:

Image

But if I create the irrlicht cube scene node, it renders its mirror image fine without those visual distortions:

Image

It uses the only material with the only texture - render target.

Does anybody have ideas why in the first case does the mirror image render itself so skew, but in the second one does it render fine?
CuteAlien
Admin
Posts: 9843
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Mirror texture is rendered with distortions.

Post by CuteAlien »

What do the uv's of the mirror look like in Blender? Did you try putting a texture on it inside Blender?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Andrey01
Posts: 62
Joined: Mon Jul 27, 2020 9:08 pm

Re: Mirror texture is rendered with distortions.

Post by Andrey01 »

I tried now and the texture of wood that I laid on the mirror frame, in Blender looks like also skew:
Image

How the texture looks like actually:
Image
CuteAlien
Admin
Posts: 9843
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Mirror texture is rendered with distortions.

Post by CuteAlien »

So needs other uv mapping. In Blender go to UV Editing - then do UV - unwrap. Try the options there which works best
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Andrey01
Posts: 62
Joined: Mon Jul 27, 2020 9:08 pm

Re: Mirror texture is rendered with distortions.

Post by Andrey01 »

Thanks! I noticed the UV of the mirror surface was squashed into a line and I fixed that by just adding seams in necessary places and re-unwrapping it.
Post Reply