[osg-users] Image file PagedLOD...

2009-06-12 Thread neil.hughes
Hi All,

Has anyone come across a scenario where they wished to have PagedLOD that 
instead of handling Nodes, handle images ?

Essentially I find myself in a position where I have a model that references a 
texture, but that texture is quite large, and even with reducing the texture 
size with little compromise in quality, the time to stream over the web is too 
large. So, what I'm considering is replacing the image load call, with a 
similar concept to that of PagedLOD's whereby I could give the PagedImageLOD 
object a list of ordered image file names that I want it to progressively load 
- in much the same way that apps like google map appears to work. The first 
image file could be a 2x2 pixel image, whilst the nth image file would be the 
full-on image. I would want the PagedImageLOD to return a valid Image node 
immediately - perhaps a hard coded small default image - whilst in the 
background the specified image filesnames are being downloaded, and replace the 
content of the created image node. 

The reason for this sort of functionality would be that I could then intercept 
all image load requests via my own callback handler, replace with a 
PagedImageLOD request, and still permit most plugins to work happily on the 
assumption that a model plugin that loads an image is probably only trying to 
reference that image in some stateset context.

Sorry for the thought dump, but has anyone tried/needed to do a similar thing, 
and if so is there an example available ?

Alternatively, if you can think of a better way that would be good as well. 
Most obvious alternative - that of have an LOD node on the model - would be 
fine if I only had one or two models. However, I have thousands of different 
models, so can't really ask our modellers to redo all these.

Many thanks for any help/thoughts.

Kind regards

Neil.




.to whose content was progressively replaced by the downloaded images. In this 
way I could 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Image file PagedLOD...

2009-06-12 Thread Jason Beverage
Hi Neil,

The osgEarth project does essentially what you are looking for.  Check it
out at http://www.osgearth.org

Thanks,

Jason

On Fri, Jun 12, 2009 at 5:08 AM, neil.hug...@tesco.net wrote:

 Hi All,

 Has anyone come across a scenario where they wished to have PagedLOD that
 instead of handling Nodes, handle images ?

 Essentially I find myself in a position where I have a model that
 references a texture, but that texture is quite large, and even with
 reducing the texture size with little compromise in quality, the time to
 stream over the web is too large. So, what I'm considering is replacing the
 image load call, with a similar concept to that of PagedLOD's whereby I
 could give the PagedImageLOD object a list of ordered image file names
 that I want it to progressively load - in much the same way that apps like
 google map appears to work. The first image file could be a 2x2 pixel image,
 whilst the nth image file would be the full-on image. I would want the
 PagedImageLOD to return a valid Image node immediately - perhaps a hard
 coded small default image - whilst in the background the specified image
 filesnames are being downloaded, and replace the content of the created
 image node.

 The reason for this sort of functionality would be that I could then
 intercept all image load requests via my own callback handler, replace with
 a PagedImageLOD request, and still permit most plugins to work happily on
 the assumption that a model plugin that loads an image is probably only
 trying to reference that image in some stateset context.

 Sorry for the thought dump, but has anyone tried/needed to do a similar
 thing, and if so is there an example available ?

 Alternatively, if you can think of a better way that would be good as well.
 Most obvious alternative - that of have an LOD node on the model - would be
 fine if I only had one or two models. However, I have thousands of different
 models, so can't really ask our modellers to redo all these.

 Many thanks for any help/thoughts.

 Kind regards

 Neil.




 .to whose content was progressively replaced by the downloaded images. In
 this way I could
 ___
 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] Image file PagedLOD...

2009-06-12 Thread neil.hughes
Thanks Jason, I'll take a look later today.
 Jason Beverage jasonbever...@gmail.com wrote: 
 Hi Neil,
 
 The osgEarth project does essentially what you are looking for.  Check it
 out at http://www.osgearth.org
 
 Thanks,
 
 Jason
 
 On Fri, Jun 12, 2009 at 5:08 AM, neil.hug...@tesco.net wrote:
 
  Hi All,
 
  Has anyone come across a scenario where they wished to have PagedLOD that
  instead of handling Nodes, handle images ?
 
  Essentially I find myself in a position where I have a model that
  references a texture, but that texture is quite large, and even with
  reducing the texture size with little compromise in quality, the time to
  stream over the web is too large. So, what I'm considering is replacing the
  image load call, with a similar concept to that of PagedLOD's whereby I
  could give the PagedImageLOD object a list of ordered image file names
  that I want it to progressively load - in much the same way that apps like
  google map appears to work. The first image file could be a 2x2 pixel image,
  whilst the nth image file would be the full-on image. I would want the
  PagedImageLOD to return a valid Image node immediately - perhaps a hard
  coded small default image - whilst in the background the specified image
  filesnames are being downloaded, and replace the content of the created
  image node.
 
  The reason for this sort of functionality would be that I could then
  intercept all image load requests via my own callback handler, replace with
  a PagedImageLOD request, and still permit most plugins to work happily on
  the assumption that a model plugin that loads an image is probably only
  trying to reference that image in some stateset context.
 
  Sorry for the thought dump, but has anyone tried/needed to do a similar
  thing, and if so is there an example available ?
 
  Alternatively, if you can think of a better way that would be good as well.
  Most obvious alternative - that of have an LOD node on the model - would be
  fine if I only had one or two models. However, I have thousands of different
  models, so can't really ask our modellers to redo all these.
 
  Many thanks for any help/thoughts.
 
  Kind regards
 
  Neil.
 
 
 
 
  .to whose content was progressively replaced by the downloaded images. In
  this way I could
  ___
  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] Image file PagedLOD...

2009-06-12 Thread Luigi Calori
I have a similar problem,  some models with too heavvy texture to put on 
the web...
The models were not so many so , for the ones with little geometry I 
just used a chain of PagedLOD with the same geometry but with texture of 
incresing resolution.
I did the conversion by hand but I' m currently trying to do it in an 
automatic way.

This approach has the problem of replicating geometry.
I have also tried to putt al the geometry into ProxyNodes and then 
refernce them in the PageLOD structure... but this seem result in 
multiple loading of the same

proxy... I thought all files were cached, as images do...

Your approach seem interesting, but how you decide when the 
ImagePagedLOD switch? the PagedLOD inherit the switching from LOD


Sorry for the long post.. but it is an interesting argument for me now...

Thanks
 Luigi

neil.hug...@tesco.net ha scritto:

Hi All,

Has anyone come across a scenario where they wished to have PagedLOD that 
instead of handling Nodes, handle images ?

Essentially I find myself in a position where I have a model that references a texture, but that texture is quite large, and even with reducing the texture size with little compromise in quality, the time to stream over the web is too large. So, what I'm considering is replacing the image load call, with a similar concept to that of PagedLOD's whereby I could give the PagedImageLOD object a list of ordered image file names that I want it to progressively load - in much the same way that apps like google map appears to work. The first image file could be a 2x2 pixel image, whilst the nth image file would be the full-on image. I would want the PagedImageLOD to return a valid Image node immediately - perhaps a hard coded small default image - whilst in the background the specified image filesnames are being downloaded, and replace the content of the created image node. 


The reason for this sort of functionality would be that I could then intercept 
all image load requests via my own callback handler, replace with a 
PagedImageLOD request, and still permit most plugins to work happily on the 
assumption that a model plugin that loads an image is probably only trying to 
reference that image in some stateset context.

Sorry for the thought dump, but has anyone tried/needed to do a similar thing, 
and if so is there an example available ?

Alternatively, if you can think of a better way that would be good as well. 
Most obvious alternative - that of have an LOD node on the model - would be 
fine if I only had one or two models. However, I have thousands of different 
models, so can't really ask our modellers to redo all these.

Many thanks for any help/thoughts.

Kind regards

Neil.




.to whose content was progressively replaced by the downloaded images. In this way I could 
___

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