Re: [osg-users] Animation Morphing

2011-05-01 Thread george papagiannakis
Hi Anastasia,

Note that osgAnimation::RigGeometry is different from osg::Geometry class. 
Better do the morph with the Geometry classes and the new morphed one used it 
as input for a RigGeometry class...

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





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


Re: [osg-users] Animation Morphing

2011-04-29 Thread Anastasia Papas
Hi Cedric,

Once again thank you for taking the time to look into my issue!!

To be honest I don't really understand what you are saying :-/
Is there any related tutorial or example so that I can take an idea?

Thanks again!!

Anastasia

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





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


Re: [osg-users] Animation Morphing

2011-04-29 Thread Cedric Pinson
Hi,
The example you have taken works with only one geometry inside the file.
The visitor 'getShape' return the first geometry and in your file it
returns a RigGeometry. Morphing 2 RigGeometry has not been tested, and I
am not sure you want really want to do that.
What I would do is the opposite way, meaning morphing your two geometry
you really want to morph, then use the result as input for a
RigGeometry, maybe with a custom proxy geometry class.

I hope it makes sense.

Cheers,
Cedric

On Fri, 2011-04-29 at 19:47 +0200, Anastasia Papas wrote:
> Dear Cedric,
> 
> Thank you very much for helping me!!
> 
> The code is exactly as the original, only change is the file names! But I am 
> attaching it anyway!
> 
> Also I forgot to mention, the number of vertices is exactly the same for both 
> files, as well as the number of drawables and so on, at least according to 
> the osgviewer stats!
> 
> I am uploading it here, along with the two osg files, and also I am including 
> the directories of the textures, don't know if it's necessary but in any case 
> it's there!
> 
> My files are too large to be attached here, so I used an uploader service:
> 
> http://www.teicrete.gr/upload/download.php?fname=UP20110429203940.rar
> 
> 
> Thanks again!
> 
> Best Regards,
> 
> Anastasia
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=3#3
> 
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

-- 
Cedric Pinson
Provide OpenGL, WebGL and OpenSceneGraph services
+33 659 598 614 - cedric.pin...@plopbyte.com
http://plopbyte.com - http://osgjs.org - http://showwebgl.com


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Animation Morphing

2011-04-29 Thread Anastasia Papas
Dear Cedric,

Thank you very much for helping me!!

The code is exactly as the original, only change is the file names! But I am 
attaching it anyway!

Also I forgot to mention, the number of vertices is exactly the same for both 
files, as well as the number of drawables and so on, at least according to the 
osgviewer stats!

I am uploading it here, along with the two osg files, and also I am including 
the directories of the textures, don't know if it's necessary but in any case 
it's there!

My files are too large to be attached here, so I used an uploader service:

http://www.teicrete.gr/upload/download.php?fname=UP20110429203940.rar


Thanks again!

Best Regards,

Anastasia

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





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


Re: [osg-users] Animation Morphing

2011-04-29 Thread Cedric Pinson
Hi,
I can have a try, but I would need the sample code and data to test it.

Cedric

On Fri, 2011-04-29 at 16:45 +0200, Anastasia Papas wrote:
> Dear Cedric,
> 
> First of all thank you for the direct response!!
> 
> The message I receive is this:
> 
> Unhandled exception at 0x7c812afb in Template.exe: Microsoft C++ exception: 
> std::bad_cast at memory location 0x0012f650..
> 
> And it crashes at the:
> Geode.cpp
> 
> at the function: 
> BoundingSphere Geode::computeBound() const
> 
> at the line inside the for loop:
> _bbox.expandBy((*itr)->getBound());
> 
> Regarding the initial example's code I didn't modify anything else, just 
> changed the osg files to mine.
> 
> Thanks again!!
> 
> Regards,
> 
> Anastasia
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=38881#38881
> 
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

-- 
Cedric Pinson
Provide OpenGL, WebGL and OpenSceneGraph services
+33 659 598 614 - cedric.pin...@plopbyte.com -
http://plopbyte.com


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Animation Morphing

2011-04-29 Thread Anastasia Papas
Dear Cedric,

First of all thank you for the direct response!!

The message I receive is this:

Unhandled exception at 0x7c812afb in Template.exe: Microsoft C++ exception: 
std::bad_cast at memory location 0x0012f650..

And it crashes at the:
Geode.cpp

at the function: 
BoundingSphere Geode::computeBound() const

at the line inside the for loop:
_bbox.expandBy((*itr)->getBound());

Regarding the initial example's code I didn't modify anything else, just 
changed the osg files to mine.

Thanks again!!

Regards,

Anastasia

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





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


Re: [osg-users] Animation Morphing

2011-04-29 Thread Anastasia Papas
and the stack trace:

kernel32.dll!7c812afb() 
[Frames below may be incorrect and/or missing, no symbols loaded for 
kernel32.dll]  
kernel32.dll!7c812afb() 
>   osg73-osgd.dll!osg::Geode::computeBound()  Line 192 + 0x16 bytes
> C++
osg73-osgd.dll!osg::Node::getBound()  Line 366 + 0x13 bytes C++
osg73-osgd.dll!osg::Group::computeBound()  Line 357 + 0x16 bytes
C++
osg73-osgd.dll!osg::Node::getBound()  Line 366 + 0x13 bytes C++
osg73-osgGAd.dll!osgGA::StandardManipulator::setNode(osg::Node * 
node=0x01da6ad0)  Line 77 + 0x18 bytes C++
osg73-osgViewerd.dll!osgViewer::View::assignSceneDataToCameras()  Line 
1898 + 0x21 bytesC++
osg73-osgViewerd.dll!osgViewer::View::setSceneData(osg::Node * 
node=0x01da6ad0)  Line 307   C++
osg73-osgViewerd.dll!osgViewer::Viewer::setSceneData(osg::Node * 
node=0x01da6ad0)  Line 414 C++
Template.exe!main(int argc=1, char * * argv=0x018d47c8)  Line 120 + 
0x15 bytes  C++
Template.exe!__tmainCRTStartup()  Line 582 + 0x19 bytes C
Template.exe!mainCRTStartup()  Line 399 C
kernel32.dll!7c817077() 
msvcr90d.dll!_vcprintf_s_l(const char * format=0xf0e28100, 
localeinfo_struct * plocinfo=0x2d7f, char * argptr=0x3ff0)  Line 2293 + 
0x8d bytes   C++
0004f983()

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





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


Re: [osg-users] Animation Morphing

2011-04-29 Thread Cedric Pinson
Hi,
Do you have the stack trace where it crashes ?

Cedric

On Fri, 2011-04-29 at 16:23 +0200, Anastasia Papas wrote:
> Hello!
> 
> I am trying amimation morphing in OSG, and I found this example:
> 
> http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osganimationmorph/osganimationmorph.cpp
> 
> I have collada 3D models, and since this example is morphing between 2 osg 
> models, I used the osgDB::writeNodeFile to save the dae (after importing them 
> to a node) as an osg file.
> 
> The osg files are working even better than the initial collada files with the 
> osgviewer, for instance for the dae when I was zooming in, translating or 
> rotating, after a point some parts were disappearing, but now with the osg it 
> renders perfectly, and textures included!
> 
> But the problem is when I use it for the osganimationmorph, I get an 
> Unhandled exception...
> 
> Does anyone have an idea of how I should proceed?
> 
> Thank you in advance,
> 
> Anastasia
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=38877#38877
> 
> 
> 
> 
> 
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

-- 
Cedric Pinson
Provide OpenGL, WebGL and OpenSceneGraph services
+33 659 598 614 - cedric.pin...@plopbyte.com -
http://plopbyte.com


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Animation Morphing

2011-04-29 Thread Anastasia Papas
Hello!

I am trying amimation morphing in OSG, and I found this example:

http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osganimationmorph/osganimationmorph.cpp

I have collada 3D models, and since this example is morphing between 2 osg 
models, I used the osgDB::writeNodeFile to save the dae (after importing them 
to a node) as an osg file.

The osg files are working even better than the initial collada files with the 
osgviewer, for instance for the dae when I was zooming in, translating or 
rotating, after a point some parts were disappearing, but now with the osg it 
renders perfectly, and textures included!

But the problem is when I use it for the osganimationmorph, I get an Unhandled 
exception...

Does anyone have an idea of how I should proceed?

Thank you in advance,

Anastasia

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





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