Re: [osg-users] ATI cards and textures issues

2011-12-08 Thread J.P. Delport

Hi,

On 08/12/2011 16:19, lucie lemonnier wrote:

Hi,

I developed an application that loads textures dynamically.
I tested my application with a NVidia card and my application works fine but 
when I test my application on ATI card, the textures doesn't change.
Can you help me?
Does anyone have had this problem?


Many people have had many issues with poor ATI OpenGL support. You'll 
have to give some more info - OS, card, etc. Also see here:

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-July/052968.html

If on Windows, try turn off all windows 3D effects and such.

rgds
jp




Thank you!

Cheers,
lucie

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44292#44292





___
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.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trouble creating an osg::Image for use as a 2D texture

2011-12-08 Thread J.P. Delport

Hi,

On 08/12/2011 02:15, michael.a.bo...@l-3com.com wrote:

Hello,

I am trying to encode some position information in a Texture2D for
consumption by a vertex shader. I found a pretty good example in the OSG
examples directory of something similar, osgtexture1d and I have
successfully implemented the method used there. For your reference, the
relevant lines are below.

== osgtexture1d.cpp ==
osg::Image* image = new osg::Image;
int noPixels = 1024;
image->allocateImage(noPixels,1,1,GL_RGBA,GL_FLOAT);
image->setInternalTextureFormat(GL_RGBA);
osg::Vec4* dataPtr = (osg::Vec4*)image->data();

(A for loop populating the dataPtr follows, it uses the following syntax)
*dataPtr++ = color;
== end ==

I implemented my code as follows and it works.

unsigned int tex_size = 2048;
positionImage->allocateImage( 2, tex_size, 1, GL_RGBA, GL_FLOAT );
positionImage->setInternalTextureFormat(GL_RGBA32F_ARB);

osg::Vec4 *dataPtr = (osg::Vec4*)positionImage->data();
memset(dataPtr, 0, sizeof(osg::Vec4)*2*tex_size);
(a for loop follows, it uses the following syntax, it moves in
increments of two, basically angles get stored in the second column,
positions in the first)
dataPtr[ii] = positions[ii / 2]; // this is a vec4
dataPtr[ii + 1] = osg::Vec4( sin(angle), cos(angle), 0., 1.);


The problem arises when I want to instance more geometry than a single
1d map can reasonably hold, e.g. 10k. I decided to try and use a 1024 x
512 map to hold the data, with the capacity being 512*512 entities.
The implementation looks like this:

= begin =
const int tex_width = 1024; // [0] = position, angle [1] = sin, cos,
0.0, 1.0
const int tex_height = 512;
positionImage->allocateImage( tex_width, tex_height, 1, GL_RGBA, GL_FLOAT );
positionImage->setInternalTextureFormat(GL_RGBA);

unsigned char* dataPtr = (unsigned char*)positionImage->data();
//memset(dataPtr, 0, sizeof(osg::Vec4)*tex_width*tex_height);
int row_c = 0, col_c = 0;

for(unsigned int ii=0; ii

I'm not sure png supports float pixels. Try tiff.

rgds
jp




Thank you for your assistance.




___
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.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with deferred rendering

2011-12-08 Thread Micael Levesque
Hi,

Thanks for the quick answers :D

So the first thing I did was to setup two cull callbacks, the first one sets 
the camera inverse view matrix to a uniform for the geometry pass like this 
(camera->getRenderTargetCamera()->getInverseViewMatrix()) and is attached to 
the g-buffer camera. The second one sets a vec4 uniform for the deferred pass 
(the light position multiplied by the same camera inverse view matrix as 
before) and is set to the quad geometry. here's the modified shaders:

gbuffer_vert.glsl

Code:
varying vec4 pos;
varying vec3 n;

uniform mat4 uViewMatrixInverse;

void main(void)
{
mat4 modelMatrix = uViewMatrixInverse * gl_ModelViewMatrix;
mat3 modelMatrix3x3 = mat3(modelMatrix);

// world space
pos = modelMatrix * gl_Vertex;
n = normalize(modelMatrix3x3 * gl_Normal);

gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;

}



I'm not sure if it's normal but if I use something else than "gl_Position = 
ftransform();" I get a black screen... The normal buffer is correct but the 
position buffer now looks like this:

[Image: http://i41.tinypic.com/18ozn9.png ]

gbuffer_frag.glsl

Code:
varying vec4 pos;
varying vec3 n;

uniform sampler2D sColorMap;
uniform sampler2D sNormalMap;

void main(void)
{
vec3 N = texture2D(sNormalMap, gl_TexCoord[0].xy).xyz;
vec3 smoothOut = vec3(0.5,0.5,1.0);
N = normalize((mix(smoothOut,N,1.0)*2.0)-1.0);

gl_FragData[0] = pos;
gl_FragData[1] = vec4(normalize(n) * 0.5 + 0.5, 1.0);
gl_FragData[2] = vec4(texture2D(sColorMap, gl_TexCoord[0].xy).xyz, 1.0);
}



light_pass_vert.glsl

Code:
void main(void)
{
gl_Position = ftransform();


gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;

}



light_pass_frag.glsl

Code:
uniform sampler2D uBuffer0;
uniform sampler2D uBuffer1;
uniform sampler2D uBuffer2;

uniform vec4 uLightPositionWorldSpace;

void main(void)
{
vec4 buffer0 = texture2D(uBuffer0,gl_TexCoord[0].st);
vec4 buffer1 = texture2D(uBuffer1,gl_TexCoord[0].st);
vec4 buffer2 = texture2D(uBuffer2,gl_TexCoord[0].st);

vec3 P = buffer0.xyz;
vec3 N = buffer1.xyz;
vec3 C = buffer2.xyz;
vec3 L = uLightPositionWorldSpace.xyz - P;

float dist = length(L);
float att = 0.01 * dist;
float NdotL = max(dot(N,L), 0.0);
if(NdotL > 0.0) 
{
gl_FragColor += att * (0.4 * NdotL);
vec3 halfVector = normalize(L+P);
float NdotHV = max(dot(N,halfVector),0.0);
gl_FragColor += att * 1.0 * pow(NdotHV,24.0);
}

gl_FragColor *= buffer2;
}



Unfortunately, it did not work as I expected... even thought I transformed the 
position, light position and the normal by the same modelMatrix, the light is 
changing with my camera (maybe view space?). However this time, even though it 
moves, the light seems to be doing the right effect (diff+spec).

[Image: http://i41.tinypic.com/ddfepd.png ]

Also the light is brighter if my camera points down but if I move up, it fades 
out...

Thank you!

Cheers,
Micael

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44300#44300





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgDB::writeImageFile return false in release mode only

2011-12-08 Thread Garthy D

On 08/12/11 10:29, Chris 'Xenon' Hanson wrote:

On 12/7/2011 4:50 PM, clement@csiro.au wrote:

  I also would like to know how to do to turn up osg debug level.  Thanks.


http://lmgtfy.com/?q=osg+debug+level



As well as the OSG_NOTIFY_LEVEL environment variable, there is also the 
osg::setNotifyLevel() call. Enabling verbose OSG logging and searching 
the resultant logs will save you an incredible amount of time and 
frustration.


Garth
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] User clip planes and shaders

2011-12-08 Thread Paul Martz

On 12/7/2011 11:36 AM, Dave Jones wrote:

According to the glClipPlane docs, the plane equations are transformed to view 
space.


This is only applicable if you want to perform clipping in the same space as the 
OpenGL FFP. Once you start using shaders, this is optional, and you can perform 
clipping in some other space if it's more convenient. It's up to you.



In my shader, I'm passing the plane equations in as uniforms. For this to work 
on all vertices, I need to ensure that the clip plane equations have been 
transformed by the inverse transpose of the model view matrix. The only way 
that I can think of doing that is creating a uniform update callback which 
always updates the plane equations based on the camera's current model view 
matrix.


If you're using a GLSL 1.20 shader, your shader would just multiply the clip 
plane by the built-in uniform gl_ModelViewMatrixInverseTranspose.

   -Paul




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] User clip planes and shaders

2011-12-08 Thread Dave Jones
Hi,

I have some code that uses osg::ClipPlane to clip a hierarchy of meshes. All I 
do is create some plane equations relative to the root node's transform and set 
the planes as attributes that affect the entire tree.

This works pretty well. When I look at the output in gDEBugger, I can see that 
the clip equations are invoked after glLoadMatrix is called on the root 
transform. glEnable is called on the clip planes before any of the geometry in 
the hierarchy is drawn.

Currently, I need to port this functionality to a vertex shader for a project. 
Clipping in a shader is pretty straightforward, but I'm getting a little 
tripped up on what transformation space the clip planes should be in and how to 
transfer that to the vertex shader.

According to the glClipPlane docs, the plane equations are transformed to view 
space. In my shader, I'm passing the plane equations in as uniforms. For this 
to work on all vertices, I need to ensure that the clip plane equations have 
been transformed by the inverse transpose of the model view matrix. The only 
way that I can think of doing that is creating a uniform update callback which 
always updates the plane equations based on the camera's current model view 
matrix.

This seems a little clunky to me, but I wasn't sure how else to do it. Is there 
a simpler way that I'm overlooking? This fixed function pipeline model was 
convenient since it did a lot of this work for me, but it seems like I have to 
do on my own if I go the programmable pipeline route. Is this a correct 
assessment?

Thanks! And sorry if this is a bit long-winded.

-Dave

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44278#44278





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] best format for paged database

2011-12-08 Thread Chris 'Xenon' Hanson
On 12/8/2011 1:27 AM, PC John wrote:
> Main requirement: I need to load base level geometry and base resolution 
> textures ASAP, f.ex <1s. I will probably inline base-level texture data into 
> the base-level scene database.

  Are you trying to do terrain?

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] ATI cards and textures issues

2011-12-08 Thread lucie lemonnier
Hi,

I developed an application that loads textures dynamically.
I tested my application with a NVidia card and my application works fine but 
when I test my application on ATI card, the textures doesn't change.
Can you help me? 
Does anyone have had this problem?

Thank you!

Cheers,
lucie

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44292#44292





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] World to Screen Space

2011-12-08 Thread dimi christop
Hallo Martin,
After I saw your mail I put up a little example program which does what you 
want (i think).
Basically it prints the screen space coordinates of the center of the 3d 
sphere, which is in world space (0,0,0).
Use the normal osgViewer mouse controls to move the sphere model around.
Just copy the code and look at the print outs. I used a modified example from 
osghelp.com

Enjoy
Dimi



#include 
#include 
#include 
#include 
#include 
#include 
#include

class CInputHandler : public osgGA::GUIEventHandler 
{
public:
    CInputHandler( osg::PositionAttitudeTransform* pPatSphere, osg::Node* 
pGraph )
    {
    m_rPatSphere    = pPatSphere;
    m_rGraph    = pGraph;
    }

    virtual bool handle( const osgGA::GUIEventAdapter& ea, 
osgGA::GUIActionAdapter& aa, osg::Object* pObject, osg::NodeVisitor* 
pNodeVisitor )
    {
    osgViewer::Viewer* pViewer = dynamic_cast(&aa);
    if ( !pViewer )
    {
    return false;
    }
    
    // normalized mouse position
    float x = ea.getXnormalized();
    float y = ea.getYnormalized();

    osg::Matrixd proj = pViewer->getCamera()->getProjectionMatrix();

    osg::Viewport* viewport = pViewer->getCamera()->getViewport();
    double mx = viewport->x() + (int)((double 
)viewport->width()*(x*0.5+0.5));
    double my = viewport->y() + (int)((double 
)viewport->height()*(y*0.5+0.5));

    osg::Matrix MVPW = pViewer->getCamera()->getViewMatrix() * proj;
    MVPW.postMult( 
pViewer->getCamera()->getViewport()->computeWindowMatrix() );

    
    osg::Vec3 nearPoint = osg::Vec3(0.f,0.f,0.0f) * MVPW;
    printf("Screen Space: %f %f\n", nearPoint[0], nearPoint[1]);
    

    return false;
    }

private:
    osg::ref_ptr    m_rPatSphere;
    osg::ref_ptr m_rGraph;
};

osg::Node* CreateScene( osgViewer::Viewer* pViewer )
{
    // create a group to contain our floor and sphere
    osg::Group* pGroup = new osg::Group;

    // create floor
    osg::Geode* pGeodeFloor = new osg::Geode;
    pGeodeFloor->addDrawable( new osg::ShapeDrawable( new 
osg::Box(osg::Vec3(0.0f,0.0f,-0.5f),100.0f, 100.0f, 1.0f) ) );
    pGroup->addChild( pGeodeFloor );

    // create sphere
    osg::Geode* pGeodeSphere = new osg::Geode;
    pGeodeSphere->addDrawable( new osg::ShapeDrawable( new 
osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),5.0f) ) );

    // create transform to move sphere
    osg::PositionAttitudeTransform* pPat = new osg::PositionAttitudeTransform;
    pPat->addChild( pGeodeSphere );
    pGroup->addChild( pPat );

    // add the handler to the viewer
    pViewer->addEventHandler( new CInputHandler(pPat, pGeodeFloor ) );

    return pGroup;
}

int main(int argc, char* argv[])
{
    // construct the viewer
    osg::ref_ptr rViewer = new osgViewer::Viewer;

    // make the viewer create a 512x512 window and position it at 32, 32
    rViewer->setUpViewInWindow( 32, 32, 512, 512 );

    // set the scene-graph data the viewer will render
    rViewer->setSceneData( CreateScene( rViewer.get() ) );

    // execute main loop
    return rViewer->run();
}







- Original Message -
From: Sebastian Messerschmidt 
To: osg-users@lists.openscenegraph.org
Cc: Martin Haffner 
Sent: Thursday, December 8, 2011 11:19 AM
Subject: Re: [osg-users] World to Screen Space

Hello Martin,
there are some things I'd check:

1. Transformation order (i'm not quite sure about the osg::Matrix order)
So try    mat * vec instead of vec* mat

2. viewMat, this should take you from object space to view-space if  I'm 
not mistaken.
So if you really have world-space you just need the view-transform here.

Basically I'd setup an simple example and check the matrices. Start with 
a simple translation etc.
As you don't state what exactly is wrong, I guess no one will be able to 
simply solve your problem.

cheers
Sebastian

> Hi,
>
> I want to transform a point from world space to screen space with this code:
> Camera* cam = ...
> Matrix viewMat = cam->getViewMatrix();
> Matrix projMat = cam->getProjectionMatrix();
> Viewport* vp   = cam->getViewport();
> Matrix vpMat   = vp->computeWindowMatrix();    
> Vec3 ls1SS = ls1WSPos * viewMat * projMat * vpMat;
>
> Unfortunately the result vector ls1SS is not correct. Is my approach 
> generelly right or did I miss something?
>
> Thank you!
>
> Cheers,
> Martin
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=44277#44277
>
>
>
>
>
> ___
> 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
___
osg-users mailing list
os

[osg-users] BSOD on Intel / Windows XP

2011-12-08 Thread Serge Lages
Hi guys,

I am having troubles running an OSG application on an Intel graphic card
with Windows XP (drivers up to date), everything works fine but after a
random time I get a system error with a blue screen and I need to reboot...
I can't manage to reproduce the problem on Windows 7.

Are you aware of something that may cause this issue on this setup ?

Thanks !

-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] best format for paged database

2011-12-08 Thread Christiansen, Brad
Hi,

Just a comment regarding "My initial wish was to have everything in one file.".
You can achieve this by placing all you data into an archive format. I have 
used osga before and I have seen quite a bit of activity around the zip plugin 
recently. I ended up creating my own OSG archive based on SQLite but I havent 
managed to submit that code yet.

One thing to note when using archives and PagedLODs, you have to make sure that 
rescources in sperate files are specified relative to the root of the archive, 
not relative to the loading file. I wrote a simple visitor to do this before 
adding all my data to the archive.

Cheers,
Brad

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of PC John
Sent: Thursday, 8 December 2011 4:27 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] best format for paged database

Hi Torben and Xenon,

I was studying OSG sources... (as usual way to study OSG)

> BTW: What are your performance requirements?

Main requirement: I need to load base level geometry and base resolution 
textures ASAP, f.ex <1s. I will probably inline base-level texture data into 
the base-level scene database.

Then, paging of geometry: Seems that high-res geometry need to stay in 
separate file, otherwise it would be loaded at start-up, slowing down the 
opening process, that has to complete in 1s.

The last goal - to page in and page out textures depending on spatial 
proximity. The testing model is 72MB of jpegs and they take approximately 
4.5GB when decompressed to memory while using several resolutions for each 
texture.

What archtecture would you propose?
I guess, I will need to place high-res textures to external files. And high-res 
geometry as well to avoid them being parsed on start-up and prolonging opening 
process. (My initial wish was to have everything in one file.)

John

On Wednesday 07 of December 2011 09:02:25 Chris 'Xenon' Hanson wrote:
> On 12/7/2011 12:29 AM, PC John wrote:
> > Thanks Chris and J.P.,
> > I am wondering that flt and vpb and similar formats does not support
> > paging
>   VPB isn't a format. VPB is a tool. It generates data in any OSG-writable
> format, including .osg/.ive/.osgt/.osgb. It does support terrain paging
> with PagedLOD.
> > (PagedLOD). In that case, osgb seems to be the best format. Can it store
> > texture data internally, or all jpegs and pngs have to stay as separate
> > files (possibly increasing data fragmentation)?
> 
>   It can do either way.
> 
> > osgEarth is definitely the project to look at. Thanks,
> 
>   Yes.
> 
>   If you're not interested in building it from scratch (it can be difficult
> the first time), my company, AlphaPixel offers subscriptions to a
> binaries-download system that builds projects like osgEarth every night,
> whenever the source has changed.
> > John
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


-
DISCLAIMER: This e-mail transmission and any documents, files and 
previous e-mail messages attached to it are private and confidential.  
They may contain proprietary or copyright material or information that 
is subject to legal professional privilege.  They are for the use of 
the intended recipient only.  Any unauthorised viewing, use, disclosure, 
copying, alteration, storage or distribution of, or reliance on, this 
message is strictly prohibited.  No part may be reproduced, adapted or 
transmitted without the written permission of the owner.  If you have 
received this transmission in error, or are not an authorised recipient, 
please immediately notify the sender by return email, delete this 
message and all copies from your e-mail system, and destroy any printed 
copies.  Receipt by anyone other than the intended recipient should not 
be deemed a waiver of any privilege or protection.  Thales Australia 
does not warrant or represent that this e-mail or any documents, files 
and previous e-mail messages attached are error or virus free.  

-

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] World to Screen Space

2011-12-08 Thread Sebastian Messerschmidt

Hello Martin,
there are some things I'd check:

1. Transformation order (i'm not quite sure about the osg::Matrix order)
So trymat * vec instead of vec* mat

2. viewMat, this should take you from object space to view-space if  I'm 
not mistaken.

So if you really have world-space you just need the view-transform here.

Basically I'd setup an simple example and check the matrices. Start with 
a simple translation etc.
As you don't state what exactly is wrong, I guess no one will be able to 
simply solve your problem.


cheers
Sebastian


Hi,

I want to transform a point from world space to screen space with this code:
Camera* cam = ...
Matrix viewMat = cam->getViewMatrix();
Matrix projMat = cam->getProjectionMatrix();
Viewport* vp   = cam->getViewport();
Matrix vpMat   = vp->computeWindowMatrix();  
Vec3 ls1SS = ls1WSPos * viewMat * projMat * vpMat;

Unfortunately the result vector ls1SS is not correct. Is my approach generelly 
right or did I miss something?

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44277#44277





___
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] World to Screen Space

2011-12-08 Thread Martin Haffner
Hi,

Thanks, but your link does not help me that much. They are using the same code 
I use and still the code does not work;(

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44286#44286





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] best format for paged database

2011-12-08 Thread PC John
Hi Torben and Xenon,

I was studying OSG sources... (as usual way to study OSG)

> BTW: What are your performance requirements?

Main requirement: I need to load base level geometry and base resolution 
textures ASAP, f.ex <1s. I will probably inline base-level texture data into 
the base-level scene database.

Then, paging of geometry: Seems that high-res geometry need to stay in 
separate file, otherwise it would be loaded at start-up, slowing down the 
opening process, that has to complete in 1s.

The last goal - to page in and page out textures depending on spatial 
proximity. The testing model is 72MB of jpegs and they take approximately 
4.5GB when decompressed to memory while using several resolutions for each 
texture.

What archtecture would you propose?
I guess, I will need to place high-res textures to external files. And high-res 
geometry as well to avoid them being parsed on start-up and prolonging opening 
process. (My initial wish was to have everything in one file.)

John

On Wednesday 07 of December 2011 09:02:25 Chris 'Xenon' Hanson wrote:
> On 12/7/2011 12:29 AM, PC John wrote:
> > Thanks Chris and J.P.,
> > I am wondering that flt and vpb and similar formats does not support
> > paging
>   VPB isn't a format. VPB is a tool. It generates data in any OSG-writable
> format, including .osg/.ive/.osgt/.osgb. It does support terrain paging
> with PagedLOD.
> > (PagedLOD). In that case, osgb seems to be the best format. Can it store
> > texture data internally, or all jpegs and pngs have to stay as separate
> > files (possibly increasing data fragmentation)?
> 
>   It can do either way.
> 
> > osgEarth is definitely the project to look at. Thanks,
> 
>   Yes.
> 
>   If you're not interested in building it from scratch (it can be difficult
> the first time), my company, AlphaPixel offers subscriptions to a
> binaries-download system that builds projects like osgEarth every night,
> whenever the source has changed.
> > John
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org