[osg-users] LOD capabilities

2016-04-26 Thread Bruno Oliveira
Hello,

I am thinking of porting my code for representing a huge point cloud scene
from a simple osg::Group/osg::Node structure to a PagedLOD. This is due to
the fact that I can't

I have built a custom octree for this purpose (I could probably publish it
in the future if it would be useful for the OSG lib).

My problem is that I need to perform some cloud manipulations, e.g. delete
points, add more points, perform picking...

   1. Would this be possible using the OSG PagedLOD node structure? Or is
   it better to do all these operations on my own?
   2. Would this be possible without ever loading the entire cloud at once
   (with the already existing code)? How much would this affect the overall
   picking performance, etc?
   3. I still don't understand OSG Point Picking very well. Are there any
   good examples on this?

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


Re: [osg-users] crash after resizing high resolutions

2016-04-26 Thread Robert Osfield
On 26 April 2016 at 07:57, Sebastian Schmidt 
wrote:

> OS is Ubuntu 14.04 and OSG 3.0.1. GeForce GTX 750, Intel Xeon E3-1200
> Im currently unable to use the 4k monitor and to report stack trace.
>

How much memory does your system have?

Do other 3D applications work OK on the system?

Have you tried a more up to date version of the OSG?

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


Re: [osg-users] LOD capabilities

2016-04-26 Thread Robert Osfield
Hi Bruno,

On 26 April 2016 at 09:20, Bruno Oliveira 
wrote:

> I am thinking of porting my code for representing a huge point cloud scene
> from a simple osg::Group/osg::Node structure to a PagedLOD. This is due to
> the fact that I can't
>
> I have built a custom octree for this purpose (I could probably publish it
> in the future if it would be useful for the OSG lib).
>
> My problem is that I need to perform some cloud manipulations, e.g. delete
> points, add more points, perform picking...
>
>1. Would this be possible using the OSG PagedLOD node structure? Or is
>it better to do all these operations on my own?
>
> You can use PagedLOD, but you'll need to write a tool to pre-process the
raw data into a hierachy of tiles that the PagedLOD's will reference.



>
>1.
>2. Would this be possible without ever loading the entire cloud at
>once (with the already existing code)?
>
> How long is the piece of string I have in my hand?  Please answer this
question within 1cm of accuracy without asking any further questions.

If you find this question difficult to answer then you'll understand why we
don' have hope in hell of answering your question.

Please state size of your datasets.

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


Re: [osg-users] LOD capabilities

2016-04-26 Thread Bruno Oliveira
Robert,

the tool I'm creating is designed to handle clouds from 100 million points
to 1 billion, hence the out of core rendering.
By "with the already existing code", I mean code from OSG.

Thank you

2016-04-26 9:40 GMT+01:00 Robert Osfield :

> Hi Bruno,
>
> On 26 April 2016 at 09:20, Bruno Oliveira  > wrote:
>
>> I am thinking of porting my code for representing a huge point cloud
>> scene from a simple osg::Group/osg::Node structure to a PagedLOD. This is
>> due to the fact that I can't
>>
>> I have built a custom octree for this purpose (I could probably publish
>> it in the future if it would be useful for the OSG lib).
>>
>> My problem is that I need to perform some cloud manipulations, e.g.
>> delete points, add more points, perform picking...
>>
>>1. Would this be possible using the OSG PagedLOD node structure? Or
>>is it better to do all these operations on my own?
>>
>> You can use PagedLOD, but you'll need to write a tool to pre-process the
> raw data into a hierachy of tiles that the PagedLOD's will reference.
>
>
>
>>
>>1.
>>2. Would this be possible without ever loading the entire cloud at
>>once (with the already existing code)?
>>
>> How long is the piece of string I have in my hand?  Please answer this
> question within 1cm of accuracy without asking any further questions.
>
> If you find this question difficult to answer then you'll understand why
> we don' have hope in hell of answering your question.
>
> Please state size of your datasets.
>
> Robert
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] LOD capabilities

2016-04-26 Thread Robert Osfield
Hi Bruno,

On 26 April 2016 at 16:04, Bruno Oliveira 
wrote:

> the tool I'm creating is designed to handle clouds from 100 million points
> to 1 billion, hence the out of core rendering.
> By "with the already existing code", I mean code from OSG.
>

100 million to 1 billion does qualify as "huge" point cloud.

The issues aren't directly related to the OSG, but how to manage that
amount of data on disk, in main memory and on the GPU.  The OSG itself can
be used to start the data in main memory, on the GPU, and even provide
mechanisms for paging data in out from disk (via PagedLOD/DatabasePager).
You will be responsible for how you set up the scene graph, how you do this
is the crux of the task, it's not trivial given the amount of data you are
dealing with.

When learning what can be done you need to start doing the maths on how
much memory each point in your cloud requires. A single vec3 for each point
for 100 million points requires 1.2 GB, 1 bilion requires 12GB.  When
passing data to OpenGL you need to put the data into OpenGL FIFO which then
gets passed in driver memory.  If you are using VBO's then you'll end
potentially with one copy of data in application memory, one in driver
memory, and then when it finally gets rendered a copy on the GPU too.  This
means we'll need at least 2.4GB main memory and 1.2GB on the GPU just for
100 million vertices - this without anything else.

This is without any colours, normals or textures.  You haven't mentioned
anything about these, perhaps you should... as it makes a big difference to
the memory footprint we are talking about.  I'm not expecting that you'll
just have white points...

So when you start asking can the OSG do it, you can get it to scale to
handling multi-terrabyte databases thanks to the built in paging support,
but only if you give it an appropriately built scene graph - point clouds
are a niche that doesn't have open source tools that will build the
database for you.  You need to be realistic about the memory management,
handling really large amounts of data requires far more skills than just
rendering a few pretty textured polygons.  I don't know what your
background knowledge, what can we assume?

If you don't have the skills right now then you'll need patiently develop
them OR just pay a 3rd party engineer who has the skills to work with you
on it.

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


Re: [osg-users] LOD capabilities

2016-04-26 Thread Jason Beverage
Hi Bruno,

We have a point cloud capability that we've developed here at Pelican
Mapping that integrates nicely with osgEarth.  You can see a video of it in
action here https://youtu.be/lUeF4Y8yGNI rendering around 5 billion
points.  We can easily perform picking on individual points so you can get
all the information about the point (location, RGB, intensity, etc) but we
don't have any support for modifying the point cloud (although that is
something we could add).  Editing a giant paged dataset would take some
special consideration, but it's definitely doable.

Let me know if you want anymore information, happy to chat sometime.

Thanks!

Jason

On Tue, Apr 26, 2016 at 11:28 AM Robert Osfield 
wrote:

> Hi Bruno,
>
> On 26 April 2016 at 16:04, Bruno Oliveira  > wrote:
>
>> the tool I'm creating is designed to handle clouds from 100 million
>> points to 1 billion, hence the out of core rendering.
>> By "with the already existing code", I mean code from OSG.
>>
>
> 100 million to 1 billion does qualify as "huge" point cloud.
>
> The issues aren't directly related to the OSG, but how to manage that
> amount of data on disk, in main memory and on the GPU.  The OSG itself can
> be used to start the data in main memory, on the GPU, and even provide
> mechanisms for paging data in out from disk (via PagedLOD/DatabasePager).
> You will be responsible for how you set up the scene graph, how you do this
> is the crux of the task, it's not trivial given the amount of data you are
> dealing with.
>
> When learning what can be done you need to start doing the maths on how
> much memory each point in your cloud requires. A single vec3 for each point
> for 100 million points requires 1.2 GB, 1 bilion requires 12GB.  When
> passing data to OpenGL you need to put the data into OpenGL FIFO which then
> gets passed in driver memory.  If you are using VBO's then you'll end
> potentially with one copy of data in application memory, one in driver
> memory, and then when it finally gets rendered a copy on the GPU too.  This
> means we'll need at least 2.4GB main memory and 1.2GB on the GPU just for
> 100 million vertices - this without anything else.
>
> This is without any colours, normals or textures.  You haven't mentioned
> anything about these, perhaps you should... as it makes a big difference to
> the memory footprint we are talking about.  I'm not expecting that you'll
> just have white points...
>
> So when you start asking can the OSG do it, you can get it to scale to
> handling multi-terrabyte databases thanks to the built in paging support,
> but only if you give it an appropriately built scene graph - point clouds
> are a niche that doesn't have open source tools that will build the
> database for you.  You need to be realistic about the memory management,
> handling really large amounts of data requires far more skills than just
> rendering a few pretty textured polygons.  I don't know what your
> background knowledge, what can we assume?
>
> If you don't have the skills right now then you'll need patiently develop
> them OR just pay a 3rd party engineer who has the skills to work with you
> on it.
>
> Robert.
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::CoordinateSystemNode

2016-04-26 Thread Alex Chen
Hi all,

I get the same problem with BVH plug in when using CMU dataset.
Below is my minor fix to the code and it seems to work for several motions I 
loaded.

File attached.
Main changes:
typedef std::pair, std::pair 
> JointNode;

void alterChannel( std::string name, std::pair& p )
{
int& value = p.first;
std::string& str = p.second;

if  ( name=="Xposition" ) value |= 0x01;
else if ( name=="Yposition" ) value |= 0x02;
else if ( name=="Zposition" ) value |= 0x04;
else if ( name=="Zrotation" ) {value |= 0x08; 
str.push_back('Z');}
else if ( name=="Xrotation" ) {value |= 0x10; 
str.push_back('X');}
else if ( name=="Yrotation" ) {value |= 0x20; 
str.push_back('Y');}
}

void setKeyframe( osgDB::Input& fr, int ch, const std::string& order, 
double time,
  osgAnimation::Vec3KeyframeContainer* posKey,
  osgAnimation::QuatKeyframeContainer* rotKey )
{
if ( ch&0x07 && posKey )  // Position keyframe
{
float keyValue[3] = { 0.0f };
if ( ch&0x01 ) fr.readSequence( keyValue[0] );
if ( ch&0x02 ) fr.readSequence( keyValue[1] );
if ( ch&0x04 ) fr.readSequence( keyValue[2] );

osg::Vec3 vec( keyValue[0], keyValue[1], keyValue[2] );
posKey->push_back( osgAnimation::Vec3Keyframe(time, vec) );
}

if ( ch&0x38 && rotKey )  // Rotation keyframe
{
osg::Matrix rotMat;
float keyValue[3] = { 0.0f };
for(int i = 0; i < order.size(); ++i) {
char f = order[i];
if(f == 'X') {
if ( ch&0x10 ) fr.readSequence( 
keyValue[0] );
rotMat = 
osg::Matrix::rotate(osg::DegreesToRadians(keyValue[0]), osg::Vec3(1.0,0.0,0.0)) 
* rotMat;
}
else if(f == 'Y') {
if ( ch&0x20 ) fr.readSequence( 
keyValue[1] );
rotMat = 
osg::Matrix::rotate(osg::DegreesToRadians(keyValue[1]), osg::Vec3(0.0,1.0,0.0)) 
* rotMat;
}
else if(f == 'Z') {
if ( ch&0x08 ) fr.readSequence( 
keyValue[2] );
rotMat = 
osg::Matrix::rotate(osg::DegreesToRadians(keyValue[2]), osg::Vec3(0.0,0.0,1.0)) 
* rotMat;
}
}
osg::Quat quat = rotMat.getRotate();
rotKey->push_back( osgAnimation::QuatKeyframe(time, 
quat) );
}
}

There are a few other places that can be seen by compared files.


Cheers,
Alex

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




Attachments: 
http://forum.openscenegraph.org//files/readerwriterbvh_198.cpp


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


Re: [osg-users] about the state of the BVH plug-in, when used with CMU MoCap files

2016-04-26 Thread Alex Chen
Hi all,

I get the same problem with BVH plug in when using CMU dataset.
Below is my minor fix to the code and it seems to work for several motions I 
loaded.

File attached.
Main changes:
typedef std::pair, std::pair 
> JointNode;

void alterChannel( std::string name, std::pair& p )
{
int& value = p.first;
std::string& str = p.second;

if  ( name=="Xposition" ) value |= 0x01;
else if ( name=="Yposition" ) value |= 0x02;
else if ( name=="Zposition" ) value |= 0x04;
else if ( name=="Zrotation" ) {value |= 0x08; 
str.push_back('Z');}
else if ( name=="Xrotation" ) {value |= 0x10; 
str.push_back('X');}
else if ( name=="Yrotation" ) {value |= 0x20; 
str.push_back('Y');}
}

void setKeyframe( osgDB::Input& fr, int ch, const std::string& order, 
double time,
  osgAnimation::Vec3KeyframeContainer* posKey,
  osgAnimation::QuatKeyframeContainer* rotKey )
{
if ( ch&0x07 && posKey )  // Position keyframe
{
float keyValue[3] = { 0.0f };
if ( ch&0x01 ) fr.readSequence( keyValue[0] );
if ( ch&0x02 ) fr.readSequence( keyValue[1] );
if ( ch&0x04 ) fr.readSequence( keyValue[2] );

osg::Vec3 vec( keyValue[0], keyValue[1], keyValue[2] );
posKey->push_back( osgAnimation::Vec3Keyframe(time, vec) );
}

if ( ch&0x38 && rotKey )  // Rotation keyframe
{
osg::Matrix rotMat;
float keyValue[3] = { 0.0f };
for(int i = 0; i < order.size(); ++i) {
char f = order[i];
if(f == 'X') {
if ( ch&0x10 ) fr.readSequence( 
keyValue[0] );
rotMat = 
osg::Matrix::rotate(osg::DegreesToRadians(keyValue[0]), osg::Vec3(1.0,0.0,0.0)) 
* rotMat;
}
else if(f == 'Y') {
if ( ch&0x20 ) fr.readSequence( 
keyValue[1] );
rotMat = 
osg::Matrix::rotate(osg::DegreesToRadians(keyValue[1]), osg::Vec3(0.0,1.0,0.0)) 
* rotMat;
}
else if(f == 'Z') {
if ( ch&0x08 ) fr.readSequence( 
keyValue[2] );
rotMat = 
osg::Matrix::rotate(osg::DegreesToRadians(keyValue[2]), osg::Vec3(0.0,0.0,1.0)) 
* rotMat;
}
}
osg::Quat quat = rotMat.getRotate();
rotKey->push_back( osgAnimation::QuatKeyframe(time, 
quat) );
}
}

There are a few other places that can be seen by compared files.


Cheers,
Alex

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




Attachments: 
http://forum.openscenegraph.org//files/readerwriterbvh_119.cpp


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


[osg-users] Using OSG in Native Client

2016-04-26 Thread Yichen He
Hi,

I am trying to building my OSG application on browser. Is it possible to use 
the OSG libs in Native Client or Portable Native Client  application? There 
aren't many topics discussing Nacl and OSG in this forum and they were posted 
in 2011 and 2010. 

If there is a way of using OSG on NaCl, can I use the OSG directly in the cc 
file in NaCl.
Or I need to port the OSG and use it.
... 

Thank you!

Cheers,
Echan

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





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


[osg-users] osg, qt5, multithreading

2016-04-26 Thread Roozbeh Sharlune
Hi,

I'm confused with different posts about osg and Qt5's problem with 
multithreading. So, sorry for the silly question: Is there finally a solution 
for using osg and Qt5 (5.6) together with multithreading?
I still get the error "Cannot make QOpenGLContext current in a different thread"
So far the best solution I've found is Martin Scheffler's, here:
form viewtopic.php?t=13602 (can't post URL's yet!!)
But I can't get it to work in my more complex program (at least yet)

Thanks a lot

Best regards,
Roozbeh

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





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


[osg-users] Qt OpenGL Warning opengl

2016-04-26 Thread Auke-Dirk Pietersma
Hi All ,

I have the following issue. Whenever i choose to render a scene with opengl 
greater than 2.1 i get the following messages.

Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xb50
Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0x4000
Warning: detected OpenGL error 'invalid operation' after applying attribute 
LightModel 

Not only do i obtain these messages, the scene also does not get rendered.

Nothing fancy has been done, see this init snippet:

 graphicsWindow_ = new osgViewer::GraphicsWindowEmbedded( this->x(), 
this->y(),this->width(),this->height() );
viewer_ = new osgViewer::Viewer;

osg::Camera* camera = new osg::Camera;
camera->setViewport( 0, 0, this->width(), this->height() );
float aspectRatio = static_cast( this->width()) / 
static_cast( this->height() );
camera->setClearColor( osg::Vec4( 0.f, 0.f, 1.f, 1.f ) );
camera->setProjectionMatrixAsPerspective( 30.f, aspectRatio, 1.f, 1000.f );
camera->setGraphicsContext( graphicsWindow_ );
viewer_->setCamera(camera);

_earthManip = new osgEarth::Util::EarthManipulator;

viewer_->setCameraManipulator(_earthManip, false);
viewer_->addEventHandler(new osgViewer::StatsHandler);


osg::ref_ptr group = new osg::Group();
_mapNode = createMapNode();
group->addChild(_mapNode);
_earthManip->setNode( _mapNode->getTerrainEngine() );

viewer_->setSceneData(group.release());

I'm Working on Linux with Qt5.6 on an ATI HAWAII , Radeon R9 Series.

Can someone provide me with some hints/tips?

Regards Auke-Dirk
... 

Thank you!

Cheers,
Auke-Dirk

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





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


Re: [osg-users] Using OSG in Native Client

2016-04-26 Thread Chris Hanson
I think you could do what you're looking for, but perhaps it's not the best
idea. Tell us more of what your trying to actually accomplish and maybe we
can suggest the best approach.

On Tue, Apr 26, 2016 at 8:11 AM, Yichen He  wrote:

> Hi,
>
> I am trying to building my OSG application on browser. Is it possible to
> use the OSG libs in Native Client or Portable Native Client  application?
> There aren't many topics discussing Nacl and OSG in this forum and they
> were posted in 2011 and 2010.
>
> If there is a way of using OSG on NaCl, can I use the OSG directly in the
> cc file in NaCl.
> Or I need to port the OSG and use it.
> ...
>
> Thank you!
>
> Cheers,
> Echan
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66964#66964
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Code Forensics • Digital Imaging • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ShaderComposer::releaseGLObjects warning

2016-04-26 Thread Andy Skinner
Thanks for that fix.  There is a remaining issue, and I'm not sure if you would 
see it as a bug or a dodgy compiler warning.  :)

We get a similar message about osgUtil::CullVisitor::clone().

NodeVisitor uses META_Object, which brings in:
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new name 
(*this,copyop); }

But CullVisitor defines clone as:
virtual CullVisitor* clone() const { return new CullVisitor(*this); }

They differ in whether they take an argument.  I believe we've discussed this 
kind of thing before when considering using "using", and it was, if I remember 
correctly, a dodgy compiler warning then.

thanks
andy


From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Robert Osfield
Sent: Monday, April 18, 2016 4:05 PM
To: OpenSceneGraph Users 
Subject: Re: [osg-users] ShaderComposer::releaseGLObjects warning

On 18 April 2016 at 20:30, Robert Osfield 
mailto:robert.osfi...@gmail.com>> wrote:
Hi Jannik and Ulrich,
You are right it's a bug, the missing const is an error, rather than the 
missing virtual.  I've fixed this and rewritten the implementation of 
ShaderCompose::releaseGLObjects() const.
I need to do a build and test before checking it in.

Now checked into OpenSceneGraph-3.4 and master.
I am bit concerned that this fix breaks the ABI of 3.4 though...  Would 
changing const affect the ABI?  I'm thinking yes, but it's too late in the 
evening for me to go and search for an answer...
Robert.

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


[osg-users] Question about OSG 3.4 doxygen

2016-04-26 Thread Alex Taylor
When you search for OSG documentation questions either using google or the
openscenegraph website, all the links are to the OSG 3.2 doxygen.

Is there a web hosted location where the OSG 3.4 generated oxygen is
available?

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


[osg-users] osgVolume::MultipassTechnique use

2016-04-26 Thread Alex Taylor
Hey all,

I'm running into a segmentation violation when I attempt to use
osgVolume::MultipassTechnique more or less as a drop in replacement for
RayTracedTechnique using OSG 3.4. My use of RayTracedTechnique works and
renders fine.

Here is an partial code listing demonstrating my use of MultipassTechnique:

*void setVolumeProperties(osg::ref_ptr
volume,osg::ref_ptr tile,*
*osg::ref_ptr layer,
VolumePropertyManager &volumeProperties,
osg::ref_ptr volumeScene)*
*{*

*// FixedFunctionTechnique turns on GL_LIGHTING, which breaks the
color rendering.*
*osg::StateSet* stateset = volume->getOrCreateStateSet();*

*if (volumeProperties.volumeTechnique ==
VolumeTechnique::RayTraced){*
*osg::ref_ptr rayTraced = new
osgVolume::RayTracedTechnique();*
*tile->setVolumeTechnique(rayTraced.get());*
*osg::ref_ptr frontFace(new
osg::FrontFace(osg::FrontFace::CLOCKWISE));*
*stateset->setAttribute(frontFace.get(),
osg::StateAttribute::PROTECTED);*
*layer->addProperty(new
osgVolume::SampleDensityWhenMovingProperty(volumeProperties.sampleDensityWhenMoving));*
*layer->addProperty(new
osgVolume::SampleDensityProperty(volumeProperties.sampleDensity));*
*} else if (volumeProperties.volumeTechnique ==
VolumeTechnique::Multipass) {*
*osg::ref_ptr multipass = new
osgVolume::MultipassTechnique();*
*tile->setVolumeTechnique(multipass.get());*
*volumeScene->addChild(volume.get());*
*volume->getOrCreateStateSet();*
*layer->addProperty(new osgVolume::SampleRatioProperty(1.0f));*
*layer->addProperty(new
osgVolume::SampleRatioWhenMovingProperty(0.5f));*

*} else if (volumeProperties.volumeTechnique ==
VolumeTechnique::FixedFunction) {*
*tile->setVolumeTechnique(new
osgVolume::FixedFunctionTechnique());*
*stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF |
osg::StateAttribute::OVERRIDE);*
*} else {*
*throw hg::PropertyException("VolumeTechnique");*
*}*

*layer->addProperty(new
osgVolume::TransferFunctionProperty(volumeProperties.transferFunction.get()));*
*layer->addProperty(new
osgVolume::AlphaFuncProperty(volumeProperties.alphaFunc));*
*if (volumeProperties.useLighting) layer->addProperty(new
osgVolume::LightingProperty);*
*if (volumeProperties.useIsosurface) layer->addProperty(new
osgVolume::IsoSurfaceProperty(volumeProperties.alphaFunc));*
*if (volumeProperties.useMaximumIntensityProjection)
layer->addProperty(new osgVolume::MaximumIntensityProjectionProperty());*
*}*

The following function returns the Node * that will be passed to the
viewer. I either return a osgVolume::Volume * or osgVolume::VolumeScene *
object depending on whether I'm using multipass rendering as my Node *.

*osg::Node* BP_createPeerHelper(Volume& v,*
*hg::SceneClient& client,*
*const gui_objects::Cookie& owner,*
*hg::UpdateState& us) {*

*osg::ref_ptr volume = new osgVolume::Volume;*
*osg::ref_ptr volumeScene = new
osgVolume::VolumeScene;*

*const mxArray* data = v.getData();*
*VolumePropertyManager volumeProperties(v,us);*

*if (data != NULL && mxGetNumberOfDimensions(data) == 3 &&
mxGetClassID(data) == mxUINT8_CLASS) {*


*osg::ref_ptr tile = new
osgVolume::VolumeTile;*
*volume->addChild(tile.get());*

*// If we are using FixedFunctionTechnique, we need to apply
the transfer function to get a new allocated RGBA memory on the CPU to pass
to OSG.*
*// Otherwise, we can pass the intensity data directly to the
card. GPU shaders does the RGBA directly.*
*osg::ref_ptr intensityImage =
createTexture3D(data);*
*osg::ref_ptr image_3d =
(volumeProperties.volumeTechnique == VolumeTechnique::FixedFunction) ?*
*
osgVolume::applyTransferFunction(intensityImage.get(),volumeProperties.transferFunction.get())
:*
*
intensityImage.release();*

*osg::ref_ptr layer = new
osgVolume::ImageLayer(image_3d);*
*tile->setLayer(layer.get());*

*
setVolumeProperties(volume,tile,layer,volumeProperties,volumeScene);*

*// Our original implementation positioned the bbox [-0.5,0.5]
in each dimension.*
*// FixedFunctionTechnique applies the locator matrix to the a
unit cube [0 1] in each dimension.*
*// To get the equivalent spatial referencing, apply a
translation of -0.5 to each dimension.*
*osg::ref_ptr matrix = new osg::RefMatrix();*
*matrix->makeTranslate(-0.5,-0.5,-0.5);*

*tile->setLocator(new osgVolume::Locator(*matrix));*

*}*
*else {*
*throw hg::PropertyException("Data");*
*}*

*std::cout << "volumeScene pointer: " << volumeScene.get() <<
std::endl;*

*if (volumeProperties.volumeTechnique ==
V

Re: [osg-users] Question about OSG 3.4 doxygen

2016-04-26 Thread Jordi Torres
Hi Alex,

Good point, I didn't notice it. I will upload the 3.4 docs ASAP.

Thanks.

2016-04-26 22:06 GMT+02:00 Alex Taylor :

> When you search for OSG documentation questions either using google or the
> openscenegraph website, all the links are to the OSG 3.2 doxygen.
>
> Is there a web hosted location where the OSG 3.4 generated oxygen is
> available?
>
> - Alex
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


Re: [osg-users] Question about OSG 3.4 doxygen

2016-04-26 Thread Jordi Torres
Hi again,

Done. Tell me if you see something not working as it should.

http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/index.html

Cheers.

2016-04-26 22:40 GMT+02:00 Jordi Torres :

> Hi Alex,
>
> Good point, I didn't notice it. I will upload the 3.4 docs ASAP.
>
> Thanks.
>
> 2016-04-26 22:06 GMT+02:00 Alex Taylor :
>
>> When you search for OSG documentation questions either using google or
>> the openscenegraph website, all the links are to the OSG 3.2 doxygen.
>>
>> Is there a web hosted location where the OSG 3.4 generated oxygen is
>> available?
>>
>> - Alex
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> Jordi Torres
>
>
>


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


Re: [osg-users] Question about OSG 3.4 doxygen

2016-04-26 Thread Jordi Torres
Just forget to say that OpenSceneGraph-3.2 documentation is in
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs-3.2/index.html

Cheers.

2016-04-26 22:59 GMT+02:00 Jordi Torres :

> Hi again,
>
> Done. Tell me if you see something not working as it should.
>
>
> http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/index.html
>
> Cheers.
>
> 2016-04-26 22:40 GMT+02:00 Jordi Torres :
>
>> Hi Alex,
>>
>> Good point, I didn't notice it. I will upload the 3.4 docs ASAP.
>>
>> Thanks.
>>
>> 2016-04-26 22:06 GMT+02:00 Alex Taylor :
>>
>>> When you search for OSG documentation questions either using google or
>>> the openscenegraph website, all the links are to the OSG 3.2 doxygen.
>>>
>>> Is there a web hosted location where the OSG 3.4 generated oxygen is
>>> available?
>>>
>>> - Alex
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>> --
>> Jordi Torres
>>
>>
>>
>
>
> --
> Jordi Torres
>
>
>


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


Re: [osg-users] OpenSceneGraph 3.4.0, latest git master: build of ffmpeg plugin fails after upgrade to ffmpeg 3.0+

2016-04-26 Thread David Evans
On 4/25/16 2:27 PM, Ben Woods wrote:
> Hi,
> 
> Please see attached a patch which allows openscenegraph to build successfully 
> against ffmpeg 3.0.x.
> 
> This was obtained from ArchLinux.
> 
> Cheers,
> Ben
> 

Thanks, Ben.  This patch, indeed, does the trick.  With patch applied, both OSG 
3.4.0 and OSG 3.5.2 git master
build correctly with either ffmpeg 2.8.6 or 3.0.1.  Now committed to MacPorts 
repository.

Dave

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


Re: [osg-users] Question about OSG 3.4 doxygen

2016-04-26 Thread Konstantin Podsvirov
Hi Jordi!

26.04.2016, 23:59, "Jordi Torres" :
> Hi again,
>
> Done. Tell me if you see something not working as it should.
>
> http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/index.html
>
> Cheers.

Thank you for the work done, but it looks bad for me. I would even say awful. 
:-(

For example, compare page "Namespaces" - terrible formatting. It's flowers.

The worst thing I saw: the description is missing some classes. For example 
osgViewer::View is not documented at all.
This is the first thing that caught my eye.

> 2016-04-26 22:40 GMT+02:00 Jordi Torres :
>> Hi Alex,
>>
>> Good point, I didn't notice it. I will upload the 3.4 docs ASAP.
>>
>> Thanks.
>>
>> 2016-04-26 22:06 GMT+02:00 Alex Taylor :
>>> When you search for OSG documentation questions either using google or the 
>>> openscenegraph website, all the links are to the OSG 3.2 doxygen.
>>>
>>> Is there a hosted web location where the OSG 3.4 generated oxygen is 
>>> available?
>>>
>>> - Alex
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>> --
>> Jordi Torres
>
> --
> Jordi Torres

I apologize for criticizing, but I hope it will be useful for the community.

Please note my contribution made recently: 
https://github.com/openscenegraph/OpenSceneGraph/pull/42

Maybe this will help, too.

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


Re: [osg-users] Question about OSG 3.4 doxygen

2016-04-26 Thread Konstantin Podsvirov
27.04.2016, 06:08, "Konstantin Podsvirov" :
> Hi Jordi!
>
> 26.04.2016, 23:59, "Jordi Torres" :
>> Hi again,
>>
>> Done. Tell me if you see something not working as it should.
>>
>> http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/index.html
>>
>> Cheers.
>
> Thank you for the work done, but it looks bad for me. I would even say awful. 
> :-(
>
> For example, compare page "Namespaces" - terrible formatting. It's flowers.

Here I take it back. The problem was with the caching of the styles in my 
browser (decided after pressing Crtl+R).

> The worst thing I saw: the description is missing some classes. For example 
> osgViewer::View is not documented at all.
> This is the first thing that caught my eye.
>
>> 2016-04-26 22:40 GMT+02:00 Jordi Torres :
>>> Hi Alex,
>>>
>>> Good point, I didn't notice it. I will upload the 3.4 docs ASAP.
>>>
>>> Thanks.
>>>
>>> 2016-04-26 22:06 GMT+02:00 Alex Taylor :
 When you search for OSG documentation questions either using google or the 
 openscenegraph website, all the links are to the OSG 3.2 doxygen.

 Is there a hosted web location where the OSG 3.4 generated oxygen is 
 available?

 - Alex
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>> --
>>> Jordi Torres
>>
>> --
>> Jordi Torres
>
> I apologize for criticizing, but I hope it will be useful for the community.
>
> Please note my contribution made recently: 
> https://github.com/openscenegraph/OpenSceneGraph/pull/42
>
> Maybe this will help, too.
>
> --
> Regards,
> Konstantin Podsvirov
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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