Ogre Skeletal Animation in Vega Prime

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
gameengineer
Kobold
Posts: 35
Joined: Sat Oct 09, 2010 8:04 pm
Location: San Diego, CA, USA
Contact:

Ogre Skeletal Animation in Vega Prime

Post by gameengineer » Wed Nov 19, 2014 5:25 pm

It has been a while but I am back. The last time I used Ogre I was impressed with the ease of use. Here's what I want to do in a nutshell. I want characters in our simulation application which uses the latest Vega Prime libraries. Vega Prime from Presagis is a high commercial license cost graphics library based on scene graph concepts. Most features are a licensed plug-in including their human character add-on. So I am exploring what I can do with an open source approach as far as adding animated characters. Creating movements paths and scenarios is a whole other thing but first I need animated character models in the scene.

I understand a big chunk of the integration involves the Vega Prime side and luckily their API allows for custom geometry to be added as nodes to their scene graph. I will use the Ogre .mesh and .skeleton file formats and most likely start out with your XML based formats.

What I am trying to understand is how to render the models in Vega Prime. If you make a Vega Prime-based object the rendering is done under the hood. I found an article where someone manually loaded the XML-based model and rendered it using immediate mode OpenGL. That is certainly one approach that might work here. In our simulation application I have resorted to manual OpenGL rendering but mainly for post processed effects and screen space graphics. If I can get some direction on how Ogre renders the animated entity maybe I can figure out where to use Ogre with Vega Prime, if that is even possible. My first thoughts are Ogre would handle model loading, manage bone matrices, etc, manage skeletal animations and blending while Vega Prime does the rendering or maybe even better yet Ogre can do its own model rendering. I know Ogre is a "Rendering Engine" so using it as the renderer may simply not work with Vega Prime since it wants to be the renderer. (ie. OpenGL context is created and controlled by VP, ... )

I am continuing to dive through code in Ogre and through documentation and header files in Vega Prime to better understand if and how this might be done.

-Steve
0 x

User avatar
gameengineer
Kobold
Posts: 35
Joined: Sat Oct 09, 2010 8:04 pm
Location: San Diego, CA, USA
Contact:

Re: Ogre Skeletal Animation in Vega Prime

Post by gameengineer » Mon Dec 01, 2014 6:00 pm

I'll rephrase: Has anyone used the skeletal animation system enough to understand if it can be used independently of the rendering system? I will use the Ogre libraries as a whole without stripping out code but I would like some help understanding how the code modules interact.

My effort at this point is reading the Pro OGRE 3D Programming book, the Ogre wikis on the skeletal and animation systems and code. I know OGRE is a "rendering engine" but unfortunately it is difficult to give up or take over rendering completely in Vega Prime. It has a shader infrastructure in which I can add custom shaders. My idea was to use GPU skinning however even CPU skinning is fine for starters. Heck I'd even take OpenGL immediate mode rendering at this point.

I am going through everything I can find on the web for skeletal animation and rendering. This article was great but obviously it only works specifically for MD5. However MD5 like .mesh and .skeleton files are only intermediate file transport formats so when you strip it all down was is the necessary data? Vertex buffer(s) and a bunch of matrices for bones or joints?
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Ogre Skeletal Animation in Vega Prime

Post by c6burns » Mon Dec 01, 2014 6:50 pm

You can definitely use animation separately from rendering. There is even a snippet that shows how this is accomplished, by loading a mesh and using a skeleton instance:
http://www.ogre3d.org/tikiwiki/tiki-ind ... e=Cookbook

Once you have called SkeletonInstance::setAnimationState, all of the bone transforms will be updated. These are represented by nodes in the animation track. From there you would either apply these transforms to the vertex buffer (software skinning) or pass the array of transforms and skinning weights to the vertex program (hardware skinning). I have not investigated Ogre's source that closely on this matter, but I assume software skinning happens at the Ogre::Mesh level, triggered from the entity level during rendering (looking quickly at the API there is an Ogre::Mesh::softwareVertexBlend)
0 x

frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 14

Re: Ogre Skeletal Animation in Vega Prime

Post by frostbyte » Mon Dec 01, 2014 10:47 pm

don't realy know vega-prime or understand your needs, never the less...
bullet-ogre plugin has some code which you can reference - regarding copying/sharing mesh/vertex data between two different libs( bullet and ogre ) ...
+you can create an ogre opengl render system using an existing opengl context...( saw somthing about it in the forum a while ago... )
0 x
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos

User avatar
gameengineer
Kobold
Posts: 35
Joined: Sat Oct 09, 2010 8:04 pm
Location: San Diego, CA, USA
Contact:

Re: Ogre Skeletal Animation in Vega Prime

Post by gameengineer » Tue Dec 02, 2014 1:18 am

Thanks c6burns I'll look at what you are referencing.

frostbyte, consider yourself lucky not to know Vega Prime! It is our current scene graph/rendering system I inherited coming to this job. We are too entrenched to spend the money to change at this point so we adapt. I'll take a look at the bullet+ogre interfacing as well.

Thanks for additional direction.
0 x

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7147
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 16

Re: Ogre Skeletal Animation in Vega Prime

Post by Kojack » Tue Dec 02, 2014 3:12 am

Something else to consider: Havok.
It's free for PC and it has a vastly more powerful skeleton animation system than Ogre. It also has graphics mesh exporters for most modelling packages. So you could get your meshes and skeletons without any 3d engine dependency.
That might make more sense than adding a graphics engine to a graphics engine. :)
Then again, I much prefer Ogre's API to Havoks and Havok is closed source. But it's an option.
0 x

User avatar
gameengineer
Kobold
Posts: 35
Joined: Sat Oct 09, 2010 8:04 pm
Location: San Diego, CA, USA
Contact:

Re: Ogre Skeletal Animation in Vega Prime

Post by gameengineer » Tue Dec 02, 2014 5:12 pm

Kojack wrote:Something else to consider: Havok.
It's free for PC and it has a vastly more powerful skeleton animation system than Ogre. It also has graphics mesh exporters for most modelling packages. So you could get your meshes and skeletons without any 3d engine dependency.
That might make more sense than adding a graphics engine to a graphics engine. :)
Then again, I much prefer Ogre's API to Havoks and Havok is closed source. But it's an option.
I've looked into Havok but their licensing is prohibitive for us for commercial. We are paying $$,$$$ for runtime licenses or rather our customers are already. I am looking for an open source or otherwise free libraries. Over time I will be replacing Vega Prime with an alternative like OpenSceneGraph. I would consider Ogre but I do not believe the large area terrain paging system, DTED terrain data support and virtual terrain texturing with satellite imagery is present or adequate. That is actually one of my biggest hurdles with replacing Vega Prime. Their large area terrain paging system is decent, not perfect, but decent.
0 x

User avatar
gameengineer
Kobold
Posts: 35
Joined: Sat Oct 09, 2010 8:04 pm
Location: San Diego, CA, USA
Contact:

Re: Ogre Skeletal Animation in Vega Prime

Post by gameengineer » Wed Dec 03, 2014 6:54 pm

I appreciate every ones help. I think I am good now. I got help from Presagis (Vega Prime) support on how to create a custom object for their scene graph which interacts with the sky and terrain shaders.
0 x

Post Reply