Re: [osg-users] Image containing floats

2018-09-20 Thread David Heitbrink
yes this is doable. You need to set the internal format to something like: 
GL_RGBA32F

and the source type to float on your texture.

You might look at the OSG forest example, and its use of osg::TextureBuffer. 
Basically with the forest example, its doing instancing where the transforms 
are loaded into a texture, and the data is used in the vertex shader.

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





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


Re: [osg-users] Image containing floats

2018-09-20 Thread ivar out
Hi,

I'm trying to generate my own lookup table containing floats and store it in an 
image, and apply it to a texture to send it to the shader. I am having issues 
with getting the image to store floats though. Is there any way to do so, or am 
I trying something impossible?

cheers,
Ivar

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





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


[osg-users] the speed of PagedLOD create nodes

2018-09-20 Thread Qi Liu
Hi,all
I am a new to OSG and I am not very good at English. I am grateful if you can 
give me some suggestions how to  increase the speed of creating nodes by 
PagedLOD. My problem is:
1)my scene model is very big, about 8 million nodes;
2)I can not load all the nodes at once(Memory will be very large,about 
12GB).Then I put a node in PagedLOD if the radius of the node's bounding box is 
lower than a fixed threshold(threshold =4), so the number of PageLod is 
very large,by this way the memory is lower.
3)I use: viewer.getDatabasePager()->setTargetMaximumNumberOfPageLOD(10) as 
the max num of PageLod nodes ,and I set the range to the node by setRange(0, 0, 
10)  which is much bigger than the radius of the node's bounding box, so 
the node can be create if the camera move near to it.
4) When the scene is rendered,some part of the scene is loading slowly.
5)I create a node by drawable and the time to create a node is about 0.01s.
6) my environment: WIN10 64bit  OSG 3.4  VS2017

The PagedLOD is multi-threaded? How can I make it faster to create the PagedLod 
nodes?

Thank you very much for reading my question!

Cheers,
QILIU

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





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