[osg-users] Help:why does renderbin affect the display of textures ?

2012-10-05 Thread wang shuiying
Hello, I have two drawable nodes A and B under the same main group node. I mapped two different textures on the drawables respectively. Those two drawables do not have any overlappings in terms of pixels on the screen. Drawable A is described using open scene graph library while drawable B

Re: [osg-users] Help:why does renderbin affect the display of textures ?

2012-10-08 Thread wang shuiying
Is nobody interested in this question?:-( Hello, I have two drawable nodes A and B under the same main group node. I mapped two different textures on the drawables respectively. Those two drawables do not have any overlappings in terms of pixels on the screen. Drawable A is described using open

[osg-users] Help:How many frames at most can be achieved within OSG framework?

2012-10-08 Thread wang shuiying
Hello, I am wondering how many frames at most can be achieved when a scene is rendered within OSG framework? Is it restricted by GPU performance or the operating system or OSG framework? Thank you very much in advance! Best regards Shuiying ___

[osg-users] Help: does the time difference between two successive update callback of one osg::node imply FPS?

2012-10-15 Thread wang shuiying
Hello, I have a very naive question. But I really need to make sure about it. In one osg::viewer thread, if the time difference between two successive update callbacks (or drawCallbacks)of one osg::node is equal to T(s), then can I say that the corresponding FPS of GPU is 1/T? Thank you

[osg-users] how to make gl_Color.a changeble through programmable fragment shader?

2011-10-26 Thread wang shuiying
Hello, I try to write information of other things rather than that of color into gl_FragColor through programmable fragment shader. e.g. gl_FragColor = vec4(0.1,0.2,0.3,0.2); However, whatever value I set gl_color.a(the fourth element above) through fragment shader, I get the

Re: [osg-users] how to make gl_Color.a changeble through programmable fragment shader?

2011-10-27 Thread wang shuiying
Hi, Robert Thank you for your reply. Sorry that I don't think I expressed my problem clearly. I want to simulate radar using osg camera. The important codes are: osg::Program * program = new osg::Program();

[osg-users] Is the displayProblem of osgtext already fixed?

2011-10-27 Thread wang shuiying
Hallo, The osgText on my program worked fine with old osgVersion, but now the text doesn't show up with osg 3.0.0. I notice that this problem was already discussed in July, but it seemed there was no fixed solution. What should I do now? Can anybody give any advice? Thank you very

[osg-users] Help: Data accuracy from Frame buffer is not very good

2011-11-29 Thread wang shuiying
Hallo, I want to simulate laser scanner using osg camera. In Fragment shader the color information is converted into position information. And then the position information is accessed from this Fragment to be used to draw points in a view. But the points are not so accurate, as it is

Re: [osg-users] Help: Data accuracy from Frame buffer is not very good

2011-11-29 Thread wang shuiying
Hello, J.P. Delport I followed your advice but it still doesn't work well. And I also changed the internal format of the Image as GL_RGBA32F_ARB, but the points remain the same. What is the name of the osgprerender example with the --hdr switch ? Thank you very much ! Shuiying

[osg-users] Help: can the fourth element of gl_FragColor be changed by shader?

2012-01-03 Thread wang shuiying
Hello, In my programme, the fourth element of gl_FragColor is changed by fragment shader to be a random number between 0 and 1. But when I access this element by the corresponding image, the element is always 1. I got to know that in the rendering pipeline after fragment operation, there

Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?

2012-01-03 Thread wang shuiying
Hello, (1)to J.P. the related source code is as following: // camera and image setup osg::Camera::RenderTargetImplementation renderTargetImplementation; renderTargetImplementation = osg::CameraNode::FRAME_BUFFER; osg::Program * program = new osg::Program();

Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?

2012-01-03 Thread wang shuiying
Hello, Sorry, the third line of 'access data' part should be : float color_a= color[3]; Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?

2012-01-04 Thread wang shuiying
, in send_error 'text/html') File /usr/lib/python2.5/site-packages/trac/web/chrome.py, line 684, in render_template data = self.populate_data(req, data) Best regards Shuiying On 01/04/2012 07:43 AM, J.P. Delport wrote: Hi, On 03/01/2012 23:39, wang shuiying wrote: Hello, (1)to J.P

Re: [osg-users] Help: can the fourth element of gl_FragColor be changed by shader?

2012-01-04 Thread wang shuiying
camera, not the main scene camera. Thank you very much again and Cheers Shuiying On 01/05/2012 07:48 AM, J.P. Delport wrote: Hi, On 04/01/2012 17:17, wang shuiying wrote: Hi, J.P. I am really confused now. I just want to get pre-rendering information from a camera through an image, which

[osg-users] Help:How to control rasterization stage through osg?

2012-01-10 Thread wang shuiying
Hello, we know that in openGL rendering pipeline, there is a stage called rasterization after per-vertex operation and before per-fragment operation. In rasterization stage, openGl generates certain properties (e.g. texture coordinates)for each fragment as a linear function of the eye-space

Re: [osg-users] Help:How to control rasterization stage through osg?

2012-01-10 Thread wang shuiying
@lists.openscenegraph.org Subject: Re: [osg-users] Help:How to control rasterization stage through osg? Message-ID:4f0c98cc.8010...@ist.ucf.edu Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 01/10/2012 02:55 PM, wang shuiying wrote: Hello, we know that in openGL rendering pipeline

Re: [osg-users] Help:How to control rasterization stage through osg?

2012-01-12 Thread wang shuiying
Hi, Thank you all a lot for your help. That really helps me a lot. Now I know that polygon triangulation and rasterization algorithms have something to do with the imperfectness of my programm. I have some other questions: (1) According to triangle raterization function (3.9), p185 in

[osg-users] Help: Is there an osg example with ray tracing?

2012-01-13 Thread wang shuiying
Hello, I simulate a laser sensor with shader using osg, and want to compare it with simulated laser sensor using ray tracing technique. So is there a ray tracing example of osg in such application? Thank you in advance! Shuiying ___ osg-users

[osg-users] Help:Is there a way for a single fragment to know its index during per-fragment operation?

2012-01-14 Thread wang shuiying
Hello, In fragment shader, I would like to chage the fragment colour according to the fragment's index. Here index means integer number pair(x,y), where 0xxRes, 0yyRes, provided that viewPort has xRes * yRes pixels. Is there a way to achieve that? Thank you in advance! Shuiying

[osg-users] Help: LineSegmentIntersector operates in GPU or CPU?

2012-01-16 Thread wang shuiying
Hello, I am really sorry to trouble you again with my naive questions. :-) (1)Where does LineSegmentIntersector carry out its intersection? In GPU or CPU? (2) How can I know which processes happen in GPU, which ones in CPU? (perhaps only draw traversal happens in GPU?) (3)How can I check the

[osg-users] Help:what is openGl shader version 140?

2012-01-17 Thread wang shuiying
Hello, my shader compile stage throws out such warnings: 0(8) : warning C7532: global type sampler2DRect requires #version 140 or later 0(8) : warning C: ... or #extension GL_ARB_texture_rectangle : enable and Then I add #version 140 #extension GL_ARB_texture_rectangle : enable at the

[osg-users] Help: wrong ouput from frag shader.

2012-01-17 Thread wang shuiying
Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image: float Vec4: (0.176471,0,0,1) so why 0.174977 changed into 0.176471? I think there should be no process there after per fragment operations that can change this element in the

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-18 Thread wang shuiying
Hello, Sebastian Thank you for your reply! In my programme, camera is set to be prerender, render target is FRAME_BUFFER_OBJECT, I attach the camera to an image, in order to get the bufferdata via image. (1) the fragment shader is as following: out vec4 Frag_Color; void main() {

Re: [osg-users] Help:what is openGl shader version 140?

2012-01-18 Thread wang shuiying
Hello Sebastian, You are right. I have other errors in the shader when such warnings happened. After I correct them, it works normal! Thank you very much for the explanation! Shuiying On 01/18/2012 08:04 AM, Sebastian Messerschmidt wrote: Hello shuiying, either your card doesn't support

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-18 Thread wang shuiying
Hello, Sebastian There is also another strange problem . When Vertex shader is as follows: varying out vec3 pos; varying out float dist2; void main() { vec3 pos1 = (gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).xyz;

Re: [osg-users] Help: wrong ouput from frag shader

2012-01-18 Thread wang shuiying
=flowed Hi, what format is the texture you are rendering to? If it is UNSIGNED CHAR then your data would be discretised. e.g. 45/255 = 0.176471 jp On 17/01/2012 21:11, wang shuiying wrote: Hello, when I write gl_FragColor = vec4(0.174977,0,0,1) in Frag shader, then I get through a related image

Re: [osg-users] Help: wrong ouput from frag shader

2012-01-19 Thread wang shuiying
Hi, J.P. Thank you very much, it works under your suggestion! Best regards Shuiying On 01/19/2012 07:39 AM, J.P. Delport wrote: Hi, On 18/01/2012 20:24, wang shuiying wrote: Hi, J.P. the camera isn't rendering to a texture. Yes it is. It is just made for you automatically. FBO renders

[osg-users] Help: how to getmore than four elements via fragment shader?

2012-01-29 Thread wang shuiying
Hello, I want to record more than four elements by writing to out variable in fragment shader. I notice that FBO can connect to many buffers, so I define two images which are respectively attached to a color buffer and a depth buffer. osg source code are as follows: osg::Image

[osg-users] Help: many cameras are rendering at the same time or one by one?

2012-01-30 Thread wang shuiying
Hello, My question might be silly, but I really want to know about that. I wonder if there are many cameras (one main camera + many pre render cameras), will OSG (or grahic hardware) manage to make these cameras render one by one or at the same time? I have a programm concerning leveraging

[osg-users] Help: why node update rate so low? update interval=300ms?

2012-02-04 Thread wang shuiying
Hello, This is somehow frustrating, if the rendering rate is the same with update rate. I check the update interval of the sceneNode in my application, it turns out to be 300ms. I only attach 51 3D models in my application. when there is only 5 3D models, the interval is 70ms. I just

Re: [osg-users] Help: why node update rate so low? update interval=300ms?

2012-02-04 Thread wang shuiying
Hello, Sebastian my model is simple 3D model like car (1MB), house(2~7MB). This application is a car simulator within the framework of OROCOS, which is a multi-task real time toolkit. OSG is used to display the simulator. I took a look at the root code just now (I only here take over the

Re: [osg-users] Help: why node update rate so low? update interval=300ms?

2012-02-06 Thread wang shuiying
? Thank you very much for any advice! Cheers Shuiying On 02/05/2012 12:11 AM, wang shuiying wrote: Hello, Sebastian Of course, I can share my models. They are all from free model website. attached are one house,7M, and 1 car. after I change the timer interval to 1, the time interval for osg

[osg-users] Help: problems of intersectorVisitor with Qtmutex

2012-02-22 Thread wang shuiying
Hello, My program has an osg::viewer as a view widget of a Qt window. An intersectorVisitor object is initialised at the start of the program. The osg::viewer updates its children nodes as a normal viewer does, and updates the transform matrix of intersectorVisitor at the same time. I

[osg-users] Help: intersectionVisitor in a separate working thread cannot work when it is to visit a view node

2012-04-01 Thread wang shuiying
Hello, In my programme, I have among others a view node and a thread. The geometries under the view node changes every frame. The thread controls the frequency at which an IntersectionVisitor visits the view node. However it turns out it doesn't work. When the intersectionVisitor is ready

[osg-users] Help:can cameras in different graphics contexts visit the a changing view node in a multi-threaded way?

2012-04-05 Thread wang shuiying
Hello, In my application, there are several pre-render cameras and a main camera. In order not to slow down the frame rate for the main camera, I would like to try to move the pre-render cameras out of the graphics context of the main camera, and into another graphics context. The view node

Re: [osg-users] Help: intersectionVisitor in a separate, working thread cannot work when it is to visit a view node

2012-04-07 Thread wang shuiying
Hello, Robert As you said, it is not safe to read for a data structure that is written to be another thread. But if something wrong happens, the programme might tell something when it is running. However in my case, the thread just stops at somewhere during the implementation of

[osg-users] Help: how does lightSource with referenceFrame of osg::LightSource::ABSOLUTE_RF work?

2012-05-18 Thread wang shuiying
Hello, I have 2 questions about the lightSource node. (1) Does lightSource affect all the geode nodes in the scenedata or only the ones that are under it in the sceneData structure? (2) In my application, a lightSource is attached to the main sceneNode, and this lightSource has a osg::group

[osg-users] Help:Mapping between vertices in eye coordinate and pixels on rendered image

2012-05-26 Thread wang shuiying
Hallo, I simulate a real camera with OSG camera node and for debugging I have some problem with the pixel location. I would like to know whether the following statement is correct or false: if coordinate of vertex in eye coordinate is (xe,ye,ze), and we assume that xe0,ye0,ze0, namely, the

Re: [osg-users] osg-users Digest, Vol 59, Issue 36

2012-05-28 Thread wang shuiying
Hello, Sergey Thank you very much for your reply. It helps a lot! Cheers, Shuiying On 05/28/2012 09:03 PM, osg-users-requ...@lists.openscenegraph.org wrote: Message: 2 Date: Mon, 28 May 2012 14:02:43 +0400 From: Sergey Polischukpol...@yandex.ru To: OpenSceneGraph

Re: [osg-users] Help: intersectionVisitor in a separate working thread cannot work when it is to visit a view node

2012-05-29 Thread wang shuiying
Hello, Robert Sorry for the late response. But I still cannot figure out why the thread calling viewNode-accept(IntersectionVisitor) just stops there without going any further. I took a look at the source code of accept() function as well as the frame() function of viewer, but I didn't find

[osg-users] Help:Problem with LineSegmentIntersector. Maybe a bug?

2012-05-31 Thread wang shuiying
Hello, In osgUtils::LineSegmentIntersector, there is a function enter() which invokes function intersects( node.getBound()) . That serves to check whether the LineSegment has intersection with the bounding sphere of the node. However, if I put LineSegmentIntersector into a

[osg-users] Help: Is there a way to hide a node from a camera?

2012-07-02 Thread wang shuiying
Hello, The scene graph structure is as following: Nodes B and C are children of Transform Node A. Node A is attached to two camera nodes CamA and CamB(pre render). I want CamA to be able to render B and C, but CamB only B. Is there a way to achieve that without using fragment shader with

Re: [osg-users] osg-users Digest, Vol 61, Issue 2

2012-07-02 Thread wang shuiying
@lists.openscenegraph.org Subject: Re: [osg-users] Help: Is there a way to hide a node from a camera? Message-ID: cagoufmyryvhpqfuxbxvsgq1h1sesuedw4cdribrunnytgvt...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 On Mon, Jul 2, 2012 at 10:51 AM, wang shuiying shuiying.w...@fu-berlin.dewrote: Hello

[osg-users] Help: is prerender camera regarded as slave camera during rendering traversal?

2012-08-30 Thread wang shuiying
Hello everyone, I would like to know where the prerender camera is rendered in OSG. Is prerender camera regarded as slave camera during rendering traversal of viewer? Is there a way to directly render a prerender camera at any time I want ? That is, not at a tempo of 60 Frame per second.