Solved

Using an OpenGL 3D engine to render to a pbuffer

Posted on 2004-08-12
6
4,836 Views
Last Modified: 2013-12-06
Is there anyway i can use an OpenGL 3D to render to a pbuffer?  Is it possible for me to use this engine to animate a 3D model, and then set the world matrix from my code?  If so, how do i get this engine?
0
Comment
Question by:davidastle
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:davebytes
ID: 11794363
Off-screen Rendering Using Pixel Buffers sample at:
http://www.codesampler.com/oglsrc.htm

about halfway down the page.

You can also certainly use any of the OpenGL based opensource game engines to do things like this.  I can't tell from your question what experience you have with opengl and what you are trying to do, but that link is one decent starting example.

That page has a lot of good sample code for OpenGL us.  The other good tutorial site is:
nehe.gamedev.net

-d
0
 
LVL 2

Author Comment

by:davidastle
ID: 11794536
Basically my problem is that I have an artist who needs to export something from Maya, and I need to be able to run the animation in OpenGL... on a pbuffer.  This is a nightmarish task, and I want to get it done with as little pain as possible.
One of the possibilities that came up is to try to use a 3RD party 3D engine to render the animations on a black background to the pbuffer.  If this works, we may be able to cut out a lot of code.
Would this work?  Could i use a 3RD party 3D engine to do this and still control the OpenGL camera position / model position at any time?
0
 
LVL 17

Expert Comment

by:davebytes
ID: 11794685
Wow.  Yes, that IS a nightmarish task!  From scratch, that's no small job you've got ahead of you...

Yes.  Check out any of the open-source projects on sourceforge.net for Maya support... Plus google is your friend.  You want a free codebase that provides the Maya export/import connection, with animation support.  I don't know of anything off the top of my head.  You might find that some of the cheaper commercial engines (like garagegames.com Torque engine, etc.) might have the needed Maya support, but that's a big piece.

-d
0
 
LVL 2

Author Comment

by:davidastle
ID: 11794852
I've already done the code for rendering non animated Maya objects (obj files), and i have MD3 animations working.  Would it be easier to go for the engine, change my code to load a new animation format (i can reeuse a lot of the MD3 SLERP animation code), make a maya plugin that exports to our own format, or change the MD3 file format to suite my needs (there is a plugin for maya that supposedly exports to MD3, although i havent gotten it to work)?  I dont want to use MD3 since it doesnt really support skeletal animation.  People say that it does, but i ran some tests, and the only joints are the entire lower half of the, the torso, the gun, and the head.  It is a nightmare to try to add support for more joints; i would have to change the file format.
0
 
LVL 17

Accepted Solution

by:
davebytes earned 500 total points
ID: 11827804
If you want to really own the code, you probably want to either adopt a different 'open' object/animation format, or just bite the bullet and write your own format/exporter/importer.  Trying to extend MD3 seems a fruitless endeavor.  Using an existing engine would certainly be a fine approach if you found something that meets your needs for free -- not that many solutions out ther for certain.

Do you want to own the code?  If so, your answer is pretty much there for you: write your own exporter & format to meet your own needs -- or find an alternate existing format/exporter you can adapt (less likely...).

-d
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now