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.

Newcomers DBPro Corner / Background image in 3D environment

Author
Message
Devonps
15
Years of Service
User Offline
Joined: 5th Nov 2009
Location: Nottingham
Posted: 22nd Feb 2010 20:15
Hi,

How can I paste an image (.png or .jpg) onto the background of a 3D environment?

I want to have my 3D models displayed in front of the background.

Regards,

Steve.

Marriage is a circle of rings....
Engagement ring, Wedding ring, Suffering!
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 22nd Feb 2010 20:28
There is a command called TEXTURE BACKDROP. It was taken out of DBPro, but then put back in. If you have the latest version of DBPro, it will do what you want.

Devonps
15
Years of Service
User Offline
Joined: 5th Nov 2009
Location: Nottingham
Posted: 23rd Feb 2010 08:28
I used

the command

and then

and


and both times I got the error message stating that the command was obsolete.

So I checked the version of the DBP compiler, from the editor help menu, and it stated I had version 1.07.

If this is the latest version, any ideas why the command wouldn't work?

Marriage is a circle of rings....
Engagement ring, Wedding ring, Suffering!
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Feb 2010 12:17
I would look for the update page and download and run 7.4 update, would then read like this 1.074.

Dark Physics makes any hot drink go cold.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Feb 2010 12:48
You should also avoid using hardcoded paths to images like:

load image "e:\...\media\background2.jpg",100

If you compile a program and give a copy to someone else, they are highly unlikely to have that directory on their system and the program won't work.

Instead, create a Media folder in the same directory as you dba and dbpro files and copy all the required images into it. In your program, you would then use:

load image "Media\background2.jpg",100

When your program is finished, you can then use Include Media in the Project Manager to include all the files in your Media folder (Media\*.*), and they will all be compiled into a single exe file.

TDK

Devonps
15
Years of Service
User Offline
Joined: 5th Nov 2009
Location: Nottingham
Posted: 23rd Feb 2010 20:27
@HowDo - the upgrade worked a treat, thanks

@TDK - thanks for the advice, I'll update the code now.

Regards,

Steve.

Marriage is a circle of rings....
Engagement ring, Wedding ring, Suffering!

Login to post a reply

Server time is: 2024-11-23 20:12:51
Your offset time is: 2024-11-23 20:12:51