Re: [osg-users] [SOLVED] [GL ES2] Add camera child

2015-05-12 Thread Ren Liwei
osg::ref_ptr root;
root->addChild(node);  // forget to new before using root
osg::Group *subgraph = root->get(); // should be root.get()
camera->addChild(subgraph);

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





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


[osg-users] is osgEphemeris incompatible with osgShadow?

2011-01-17 Thread Ren Liwei
Hi,

In my demo program, I use osgShadow(ShadowMap) to generate realtime shadow, it 
works well. But when I add osgEphemeris into the program and use the sunlight 
in osgEphemeris::EphemerisModel for shadow generating.Tthe shadow disappeared.  
And when I build  EphemerisModel without skydom, the shadow is right there.

Could somebody tell me why?

Thank you!

Cheers,
Ren

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





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


[osg-users] [vpb] How to build terrain database across a network of machines

2010-09-09 Thread Ren Liwei
Hi,

  I see that in the VPB developmentplans, it said "support for distributed 
database build across a network of machines (done)". But I find nothing for 
this in command line options. Can anybody tell me how to use it?


Thank you!

Cheers,
Ren

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





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


Re: [osg-users] crash when rendering the pagedlod database

2009-12-24 Thread Ren Liwei
Hi Robert,

  I have tried osg::discardAllDeletedGLObjects after release all my osg objects 
when refreshing and it then works well. The crash never occured.
I still don't understand the reason clearly, but nevertheless  the problem is 
resolved. I will look into it and learn much.

Thank you again for quick and kind responce!

Cheers,
Ren

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





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


Re: [osg-users] crash when rendering the pagedlod database

2009-12-24 Thread Ren Liwei
Hi Robert,

  I released all osg objects manually when the activeX release. But the global 
objects including osg built-in global objects were not released. If I need to 
manually release these objects?  And How? 

Thank you!

Cheers,
Ren

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





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


Re: [osg-users] crash when rendering the pagedlod database

2009-12-24 Thread Ren Liwei
Thanks for your reply. 
But the fact is that all things including the osgViewer::Viewer object would 
destruct and reconstruct when refreshing. 
And another fact is that it runs well when rendering all kinds of IVE models 
but the file in attachment(earth.ive which generated by VPB with --terrain).

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




Attachments: 
http://forum.openscenegraph.org//files/earth_122.ive


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


[osg-users] crash when rendering the pagedlog database

2009-12-23 Thread Ren Liwei
Hi,

   I have an activeX control which simplily render a pagedlod earth and It can 
be loaded from IE successfully. But when I press F5 to refresh the page, it 
runs into a crash. The callstack snapshot is in the attachment.
   The earth is made by vpb with -terrain. And then I also made a test using 
earth without -terrain, it runs well when refreshed.
   My compute is ThinkPad SL400 with NVIDIA GeForce G 105M graphics card.

   Is it a bug of osg or my misuse?

Thank you!

Cheers,
Ren

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




Attachments: 
http://forum.openscenegraph.org//files/callstack_203.png


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


Re: [osg-users] probem in playing gif with osgdb_gif

2009-12-09 Thread Ren Liwei
Hi Martin, thank you for the advice.

But I have saved a simple gif file which has only two frames (dispaly a circle 
of red and blue) with the same configuration and it rendered well.
I used photoshop cs2.  What should I do to config the output as you discribed.

Thanks

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





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


[osg-users] probem in playing gif with osgdb_gif

2009-12-08 Thread Ren Liwei
Hi,  
   I have a gif animation which plays well in other pic viewer. But when I 
render it in osg with alpha blend on, I get the effect like this [Image: 
http://forum.openscenegraph.org/files/1_193.jpg ] . But when I turn off alpha 
blend, it gose well with the background color.
   And I also find that the first frame of this gif is rendered well like this 
[Image: http://forum.openscenegraph.org/files/2_103.jpg ].
   I think there is something wrong with the alpha value of the other frames of 
the gif file. But why? Is there anything to care when making a gif animation?


Thank you!

Cheers,
Ren[/img]

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




Attachments: 
http://forum.openscenegraph.org//files/2_103.jpg
http://forum.openscenegraph.org//files/1_193.jpg


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


Re: [osg-users] a problem with computing near far

2009-06-30 Thread Ren Liwei
Hi Maria,
   I have tried using the setClampProectionMatrixCallback and make my 
implemetation from osg::_clampProjectionMatrix only make the follow change to 
calculate far plane from znear and nearfarratio.

// osg::_clampProjectionMatrix implementation:
//double min_near_plane = zfar*nearFarRatio;
//if (desired_znearmax_far_plane) desired_zfar=max_far_plane;

But it seems not work well. Can you show me your implementation?
Thank you!



María Ten wrote:
> Hi,
> 
> You can disable the auto-compute near far and give a fix value for near and 
> far. 
> 
> If this method don't solve your problem you can add a callback to your root 
> node in the scene using the setClampProjectionMatrixCallback method of the 
> cullvisitor and override the clampProjectionMatrixImplementation method in 
> the class ClampProjectionMatrixCallback. In my implementation I compute the 
> nearest point in the geometry to set the near plane and then adjust the far 
> plane depending of the near plane and the nearFarRatio.
> 
> This little hack work for my with very large terrains culling the far objects 
> in the scene instead of the nearest objects.
> 
> Cheers,
> 
> Maria.
> 
> On Mon, Jun 29, 2009 at 11:27 AM, Ren Liwei < ()> wrote:
> 
> > Hi,
> >  In my scene there is an earth and some small models on it.  Sometimes i've 
> > got a screenshot like the attachment when i turn auto-compute near far on.
> >  I known that's becuase the auto-computed near plane is too far to let 
> > nearer primitives in. So i tried giving a very little nearfarratio and then 
> > it worked somewhat. But when i added an even larger sky sphere into the 
> > scene, once again i fall into trouble with near far.
> >  So what should i do with near far when there are both very near(less then 
> > 1) and far away(far then 1) things to show in the secen.
> > 
> > Thank you!
> > 
> > Cheers,
> > indif
> > 
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=14637#14637 
> > (http://forum.openscenegraph.org/viewtopic.php?p=14637#14637)
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> 
> 
> 
> -- 
> María Ten Rodríguez
> Instituto de Automática e Informática Industrial  http://www.ai2.upv.es 
> (http://www.ai2.upv.es)
> Ciudad Politécnica de la Innovación 
> Universidad Politécnica de Valencia
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread Ren Liwei
i think i've got it. the emphasis is scalling down and moving towards camera, 
right?
but my sky sphere seems not properly to be moved, because i set its center to 
the camera pos per frame, so maybe i should scale it according to somethig like 
far plane depth
thank you

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





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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread Ren Liwei

rpingry wrote:
> Something that I have done (please let me know if this is not a good way to 
> do it or if there is a better way), is to break up my scene into parts.  I 
> have the "large distant" things in one part of my scene graph, and then 
> everything else in another part.  I then render them in separate render bins, 
> assuming that the large things will be drawn behind the smaller things.  I 
> also scale down the large objects and draw them closer to the camera so they 
> still look the same size.  I know this would throw off fog calculations 
> unless you adjusted for that, but I have found in my space scenes that I can 
> draw small ships right next to planets without having near/far clipping 
> problems, Z buffer fighting, or single point precision errors.
> 
> -- Rick
> 


I don't quite understand by breaking scene into two parts. If it means tow 
groups in the scenegraph under the same main camera, they will be cliped by the 
same cullsettings(the same near far clip planes), the problem is still here. 
Then can we render them with different cullsettings?

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





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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread Ren Liwei
Thank you Maria, your method should work well in most circumstance. But, my sky 
sphere whick has a very large radius would surely be cliped by the far plane in 
that, and that's not what i want to see. Any ideas to solve it? 

Thank you,
RenLiwei

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





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


[osg-users] a problem with computing near far

2009-06-29 Thread Ren Liwei
Hi,
  In my scene there is an earth and some small models on it.  Sometimes i've 
got a screenshot like the attachment when i turn auto-compute near far on. 
  I known that's becuase the auto-computed near plane is too far to let nearer 
primitives in. So i tried giving a very little nearfarratio and then it worked 
somewhat. But when i added an even larger sky sphere into the scene, once again 
i fall into trouble with near far.
  So what should i do with near far when there are both very near(less then 1) 
and far away(far then 1) things to show in the secen.

Thank you!

Cheers,
indif

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



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