Re: [osg-users] File Size Limit on OSG::Image?
Hi, On 23/12/10 04:19, Blake Mason wrote: If you just need to create a high resoultion rendering from of a single frame, you can modify the camera's projection matrix to capture many smaller segments, something like this: camera-setProjectionMatrix(projMat * osg::Matrix::scale(xSegments, ySegments, 1.0) * osg::Matrix::translate((float)(xSegments) - segmentX*2.0f - 1.0, (float)(ySegments) - segmentY*2.0f - 1.0, 0.0)); I got this idea from the osgcamera example. You can then save an image for each segment with osgDB::writeImageFile and then piece it together with another image editing program. there is also osgposter that does this for you. rgds jp On 2010-12-21 11:30, Geoff Rhodes wrote: Hi, I am currently working on creating a poster image from several images and the file size is pretty large. Currently the one I am trying to create is 65250 wide x 22500 pixels in height (Image needs to be large) Currently I am doing the following: Code: posterImage = new osg::Image; posterImage-allocateImage( (mHeight), (mWidth), 1, GL_RGBA, GL_UNSIGNED_BYTE ); Right now it is giving me an exception when trying to allocate that image. Is there a size limit on it, or am I doing something wrong? ... Thank you! Cheers, Geoff -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35036#35036 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] File Size Limit on OSG::Image?
If you just need to create a high resoultion rendering from of a single frame, you can modify the camera's projection matrix to capture many smaller segments, something like this: camera-setProjectionMatrix(projMat * osg::Matrix::scale(xSegments, ySegments, 1.0) * osg::Matrix::translate((float)(xSegments) - segmentX*2.0f - 1.0, (float)(ySegments) - segmentY*2.0f - 1.0, 0.0)); I got this idea from the osgcamera example. You can then save an image for each segment with osgDB::writeImageFile and then piece it together with another image editing program. On 2010-12-21 11:30, Geoff Rhodes wrote: Hi, I am currently working on creating a poster image from several images and the file size is pretty large. Currently the one I am trying to create is 65250 wide x 22500 pixels in height (Image needs to be large) Currently I am doing the following: Code: posterImage = new osg::Image; posterImage-allocateImage( (mHeight), (mWidth), 1, GL_RGBA, GL_UNSIGNED_BYTE ); Right now it is giving me an exception when trying to allocate that image. Is there a size limit on it, or am I doing something wrong? ... Thank you! Cheers, Geoff -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35036#35036 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] File Size Limit on OSG::Image?
Hi Geoff, I don't believe that OSG enforces any type of image size limit. I suspect that your computer is simply running out of memory trying to allocate that much contiguous memory (over 5 GB for that image). The good news is that OSG does have a framework in place that can help you handle and display large images. I don't know much about how it works, but I believe that osg::PagedLOD is involved somehow. Rob On 12/21/2010 11:30 AM, Geoff Rhodes wrote: Hi, I am currently working on creating a poster image from several images and the file size is pretty large. Currently the one I am trying to create is 65250 wide x 22500 pixels in height (Image needs to be large) Currently I am doing the following: Code: posterImage = new osg::Image; posterImage-allocateImage( (mHeight), (mWidth), 1, GL_RGBA, GL_UNSIGNED_BYTE ); Right now it is giving me an exception when trying to allocate that image. Is there a size limit on it, or am I doing something wrong? ... Thank you! Cheers, Geoff -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35036#35036 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME Cryptographic Signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] File Size Limit on OSG::Image?
Hi Geoff, I let you do the sums... 64250x22500x4=... Then work out how much memory do you have on your computer... the exception will be a memory exception... The OSG itself doesn't limit most OSG data structures including osg::Image, so it's very much a case of garbage in, garbage out. If you use a daft size then the underlying new that'll it'll be doing will throw an exception, it's up to your app to work out what to do about it. In your case... what to do about it, you haven't said why you'd want to create such an extreme size of osg::Image. For others to guide you in the right direction you'll need to explain what you are trying to achieve. Robert. On Tue, Dec 21, 2010 at 7:30 PM, Geoff Rhodes jimmyfloyd182e...@gmail.com wrote: Hi, I am currently working on creating a poster image from several images and the file size is pretty large. Currently the one I am trying to create is 65250 wide x 22500 pixels in height (Image needs to be large) Currently I am doing the following: Code: posterImage = new osg::Image; posterImage-allocateImage( (mHeight), (mWidth), 1, GL_RGBA, GL_UNSIGNED_BYTE ); Right now it is giving me an exception when trying to allocate that image. Is there a size limit on it, or am I doing something wrong? ... Thank you! Cheers, Geoff -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35036#35036 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] File Size Limit on OSG::Image?
Did you step into the code and see why is failing ? I don't have access to OSG right now to look at the source myself but your probably limited to the max size support by Openly and your graphics card and driver. Which is likely to be 4096x4096 and on many newer cards thats 8192x8192 Or if a limit is not set its then likely you simply cannot get a contiguous piece of memory at the size you're asking for from your OS, you're asking for around 5gb Either way you're going to struggle get a contiguous piece of memory at the size __ Gordon Tomlinson www.photographybyGordon.com www.gordontomlinson.com www.vis-sim.com Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival -Master Tambo Tetsura -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Geoff Rhodes Sent: Tuesday, December 21, 2010 7:31 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] File Size Limit on OSG::Image? Hi, I am currently working on creating a poster image from several images and the file size is pretty large. Currently the one I am trying to create is 65250 wide x 22500 pixels in height (Image needs to be large) Currently I am doing the following: Code: posterImage = new osg::Image; posterImage-allocateImage( (mHeight), (mWidth), 1, GL_RGBA, GL_UNSIGNED_BYTE ); Right now it is giving me an exception when trying to allocate that image. Is there a size limit on it, or am I doing something wrong? ... Thank you! Cheers, Geoff -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35036#35036 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] File Size Limit on OSG::Image?
Hi, Thanks for the response. For some reason I never thought about running out of memory, and I am only catching a general exception. I've been playing around with Photoshop, and just assumed that since it could open the image of that size, that it should be fine. Guess it uses a lot of the scratch disk for loading it since i just have an XP machine with 4gb. Looks like I'll have to try and locate a machine with more memory and Windows 7 then... ... Thank you! Cheers, Geoff -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35042#35042 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] File Size Limit on OSG::Image?
On 12/21/2010 12:54 PM, Geoff Rhodes wrote: Hi, Thanks for the response. For some reason I never thought about running out of memory, and I am only catching a general exception. I've been playing around with Photoshop, and just assumed that since it could open the image of that size, that it should be fine. Guess it uses a lot of the scratch disk for loading it since i just have an XP machine with 4gb. Looks like I'll have to try and locate a machine with more memory and Windows 7 then... I don't think that will be sufficient. Even if you were to find a machine with enough available (and contiguous) memory, your video card would never have enough memory to handle the whole image. You'll either need to work with a scaled down version of the image, or you'll need to use some sort of framework to page image data to/from disk. Rob ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org