Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [bug] obscure bug with 2nd rendered camera and UV flip fail

Author
Message
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 20th May 2017 21:37 Edited at: 20th May 2017 21:41
You can see the problem in the video.
Look at the wall graphic in the corner compared to the wall graphic in the 2nd rendered camera - the image is flipped differently, even though it's looking at the same thing?

You can see the issue at about 18 secs in.

The 2nd camera is made with renderToImage() + Depth buffer.


Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 22nd May 2017 21:52
It's strange that it would only affect one object, I assume the wall sections are all separate objects. Is there anything different about it? Can you replicate it in a small example?
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 24th May 2017 01:32
Hi Paul,

yea, they are all separate objects, but some are flipped. I'm assuming that the flipped object is not considered in the renderToImage() call. I added an Update3D() call to no avail. The camera function is:



The wall (WallFrontID) is made thus, so nothing unusual


nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 27th May 2017 02:56
It seems that flipped objects aren't observed during the render to image process.
I can't see what else I need to call other than Update3D() and RenderToImage(). Everything else appears correct.

Is there another call needed to deal with geometry changes?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jun 2017 14:28
I've not seen this happen before, and I'm not sure what could be causing it. I would need to see a runnable example of it happening so I can trace the cause.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 5th Jun 2017 18:47
It's only a test for now. If I decide to use this idea later, I'll set up a test program for it.
I might try a few other things, like not cloning it or scaling it / swap it with another object etc.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jul 2017 01:04
Time to come clean with this one

I figured it out. The camera is looking at the other side of the flipped transparent image when it's viewed from the model. As it's transparent AND flipped, the front wall looks right when it's flipped + no-flipped from outside, but inside it's wrong.

Login to post a reply

Server time is: 2024-03-29 12:20:10
Your offset time is: 2024-03-29 12:20:10