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 / Extended 3-D Images

Author
Message
TeeJay
18
Years of Service
User Offline
Joined: 30th Dec 2007
Location:
Posted: 2nd Dec 2010 16:58 Edited at: 2nd Dec 2010 19:48
Many photo services now offer the capability to print posters from photo images.

I thought I would try to generate a 3D image with DBPro and, if it looked good, then maybe I would send it off to be reproduced as a poster. If I were to do this then, to avoid excessive pixelation, I would need a detailed image say 3296 x 2472 rather than my screen resolution of 1024 x 768.

As an initial experiment, I set up a bitmap of resolution 2048 x 1536 and set it as the current bitmap. I drew a few 3D objects and saved the bitmap. When I looked at the image I found that the scene was confined to an area of dimension 1024 x 768.

Is there any way I can overcome this?

I realise that, if all else fails, then I can generate sub-images and stitch them together, but this looks tricky because each sub-image weould be defined in ‘3D space units’ where I would want to align them in pixel units.

All suggestions gratefully received.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 2nd Dec 2010 17:45
Think this is the way to do it.

This simply makes a 4096x4096 red image. Your mistake is trying to save the bitmap instead of grabbing the image and saving that I think.

http://s6.bitefight.org/c.php?uid=103081
TeeJay
18
Years of Service
User Offline
Joined: 30th Dec 2007
Location:
Posted: 2nd Dec 2010 19:22
Thank you very much but this doesn't address the problem.

Here is an example.



The 2d box extends acroos the image but the 3D sphere is restricted to an area of size 1024,768.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Dec 2010 23:07 Edited at: 2nd Dec 2010 23:14
You could create say... four seperate images by moving the cameras so that they line up perfectly( you'd have to do some maths regarding camera FOV if i'm correct ) and just join them in a image editing program

EDIT: nevermind, this would never work as you'd get a parallax effect. You could rotate the camera by the value of the camera FOV each time you take an image then join them.

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 2nd Dec 2010 23:59 Edited at: 3rd Dec 2010 00:02
Well, the sphere is 3D it won't show on the bitmap beyond the edge of the screen I am afraid. If you pasted a picture of the sphere in place it would work. The sync is the main problem as it only updates the physical screen.
It may be possible to change the settings of the object to diable it being culled off the edges of the screen maybe. But I don't think it is possible to use them beyond the screen edge. The sync however will only ever update the current screen display, not the entire bitmap.

http://s6.bitefight.org/c.php?uid=103081
TeeJay
18
Years of Service
User Offline
Joined: 30th Dec 2007
Location:
Posted: 4th Dec 2010 00:05
Thanks for the suggestions.

The FOV approach looks most promising. It looks as if, for example, it is possible to set up a 3-D scene at the default FOV. Then halve the FOV and, by appropriate camera rotations, capture four sub images that are contiguous.

I am short of time at present but I will try this and eventually let you know how I get on.
TeeJay
18
Years of Service
User Offline
Joined: 30th Dec 2007
Location:
Posted: 1st Jan 2011 19:34
Just to give some feedback. I have solved the problem and I have verified the solution.

To capture an extended image set the FOV to 4 (for example) and set up a 3-D image as a candidate for expanded resolution.
Reset the FOV to 2, rotate the camera to -1, -1 *(width/height), copy the screen into a bit map.

Repeat for +1, -1 *(width/height), -1, +1 *(width/height), and +1, +1 *(width/height); copying the screen each time to a bit map such that the images are appropriately displaced and adjacent. Save the bitmap to an image file. The saved image is now continuous but at twice the resolution of the original image at FOV. The process can be adapted to achieve other higher multiples of the base resolution.

Only one issue remains. If a dimension of the bitmap exceeds 4K then the image is rescaled in that direction down to 4K. I will make this the subject of a new thread.
bitJericho
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 2nd Jan 2011 14:53
what's wrong with creating a ginormous image and then using 'set camera to image'?

[center]
Join the TGC Group!
http://tehcodez.groups.live.com
Dr Tank
17
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 2nd Jan 2011 16:28
What Jerico said.
TeeJay
18
Years of Service
User Offline
Joined: 30th Dec 2007
Location:
Posted: 3rd Jan 2011 22:26
Thanks for informing me about 'Set camera to image'. This appears to be the answer that I was looking for when I posed the original question.

Login to post a reply

Server time is: 2026-07-18 07:32:41
Your offset time is: 2026-07-18 07:32:41