[osg-users] Verify hardware instancing capabilities

2015-09-04 Thread Mateusz Janiak
Hi, I was going through forum but could not find an answer for a simple question - how to detect if current system/graphic card supports hardware instancing? I want to know this to provide a proper factory for scene objects to provide maximum performance (HW if possible, software otherwise).

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
Hi, I have implemented the simplest fragment shader applying only particular color to my primitives as this was sufficient. However now I want to create a composition of a simple osg::ShapeDrawable for a osg::Box and my instanced material (spheres), where Box should be semitransparent and so

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
[quote=SMesserschmidt] When you use instanced drawing you cannot have correct semi-transparent objects, as there is no sorting involved. One option is to sort your instanced obejcts in every frame or to use some order independent transparency approach. [quote] Could You provide me avaiable

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
Hi Sebastian , Well, I need instancing as I render about 1M spehers presenting material atoms structure. The Box I want to add is just a marker for a part of the whole material, so user can focus easier on it. Moreover, box will always contain instanced spheres inside, so the order is somehow

Re: [osg-users] [forum] Instanced drawing

2013-09-16 Thread Mateusz Janiak
Hi Sebastian, Thank You for Your suggestions. I will try their various combonations to distinguish which one gives the closest results to what I wanted to achieve. ... Thank you! Cheers, Mateusz -- Read this topic online here:

Re: [osg-users] [forum] Instanced drawing

2013-08-12 Thread Mateusz Janiak
Jordi Torres wrote: Did you tried to add normals to the instaced geometry? Yes, I add normals. Do You think I should modify fragment shader to calculate light there? If I skip fragment shader at all then speheres are always black independently how would I try to apply some

Re: [osg-users] [forum] Instanced drawing

2013-08-11 Thread Mateusz Janiak
Ok, Jordi solution wokrs like a charm, I had only to disable culling on drawable, so that its all hardware instanced objects are not culled when original is not visible. I have another problem now - how to apply Material and Light to such a drawable so that it is populated with hardware

Re: [osg-users] [forum] Instanced drawing

2013-08-06 Thread Mateusz Janiak
, if you need more you should use a TextureBufferObject. I've attached a simple example getting postions from a texture 1D. The TransferFunction used is not necessary. Hope it helps. 2013/6/20 Mateusz Janiak () Hi, I have a large static scene to render - it will not change

[osg-users] [forum] Instanced drawing

2013-07-31 Thread Mateusz Janiak
Hi, I have a large static scene to render - it will not change in time. It can contain even 1M spheres representing atoms in a particular material. I have read a lot about instanced drawing and went through examples: osgdrawinstanced osgshaders but I can not to figure out how can I pass world