Re: [osg-users] LOD Culling issue

2010-08-04 Thread Vincent Bourdier

Hi Robert,

Thanks a lot  for this answer, I tried and this fix my issue :)

Regards,
   Vincent.

Le 16/07/2010 10:50, Robert Osfield a écrit :

Hi Vincent,

   

Do you mean that I have to initialize the Bounding Sphere of the PagedLOD
node when I create it ? because I didn't found any special method in LOD or
PagedLOD about that.
 

You obviously didn't look hard enough...  in the LOD header you'll find:

 /** Modes which control how the center of object should be
determined when computing which child is active.*/
 enum CenterMode
 {
 USE_BOUNDING_SPHERE_CENTER,
 USER_DEFINED_CENTER
 };

 /** Set how the center of object should be determined when
computing which child is active.*/
 void setCenterMode(CenterMode mode) { _centerMode=mode; }

 /** Get how the center of object should be determined when
computing which child is active.*/
 CenterMode getCenterMode() const { return _centerMode; }

 /** Sets the object-space point which defines the center of
the osg::LOD.
 center is affected by any transforms in the hierarchy
above the osg::LOD.*/
 inline void setCenter(const vec_type&  center) {
_centerMode=USER_DEFINED_CENTER; _userDefinedCenter = center; }

 /** return the LOD center point. */
 inline const vec_type&  getCenter() const { if
(_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else
return getBound().center(); }


 /** Set the object-space reference radius of the volume
enclosed by the LOD.
   * Used to determine the bounding sphere of the LOD in the
absence of any children.*/
 inline void setRadius(value_type radius) { _radius = radius; }

 /** Get the object-space radius of the volume enclosed by the LOD.*/
 inline value_type getRadius() const { return _radius; }


Use these user bounding sphere methods when your PagedLOD has all
external children to make sure it has a relevant bounding sphere.

Robert.
___
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] LOD Culling issue

2010-07-16 Thread Robert Osfield
Hi Vincent,

> Do you mean that I have to initialize the Bounding Sphere of the PagedLOD
> node when I create it ? because I didn't found any special method in LOD or
> PagedLOD about that.

You obviously didn't look hard enough...  in the LOD header you'll find:

/** Modes which control how the center of object should be
determined when computing which child is active.*/
enum CenterMode
{
USE_BOUNDING_SPHERE_CENTER,
USER_DEFINED_CENTER
};

/** Set how the center of object should be determined when
computing which child is active.*/
void setCenterMode(CenterMode mode) { _centerMode=mode; }

/** Get how the center of object should be determined when
computing which child is active.*/
CenterMode getCenterMode() const { return _centerMode; }

/** Sets the object-space point which defines the center of
the osg::LOD.
center is affected by any transforms in the hierarchy
above the osg::LOD.*/
inline void setCenter(const vec_type& center) {
_centerMode=USER_DEFINED_CENTER; _userDefinedCenter = center; }

/** return the LOD center point. */
inline const vec_type& getCenter() const { if
(_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else
return getBound().center(); }


/** Set the object-space reference radius of the volume
enclosed by the LOD.
  * Used to determine the bounding sphere of the LOD in the
absence of any children.*/
inline void setRadius(value_type radius) { _radius = radius; }

/** Get the object-space radius of the volume enclosed by the LOD.*/
inline value_type getRadius() const { return _radius; }


Use these user bounding sphere methods when your PagedLOD has all
external children to make sure it has a relevant bounding sphere.

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


Re: [osg-users] LOD Culling issue

2010-07-15 Thread Vincent Bourdier

Hi Robert,

Thanks for your answer.

Do you mean that I have to initialize the Bounding Sphere of the 
PagedLOD node when I create it ? because I didn't found any special 
method in LOD or PagedLOD about that.


Thanks.

Regards,
   Vincent.

Le 10/07/2010 11:32, Robert Osfield a écrit :

Hi Vincent,

If a PagedLOD is not being visited then it'll likely be because it's
being view frustum culled or culled by an LOD above it.  Not setting
up the bounding volume of the PagedLOD correctly would be a likely
candidate for this happening inappropriately.

Robert.

On Fri, Jul 9, 2010 at 1:50 AM, Vincent Bourdier
  wrote:
   

Hi all,

Still having issues with PagedLOD...>_<

My scene is composed by PagedLOD only at start-up. All is good, the files
are loaded and the geometry are displayed.

But when, before launching the render loop, I add a little geometry (not a
pagedLOD, just a simple little sphere) in my scene, PagedLOD do not Load.
The database pager request List is empty.
I need to move the camera very close to a LOD (knowing it position without
seeing it) to launch the PagedLOD loading.

It seems that the PagedLOD nodes are not visited byt the CullVisitor, so
they can't request the load of their children.

Any idea would be very appreciated because after 8h on this issue, I still
have no idea of the problem...

Thanks for your help.

Regards,
   Vincent.
___
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] LOD Culling issue

2010-07-10 Thread Robert Osfield
Hi Vincent,

If a PagedLOD is not being visited then it'll likely be because it's
being view frustum culled or culled by an LOD above it.  Not setting
up the bounding volume of the PagedLOD correctly would be a likely
candidate for this happening inappropriately.

Robert.

On Fri, Jul 9, 2010 at 1:50 AM, Vincent Bourdier
 wrote:
> Hi all,
>
> Still having issues with PagedLOD... >_<
>
> My scene is composed by PagedLOD only at start-up. All is good, the files
> are loaded and the geometry are displayed.
>
> But when, before launching the render loop, I add a little geometry (not a
> pagedLOD, just a simple little sphere) in my scene, PagedLOD do not Load.
> The database pager request List is empty.
> I need to move the camera very close to a LOD (knowing it position without
> seeing it) to launch the PagedLOD loading.
>
> It seems that the PagedLOD nodes are not visited byt the CullVisitor, so
> they can't request the load of their children.
>
> Any idea would be very appreciated because after 8h on this issue, I still
> have no idea of the problem...
>
> Thanks for your help.
>
> Regards,
>   Vincent.
> ___
> 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] LOD Culling issue

2010-07-08 Thread Vincent Bourdier

Hi all,

Still having issues with PagedLOD... >_<

My scene is composed by PagedLOD only at start-up. All is good, the 
files are loaded and the geometry are displayed.


But when, before launching the render loop, I add a little geometry (not 
a pagedLOD, just a simple little sphere) in my scene, PagedLOD do not Load.

The database pager request List is empty.
I need to move the camera very close to a LOD (knowing it position 
without seeing it) to launch the PagedLOD loading.


It seems that the PagedLOD nodes are not visited byt the CullVisitor, so 
they can't request the load of their children.


Any idea would be very appreciated because after 8h on this issue, I 
still have no idea of the problem...


Thanks for your help.

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