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.

Bug Reports / [6.7] Set Camera To Image bug when non squared size is used.

Author
Message
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 6th Apr 2008 17:55
When using non squared renders, it seems that the order of the Set Camera To Image commands changes the way that images are rendered. The first one always gives a bad result.

dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 6th Apr 2008 18:43
It's not so much the render targets having non-square sizes that's the issue, for instance you can have Set Camera To Image 1,1,160,140 and it will display, strange bug to say the least .

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Apr 2008 11:59 Edited at: 8th Apr 2008 12:12
What's the bug?

I get the same screen image in each case, i.e. a 160x120 image of the screen on the left and a 128x128 image of the same screen on the right.

Afterthought: just realised I still have U6.6b loaded after testing someone else's bug report. I'll post back when I've re-instated U6.7.

Edit Just re-installed U6.7 and I get the same result. I can't see anything wrong. What do you expect to see? And what do you get? No use just telling us it's wrong - tell us precisely what is wrong.
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 8th Apr 2008 13:42 Edited at: 8th Apr 2008 13:43
I've got an image of what is in memory at the texture address.



As Dark coder stated, the bug appears only with combination of specific sizes : 512*512 with 640*480 does not work, but 256² with 640*480 does, 160*120 with 128² does not and 160*140 with 128² does...

Could it be a graphic card problem ? I have a geforce 7600 GS.

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Apr 2008 20:50
Quote: "Could it be a graphic card problem ?"


Sounds possible. I'm using an nVidia GeForce 5200 FX.

Here's my screenshot - the others are similar, i.e. no problems.

I'll try again on my laptop and edit this post with the results.

Attachments

Login to view attachments
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 8th Apr 2008 21:37 Edited at: 9th Apr 2008 12:27
I get the same as Green Gandalf.

Nvidia GeForce 6200 (PNY Tech)

DBPro 6.6


dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 8th Apr 2008 23:11
It could just be because you didn't create the cameras in order, I knew at render time they had to be contiguous but I guess when created they need to be, else something like this happens?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Apr 2008 00:14
@Dark Coder

Quote: "It could just be because you didn't create the cameras in order, I knew at render time they had to be contiguous but I guess when created they need to be, else something like this happens?"


But he HAS created them in order - and at least two people don't get problems when running his code. What do you get when running the code with U6.7?
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 9th Apr 2008 00:54
I see, well I am very tired . And yes I get the same issue as the OP, though my output is just black, no fancy memory scramble.

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 15th Oct 2011 06:49
it seams after all the updateing in DBP
even at version 7.61 the problem is still there

If a thought is Just a thought ~ so whats the main thought ?
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 15th Oct 2011 07:40 Edited at: 15th Oct 2011 07:41
I too experience the problems (GeForce 9600GT), however when I use IanM's draw to image command with manual syncing it seems to work just fine.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th Oct 2011 14:21 Edited at: 15th Oct 2011 14:47
I now get the problem on my newer machine (GFX GeForce GTX 285) with U7.7RC7. I don't get the scrambled image though. In one incorrect case I get a black image (like Dark Coder) and in the other I get a static image.

So another bug is still with us.

Edit

Quote: "I'll try again on my laptop and edit this post with the results."


Better late than never I suppose.

The code works perfectly on my old laptop (using U77RC7 again) just as it did on my old desktop. Is this one of those obscure GFX card/OS issues?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 06:52
that example works perfectly

no scrambled image in left top corner

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 06:56
umm

after looking at this example

one of the examples in "Blitzwerks Terrain"
has the same scrambled image problem

If a thought is Just a thought ~ so whats the main thought ?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th Oct 2011 13:49
Quote: "no scrambled image in left top corner"


That's not the only possible error. Were the two images identical apart from scaling? They should be.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 18:09
the first one

Math89 - Posted: 6th Apr 2008 03:55

the example had the scrambled image

the second example posted
revenant chaos - Posted: 14th Oct 2011 17:40 Edited: 14th Oct 2011 17:41

this post had no scrambled image

I thought I had seen in one of the "Blitzwerks Terrain" examples
the same scrambled image for the camera

but nun of the example I looked at either in the full or demo
code I have had such so it must be in anther example I grabed
that has the problem

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 19:41
it took a bit of work but I finally found the example
with the camera that gets messed up

attached is the example so you can see what I am talking about

I think I understand why it happens

the camera is set to look at the water but when you
move the mouse to look at the sky it has no data to work with
to the image gets scrambled

If a thought is Just a thought ~ so whats the main thought ?

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th Oct 2011 13:04
Were the upper left and right images identical using Math89's original code?

As I said before, the symptoms of the bug vary.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 17th Oct 2011 13:26
yes they looked the same

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Oct 2011 01:52
thanks to some one posting about using to use

hitimer() instead of Perffreq() which is not in DBP 7.61
I was able to get the "BlitzwerksTerrainDemo"

demo working and I had to change

the up and down movement code to
" move camera (upkey()-downkey())*80.0 "

as the original line moved things way too fast

now I can use this example for my projects

If a thought is Just a thought ~ so whats the main thought ?
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 4th Apr 2012 05:13 Edited at: 4th Apr 2012 05:15
I feel kind of wierd linking to the same thread more than once today but I have a possible work around.

I created a method of using Set Camera To Image and getting transparent backgrounds and preserving all transparency of the in camera objects overlaying the background.
http://forum.thegamecreators.com/?m=forum_view&t=184514&b=1

I did not encounter your problem.
I did however notice non-square cameras take like 10 times longer then similarly sized square cameras to draw.

The work around:
I developed a method of using a square camera and cropping it to the desired proportions.
It was an optimization for me, it can be a work around for you. It's used in the Standard (non-shader) example listed at the top of the thread in the link above.

Hope it helps.

Login to post a reply

Server time is: 2024-03-29 09:51:22
Your offset time is: 2024-03-29 09:51:22