To display a 3D skeleton, what do I need to learn?

  • Follow


HI

I am a C programmer, I would like to learn ruby, rubycocoa and
rubyOpenGL.  I do sculpture with clay, and I would like to display an
articulated 3D skeleton - the equivalent of wood skeleton articulated
on a string found in craft stores - to visualise various figure
positions.

I found several threads which suggest it is possible,
http://groups.google.com/group/comp.graphics.api.opengl/browse_frm/thread/a57401ff0a8c6238/b94b2e72290b7144?q=skeletal+animation&rnum=2#b94b2e72290b7144
and also
http://www.holmes3d.net/graphics/skeleton/
but I don't know how to get started.

Should I read several chapters of the red book before I come back to
try to understand the code in these links? What do I need to learn for
this project? Is it too ambitious for a beginner?

0
Reply anne (264) 1/20/2006 4:51:59 PM

anne001 wrote:
> ...d I would like to display an
> articulated 3D skeleton
> 
> I found several threads which suggest it is possible,
> http://groups.google.com/group/comp.graphics.api.opengl/browse_frm/thread/a57401ff0a8c6238/b94b2e72290b7144?q=skeletal+animation&rnum=2#b94b2e72290b7144
> and also
> http://www.holmes3d.net/graphics/skeleton/
> but I don't know how to get started.
> 
> Should I read several chapters of the red book before I come back to
> try to understand the code in these links? What do I need to learn for
> this project? Is it too ambitious for a beginner?
> 

It's quite ambitious, yes.

OpenGL only does rendering. All the math, the
filing, the data structures, etc. can't be
done by OpenGL.


-- 
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address

0
Reply fungus 1/20/2006 8:38:23 PM


Well, you are looking at a lot.  Since you already know C, I'd probably
reccomend learning OpenGL using C/C++/Objective C.  To start out with,
the syntax will be more familiar to you, and you'll be more familiar
with the standard library, etc.  Also, the OpenGL API is defined in C,
and then "ported" to other languages.  YMMV, and choice of language is
an entirely personal opinion.  I'm just saying that if it was me, and I
wanted to learn an API and a Language, I'd probably start with one or
the other, and then use them both at the same time when I had more of a
grounding in each.

Now, that said...  Character animation is generally considered a fairly
advanced subject.  You are talking about having a rigid character,
which simplifies things quite a bit.  It sounds like a project that
could be very doable if you cut some corners, or completely impossible
for one person to do in a reasonable amount of time if you want every
feature imaginable.

To start with, the most important thing to remember is that OpenGL will
render whatever you tell it.  No more, no less.  You need to be able to
tell OpenGL exactly where you want every vertex of every triangle to
go.  OpenGL can't solve the problem of figuring out what you want to
render.

So, how to go about it?  Yes, start reading a book.  Also, I might
reccomend nehe.gamedev.net as a good place to look at some tutorials.
The early lessons cover simple things like just drawing a single
triangle.  This isn't very impressive or fancy, but it is the
foundation of everything else you are going to do, so you had better be
able to do it, and understand how it works.  The lessons are generally
presented in Win32 C/C++, but at the bottom of each lesson, you can see
ports to other languages and platforms.

GLU (The OpenGL Utility Library) has some functions for drawing curved
surfaces.  There is even a function for drawing a sphere.  So, once you
are comfortable with the very very basics, I'd reccomend learning to
make a simple human shape in OpenGL, using a sphere for the head, a
stretched sphere for the upper/lower arm, etc.  Somewhere around ten
stretched spheres for the shape.  Now, when doing this, specify the
position of the lower arm in terms of the position of the upper arm.
(Relative coordinates, instead of Absolute coordinates.)  Learn how to
make sure that the senter of rotation is correctly put at each joint.

Then, fiddle with angles.  Now, you will have the simplest form of what
you are after.  It'll require a recompile every time you want to move
the model, but it'll be a start.  From here, you will be able to branch
out into all sorts of things.  You can look into using an actual
modelled mesh for the parts instead of spheres.  (Probably loading the
mesh from a file - either write your own loader, or learn the API of
some loader library)  You can user Coacoa (or whatever- FLTK,
WXWidgets, MFC, Xlib, GTK+ - not directly relavant to OpenGL) buttons
and controls to control your OpenGL rendering.  You can apply textures
to the object (But, again, OpenGL only cares about the image data once
you have it in memory ready to feed directly to OpenGL - you'll have to
handle actually loading the image from disk in whatever file format on
your own.)  Eventually, you may even want to learn to write an Inverse
Kinematics engine to make your figure easier to control.

But, I reccomend not trying to do it all at once.  You most likely will
run into some wierd problem, and you won't know how to track it down,
because you'll have 50 things you aren't very familiar with, and no
idea who to blame.  If you start small, and take baby steps, you can
get something interesting fairly quickly, and spend the next ten years
constantly adding "just one more feature."  :)

Good Luck.  And, please try to remember that this newsgroup is *only*
dedicated to issues of OpenGL.  So, if you post with a ruby syntax
question, or a question about Cocoa, you may not get a very useful
response, even if you are writing an OpenGL app using Ruby and Cocoa!
:)


anne001 wrote:
> HI
>
> I am a C programmer, I would like to learn ruby, rubycocoa and
> rubyOpenGL.  I do sculpture with clay, and I would like to display an
> articulated 3D skeleton - the equivalent of wood skeleton articulated
> on a string found in craft stores - to visualise various figure
> positions.
>
> I found several threads which suggest it is possible,
> http://groups.google.com/group/comp.graphics.api.opengl/browse_frm/
thread/a57401ff0a8c6238/b94b2e72290b7144?q=skeletal+
animation&rnum=2#b94b2e72290b7144
> and also
> http://www.holmes3d.net/graphics/skeleton/
> but I don't know how to get started.
>
> Should I read several chapters of the red book before I come back to
> try to understand the code in these links? What do I need to learn for
> this project? Is it too ambitious for a beginner?

0
Reply forkazoo 1/20/2006 9:34:51 PM

Thank you very much for your warning Fungus that's what I was afraid
of, and  Forkazoo, thank you for your detailed response. I will look
into stretch spheres.

I will start with a trunk and an arm, and see if I can get that going.
It sounds like I need to master three step.
1. showing objects with opengl, which I can figure out from all the
sample code.
2. Master the geometry, relative angles of articulated form.
3. Master coding organization so I don't get lost in the code dealing
with low level geometry...

thank you so much for your encouragement and advice in helping me scale
the project to where it has a chance to suceed.

0
Reply anne001 1/20/2006 10:05:45 PM

On 20 Jan 2006 08:51:59 -0800, "anne001" <anne@wjh.harvard.edu> wrote:
>I am a C programmer
[snip]
> What do I need to learn for
>this project? Is it too ambitious for a beginner?

I'll take a different position here. I think to start you could have a
great deal of success with POV (Persistence of Vision) Raytracer

It's syntax is very C-like. With a good computer and a "restrained"
image size and settings it is very quick so you get great visual
feedback rapidly. The images can be absolutely stunning as well.

Here's the best part, it's free, complete, has good documentation and
is easy to install.

http://www.povray.org/

I beleive it teachs many of the same concepts and techniques that will
make an easier transition to OpenGL when you're ready.

HTH

"If you have ten thousand regulations you destroy 
all respect for the law." - Winston Churchill 
0
Reply JustBoo 1/21/2006 7:31:16 PM

"JustBoo" <JustBoo@BooWho.com> wrote in message 
news:d525t1hj0nveeuidkocopb3ogus8lrdcq7@4ax.com...
> On 20 Jan 2006 08:51:59 -0800, "anne001" <anne@wjh.harvard.edu> wrote:
>>I am a C programmer
> [snip]
>> What do I need to learn for
>>this project? Is it too ambitious for a beginner?
>
> I'll take a different position here. I think to start you could have a
> great deal of success with POV (Persistence of Vision) Raytracer
>

Povray is a great tool, however if your budget stretches then poser
seems to be tailor made for you:
http://www.e-frontier.com/go/products/poser6

Ian 


0
Reply Ian 1/22/2006 1:50:24 PM

Here is the info I got about openGL versus pov-ray from a ruby expert

ruby-pov-ray is new and not really ready for folks like me to use.

"If you want to learn graphic programming, in the sense that you would
like
to create interactive scenes that respond to user interaction, then
opengl
is the way to go, and for ruby I reccommend 'rubygame':"
http://rubygame.seul.org/  does not work with max OSX, unfortunately

"the OpenGL code is already completed by the author and is
available through his repository."

"raytracing is usefull for creating rendered scenes that are
non-interactive.  For example I am using it to generate povray scenes
for
tiles in an isometric game I am making.  rupov generates the graphics
at
'compile time' which are then just drawn ingame."

------------------------------------------------------------------------------------------------------
I can't find any recent book on povray, so I think I will go with
openGL.

I have seen poser6 but in terms of sculpture, I believe all the details
of the
muscles must be wrong since what is modeled are the bones, not the
muscles.
I suppose they have a skeleton, and that it would be easy to position,
but then I
won't be learning openGL and ruby. The skeleton is a bit of a carot to
get me
learning, openGL and ruby is what might help me find a job when the
time 
comes -- I hope.

0
Reply anne001 1/22/2006 3:29:26 PM

What are you trying to archive? 


0
Reply Gernot 1/23/2006 8:51:23 AM

7 Replies
346 Views

(page loaded in 0.14 seconds)

Similiar Articles:













7/24/2012 3:57:39 PM


Reply: