Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Adrian Lindberg
I see, so the DatabasePager works even if I don't subclass osgViewer, I was 
getting worried there.

Well seems like my bounding volumes are misplaced and that's why I'm not 
getting anything on the screen...

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





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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Alberto Luaces
Hi,

"Adrian Lindberg" writes:

> I can't seem to get a hang of this. Still new to OSG.
>
> So what I gather I shouldn't use addChild but simply setup setFileName() and 
> setRange()? Then the PagedLOD will take care of the rest?
>
> Also, what do I need to setup for the DatabasePager that isn't supplied by 
> osgViewer? If I sub-class which parts do I want to replace?
>
> Is there any tutorial for this? The PagedLOD example doesn't do any of it 
> with a viewer but simply preps the data.
>
> Slightly confused...

I recall some good post about converting a LOD database to a PagedLOD
one. Maybe it is useful to you:

http://www.mail-archive.com/osg-us...@openscenegraph.net/msg06723.html

Regards,

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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Robert Osfield
On Tue, Feb 16, 2010 at 3:54 PM, Chris 'Xenon' Hanson
 wrote:
>> Is there any tutorial for this? The PagedLOD example doesn't do any of it 
>> with a viewer but simply preps the data.
>
>  The PagedLOD example is not a great learning tool, it is for converting an 
> LOD-based
> database to PagedLOD. Which, now that I think of it, might be useful for you.

The osgphotoalbum does a bit creative use of PageLOD and a psuedo
plugin to provide a dynamic geometry creation and image loading
system.

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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Chris 'Xenon' Hanson
On 2/16/2010 8:35 AM, Adrian Lindberg wrote:
> I can't seem to get a hang of this. Still new to OSG.
> So what I gather I shouldn't use addChild but simply setup setFileName() and 
> setRange()? Then the PagedLOD will take care of the rest?

  Yes. Make sure the file for the child exists on disk, then fill the names and 
ranges.

> Also, what do I need to setup for the DatabasePager that isn't supplied by 
> osgViewer? If I sub-class which parts do I want to replace?

  I think basic osgViewer has all the magic you need. But if you go rolling 
your own
viewer, you need to make sure to replicate what it does.

> Is there any tutorial for this? The PagedLOD example doesn't do any of it 
> with a viewer but simply preps the data.

  The PagedLOD example is not a great learning tool, it is for converting an 
LOD-based
database to PagedLOD. Which, now that I think of it, might be useful for you.


-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Adrian Lindberg
I can't seem to get a hang of this. Still new to OSG.

So what I gather I shouldn't use addChild but simply setup setFileName() and 
setRange()? Then the PagedLOD will take care of the rest?

Also, what do I need to setup for the DatabasePager that isn't supplied by 
osgViewer? If I sub-class which parts do I want to replace?

Is there any tutorial for this? The PagedLOD example doesn't do any of it with 
a viewer but simply preps the data.

Slightly confused...

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





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


Re: [osg-users] PagedLOD usage??

2010-02-16 Thread Ufuk
Hi Chris,
Thank you so much for your help. i was just thinking about writing my own
pagedLOD mechanism.
it works really nice now.

thanks again :)

On Mon, Feb 15, 2010 at 6:09 PM, Chris 'Xenon' Hanson
wrote:

> On 2/15/2010 6:25 AM, Ufuk wrote:
> > do you think i miss something? should i use PagedLOD for my purpose or i
> > should implement something different??*
>
>   PagedLOD should do the trick for you.
>
>  Often, you will put in the first LOD as already-leaded, and leave its
> filename blank.
> Then, add the higher LODs without using addChild -- you don't want to add a
> Node, you just
> want to fill out the filename and ranges in the PagedLOD perRangeData. The
> DatabasePager
> will load them for you when needed.
>
>  If you want the first LOD loaded for you, do not create and add a blank
> Node as you are
> doing here. Just add a perRangeData to the PagedLOD node, and start the
> main OSG program
> loop running. Make sure you are using something derived from osgViewer and
> that you have
> all the DatabasePager bits hooked up properly or background loading won't
> work.
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere  Xenon
> AlphaPixel.com
> PixelSense Landsat processing now available!
> http://www.alphapixel.com/demos/
> "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
>



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


Re: [osg-users] PagedLOD usage??

2010-02-15 Thread Chris 'Xenon' Hanson
On 2/15/2010 6:25 AM, Ufuk wrote:
> do you think i miss something? should i use PagedLOD for my purpose or i
> should implement something different??*

  PagedLOD should do the trick for you.

  Often, you will put in the first LOD as already-leaded, and leave its 
filename blank.
Then, add the higher LODs without using addChild -- you don't want to add a 
Node, you just
want to fill out the filename and ranges in the PagedLOD perRangeData. The 
DatabasePager
will load them for you when needed.

  If you want the first LOD loaded for you, do not create and add a blank Node 
as you are
doing here. Just add a perRangeData to the PagedLOD node, and start the main 
OSG program
loop running. Make sure you are using something derived from osgViewer and that 
you have
all the DatabasePager bits hooked up properly or background loading won't work.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"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] PagedLOD usage??

2010-02-15 Thread Ufuk
Hi all,
sorry, this question seems very odd but i could not solved the problem.
i need simple paged lod mechanism and i can see that there is a class for
this purpose in osg named osg::PagedLOD

i have terrain pages with different resolutions. since there are many of
them, i don't want to load all of them at the beginning of the program. i
want them to be loaded when the camera goes there. osg::LOD works perfect
but it loads all the models at the beginning of the program.
i call the functions like that:

//CALL OF osg::LOD
osg::Node* node = osgDB::readNodeFile(filename);
lod->addChild(node, min, max);

//CALL OF osg::PagedLOD
osg::Node* node = new osg::Node();
pagedLOD->addChild(node, min, max, filename);


when i use PagedLOD instead of LOD, i dont load the node file at the
beginning. but the problem is when i use pagedLOD i cant see anything. it
just works when i use LOD.

do you think i miss something? should i use PagedLOD for my purpose or i
should implement something different??*

any idea would be great :)

thanks

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