Re: [osg-users] Transformations using Quat and Mat

2017-11-14 Thread tianzjyh
Hi, Maurus, I think it's the order of the multiplies. It should be like vec*MatA*MatB, If you want to apply an osg::Matrix on a osg::Vec. But I do not quiet know why osg::Quat does not obey this: for a osg::Quat, the form quat * vec is used.___

Re: [osg-users] [3rdparty] ImGui integration

2017-11-09 Thread tianzjyh
Great work!! Thanks. -- Cheers, TianZJ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] "Memory: Colors" game from scratch

2017-10-30 Thread tianzjyh
wonderful ! -- Cheers, TianZJ At 2017-10-28 19:18:01, "michael kapelko" wrote: >Hi. > >You may remember that some time earlier this year I've posted about >OpenSceneGraph cross-platform guide ( >https://github.com/OGStudio/openscenegraph-cross-platform-guide ) that

Re: [osg-users] Non-convex polytope picking

2017-09-14 Thread tianzjyh
Hi, Antoine, Yes, I think so, you have to split the non-convex polygon. Convex polygon is convenient to do point-containing test since it is just an AND-combination of half-space. But non-convex polygon is not that simple. -- Cheers, --- TianZJ At 2017-09-15 01:34:44, "Antoine

Re: [osg-users] Efficient way to swap colors

2017-09-05 Thread tianzjyh
Hi, Antoine, I think changing the material of the geometry will be more efficient. Have a look at examples about osg::Material :) -- Cheers, TianZJ At 2017-09-06 00:31:11, "Antoine Rennuit" wrote: >In order to achieve this I thought of using the

Re: [osg-users] Can see parts of the back side of a model

2017-08-23 Thread tianzjyh
Hi, Clay, Could you please attach a picture relative to the problem. Also, could you please describe what is the model's behavior under normal OSG, saying it viewed by "osgviewer.exe". -- Cheers, --- TianZJ At 2017-08-24 08:09:23, "Bruce Clay" wrote: >I am using

Re: [osg-users] RenderBin vs. SlaveCamera

2017-08-03 Thread tianzjyh
hi Modenbach, My approach is to use a separate camera(not a slave camera) different with the main camera, and add it to the root node. In my opinion, there is little difference between these different approaches, since they will all be treated as elements in scene graph and state graph.

Re: [osg-users] converting node coordinates

2017-06-23 Thread tianzjyh
Hi, Oliveira, I am not sure what exactly is causing the problem, but maybe it is the setVertexArray(). U should call VertexArray::dirty(),after you changed data in osg::Array at runtime, to tell the OSG to update corresponding data in the GPU memory. -- Cheers, --- TianZJ At

Re: [osg-users] how to convert osgb files to old version

2017-06-18 Thread tianzjyh
Hi, Yu, You can manually use osgconv.exe to convert between model files. Run "osgconv.exe --help" for help. Also, u can use osgDB::readNodeFile() and osgDB::writeNodeFile() respectively with filenames with proper extension, such as ".osg" and ".osgb". -- Cheers, --- TianZJ At

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread tianzjyh
Hi, Roko, Just check function osg::AutoTransform::setPosition(const Vec3d& pos), and try setting "pos" to (0,0,0), then maybe you will find a clue. -- Cheers, --- TianZJ At 2017-01-20 10:10:31, "Roko Talk" wrote: >Hi TianZJ, > >thank you for your reply

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread tianzjyh
hi, Roko, The example "osgautotransform" demonstrates different kinds of text auto-transform, e.g. ranged min-scale, max-scale, fixed position. If you are not sure about the implementation inside the source code, just try to combine the different kinds of texts inside the example, and

Re: [osg-users] Visualization of billboards depending on pre-conditions

2017-01-08 Thread tianzjyh
Hi, But why not do occlusion query every frame? Is there any problem? because multi-pass depth test should also be done every frame. -- Cheers, --- TianZJ At 2017-01-08 22:46:27, "Hartwig Wiesmann" wrote: >Hi Tian, > >an occlusion query is

Re: [osg-users] Visualization of billboards depending on pre-conditions

2017-01-08 Thread tianzjyh
Hi, Occlusion query is a better idea, especially for rendering many billboards. About the performance, here is a discussion, http://gamedev.stackexchange.com/questions/118651/opengl-occlusion-culling-huge-performance-drop which points out that calling all the queries together

Re: [osg-users] Visualization of billboards depending on pre-conditions

2017-01-07 Thread tianzjyh
Hi, Hartwig, I think you have to use multi-pass rendering to make this special depth test work. Here is my idea, pass 1: render foot separately to a texture without depth test, and writes only 1 or 0 to the texture, 1 while the pixel is part of foot, 0 otherwise. pass 2:

Re: [osg-users] How to draw 3D to screen

2017-01-06 Thread tianzjyh
Hi Philippe, Good joke! Thanks for your sharing article How To Ask Questions The Smart Way. Hope Rambabu and Bhanu would calm down and have a good look at it . -- Cheers, --- TianZJ At 2017-01-06 04:53:53, "philippe renon" wrote: Hi Robert,

Re: [osg-users] Draw Instanced intersections

2017-01-03 Thread tianzjyh
<bruno.manata.olive...@gmail.com> wrote: Hi TianZJ, Thanks for the quick answer. I checked the intersector, but intersector->getIntersections() returns no intersections at all. 2017-01-03 9:32 GMT+00:00 tianzjyh <tianz...@126.com>: Hi, Oliveira, You can check the in

Re: [osg-users] Draw Instanced intersections

2017-01-03 Thread tianzjyh
Hi, Oliveira, You can check the intersections of your intersector(e.g. LineSegmentIntersector::Intersection), and you will find they contain an "osg::NodePath", which means the whole path of the node(e.g. matrix transform nodes upon the drawable instance). -- Cheers, --- TianZJ At

Re: [osg-users] Texturing with GLBeginEndAdapter

2016-12-29 Thread tianzjyh
gl.Vertex3f(offset + x, y, Z); > gl.TexCoord2f(0.f, 1.f); > gl.Vertex3f(offset + x + w, y, Z); > gl.TexCoord2f(1.f, 1.f); > gl.Vertex3f(offset + x + w, y + h, Z); > gl.TexCoord2f(1.f, 0.f); > gl.Vertex3f(offset + x, y + h, Z

Re: [osg-users] Texturing with GLBeginEndAdapter

2016-12-29 Thread tianzjyh
Hi, Andersen, Let's say you have three images, then you can wrap them using osg::Texture2D, something like this: > >osg::Image* image0 = osgDB::readImageFile("filename0.xxx"); >osg::Texture2D* tex0 = new osg::Texture2D(image0); >tex1->setWrap(..., ...); >tex1->setFilter(..., ...); > And

[osg-users] Change Graphic Context Runtimely

2016-11-21 Thread tianzjyh
Hi, I found it difficult to achieve dynamic switching OpenGL context at run time. In the following code, I try to achieve this switching in a single thread(rendering thread not included), but I got a frozen window after pressing the switch key. My purpose is mainly to implement a