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.

DarkBASIC Professional Discussion / SET CAMERA TO IMAGE

Author
Message
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 1st Nov 2002 15:35
Hi!

Anyone familiar with this command. I get the error "run time error 504 - cannot grab image due to an illegal area at line 24" OR "..exe has generated errors..." trying to use the command SET CAMERA TO IMAGE.

Tomas
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 1st Nov 2002 15:50
..continue to previous message

Yes, the lines are simply:

set display mode 1024,768,16
rem get image 1,0,0,1024,768
make camera 1
set camera to image 1,1,1024,768

...and that brings the error. Something frong with this "piece of software"?

Tomas

Thade!
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: Austria
Posted: 1st Nov 2002 15:50
Hi Tomas
without at least part of the code so that one can reproduce the error its quite impossible to say anything about it, apart from guesses that will not help you.
Maybe a clearvoyant can see the illegal area at your line 24 - - I tried - I can't.
Honest - paste a code snippet that shows the error - and most users will take a look - and some will know how to help.
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 1st Nov 2002 15:52
Thanks, Blackspider - just in two seconds before your comment I threw the code there hehehe..

Thade!
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: Austria
Posted: 1st Nov 2002 15:52
LOL - Tomas you posted the second message while I wrote my stuff - which is now not needed anymore
Thade!
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: Austria
Posted: 1st Nov 2002 16:08
I'd say the command awaits an image that is displayed on the screen where it can set the camera to - you grabbed it, but did not display it anywhere. ???
Thade!
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: Austria
Posted: 1st Nov 2002 16:12
A pity that one cannot edit his own post after its send as in other forums
Additional to the above - I mean displayed in your world or somewhere the camera has access to.
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 1st Nov 2002 16:22
Hi,

Tried with the "paste image" command but didnĀ“t help. Other was to display/ activate the image?

Tomas

Draez
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location:
Posted: 2nd Nov 2002 00:08
shouldnt this line be un-remmed?

rem get image 1,0,0,1024,768

otherwise how does it know what image you are talking about?

jenkmeister
21
Years of Service
User Offline
Joined: 1st Nov 2002
Location:
Posted: 2nd Nov 2002 03:18
You need to use an image size that is square and is a power of 2 (at least that's worked for me 256x256 or 512x512

Dreamora
21
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 6th Nov 2002 11:53
an if you have 1024x768 resolution you can't get an image 0,0,1024,768 because the screen only reaches 1023,767!!! (it's width is 1024,768 and it starts at 0)

Lee Bamber
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location:
Posted: 15th Nov 2002 03:18
Indeedy. You are rendering to a texture so most cards require a power of two square texture such as 256x256 or 1024x1024. Other sizes give the command a headache though I have no ruled out support for any size. It's just a little messy when you render to a portion of a texture rather than the whole thing. Texturing with your new rendered image becomes very 'interesting'.

Login to post a reply

Server time is: 2024-03-28 13:31:42
Your offset time is: 2024-03-28 13:31:42