Armature proposal

Animation tools, character animation, non linear animation

Moderators: jesterKing, stiv

beatabix
Posts: 73
Joined: Fri Oct 18, 2002 1:12 am

Postby beatabix » Wed Feb 18, 2004 1:37 pm

ok,
more digging around, more possibilities.
Once again, I don't know really what i'm doing here, and i can't compile yet (haven't tried). If you, Mr Money, could try out my suggestions and post screenshots of the results, that would be cool, and might actually get me digging in this code for real.

ok here we go...
in the function draw_boneverti (used to draw the axis balls at root & tip), there are a few opertunities to play.
first, try changing this line

Code: Select all

gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);

to

Code: Select all

gluQuadricDrawStyle(qobj, GLU_FILL);


this should draw the disks as solids. Pretty useless, but a start. You could also try GLU_LINE and GLU_POINT, equally useless, but it's fun to play anyway.

now let's go for something bigger. This is all just conjecture until someone proves or disprove it. please go ahead all the people who can compile.

replace this:

Code: Select all

   gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
   gluPartialDisk( qobj, 0,  1.0F*size, 32, 1, 360.0, 360.0);

   glRotatef (90, 0, 1, 0);
   gluPartialDisk( qobj, 0,  1.0F*size, 32, 1, 360.0, 360.0);

   glRotatef (90, 1, 0, 0);
   gluPartialDisk( qobj, 0,  1.0F*size, 32, 1, 360.0, 360.0);


with something like this:

Code: Select all

   gluQuadricDrawStyle(qobj, GLU_FILL);
   gluSphere( qobj, 0,  1.0F*size, 12, 12);

(a reference for the gluSphere function)

Now, if my guesses are correct, you should now have a bunch of spheres for the bone roots and tips. However, i doubt they will look very nice. Much more would need to be done to incorporate these sorts of things into blender. Depth correction, colouring, proper matrix orientation. There are some things already in place, which could then be adapted. If you could find out how to add options, like what is and isn't drawn, that would be a good start. Or, you could just scrap the current display type and compile you own versions of blender with whatever you like, letting people test and get more ideas.

Just keep playing.
later
BEAT

jd-multi
Posts: 123
Joined: Thu Mar 13, 2003 11:29 pm

Postby jd-multi » Wed Feb 18, 2004 5:49 pm

Great, the idea to make a autoskin feature like 3Ds Max has, using some kind of sphere's around bones. This would save hours, making vertex groups or autskin using the current feature in blender, and afther that, regroup the vertices that aren't added very well to some bones. I would see this feature in Blender, and I really know that out there people are waiting for a feature like that. It saves time, makes skin deformation more easier, and better, because when I add vertice groups to bones now, sometimes the skin will go trough another skin, and looks like Book idea. well I hope people can try to fix that too. But I hope this feature idea won't stop developing.

Btw, that website looks great, the one with all kind of codes and tryouts, well I see implantating a better autoskin feature won't be so hard when I look at those tryouts, are they from someone in here? :D

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Wed Feb 18, 2004 10:49 pm

I hope you can see this, with your code I get this

editarmature.c:1279: error: stray '\312' in program
editarmature.c: In function `create_vgroups_from_armature':
editarmature.c:2969: warning: implicit declaration of function `create_dverts'
make[3]: *** [/Users/kamarits/Projects/tuhopuu/tuhopuu2/obj/darwin-7.0.0-powerpc/blender/src/editarmature.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
[kamaris-Computer:~/Projects/tuhopuu/tuhopuu2] kamarits%

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Wed Feb 18, 2004 11:13 pm

I started over clean and did this

gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);

to


Code:

gluQuadricDrawStyle(qobj, GLU_FILL);
And the little ball joints are full now, Cool!

nowhere to upload an image but it is neat, not yet what I want but It looks neat .

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Wed Feb 18, 2004 11:17 pm

Image

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Wed Feb 18, 2004 11:21 pm

while I play with the other ideas, I start to think.

How do I make a new menu item in the pref bar to switch between these as they are nice to have as something different

And How do I get Xcode to work in OSX 10.3 for Blender.

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Wed Feb 18, 2004 11:47 pm

What's Xcode?

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Thu Feb 19, 2004 12:10 am

theeth wrote:What's Xcode?

Martin


"Predictive compile
Compiling is a sink hole for code turnaround. Xcode steers you around the problem by staying one step ahead of you and the compiler, advance-compiling changes while you are still making them in source code. By the time you’ve saved your edits and started to recompile your app, the fix is in and the compiling is mostly complete."
http://www.apple.com/macosx/features/xcode/

It comes with OSX , it would help me with the tests of this code stuff.

Theeth , have any input on beatabix's code ?

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Thu Feb 19, 2004 4:16 am

Money_YaY! wrote:"Predictive compile
Compiling is a sink hole for code turnaround. Xcode steers you around the problem by staying one step ahead of you and the compiler, advance-compiling changes while you are still making them in source code. By the time you’ve saved your edits and started to recompile your app, the fix is in and the compiling is mostly complete."
http://www.apple.com/macosx/features/xcode/

It comes with OSX , it would help me with the tests of this code stuff.

ok, so technically, it has very little to do with the current discussion.

Theeth , have any input on beatabix's code ?

He probably knows more openGL than I do, so no, not really.

Martin
Life is what happens to you when you're busy making other plans.

- John Lennon

beatabix
Posts: 73
Joined: Fri Oct 18, 2002 1:12 am

Postby beatabix » Thu Feb 19, 2004 6:10 pm

OK money man,
what i was trying to show you is that changing things is not so difficult if you look in the right place. Everything i know about opengl is mostly taken from the red book, with a few source downloads as well. As far as displaying things in blender is concerned, the OpenGL guides are the best resources. the opengl site also has a load of code examples that you can look at. The difficult part will be making things that integrate well into blender.

I am now working on a proposal for adding a new display type/mode for armatures, based on the idea of having a more solid form to work with. There is the argument, as Theeth said, that it is change for the sake of change, but I think a few of the things he said were based more in the fact that you annoy him :)

Basically, the changes I am thinking about are not simply aesthetic, they are intended to the actual editing environment and visual feedback/presentation for animators. Forms, volumes and silhouette are vital considerations in 3D animation, and the current system gives a very poor representation of these factors. There is a reason why Character Studio uses a mesh for the skeleton. If we could add an option to display an armature as a 3D form, intereract with light and giving an adequate representation of volume, then the need for cumbersome alternate meshes would be removed. There is a great deal of potential in this area.

later
BEAT

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Thu Feb 19, 2004 6:18 pm

beatabix wrote:
I am now working on a proposal for adding a new display type/mode for armatures, based on the idea of having a more solid form to work with. There is the argument, as Theeth said, that it is change for the sake of change, but I think a few of the things he said were based more in the fact that you annoy him :)



Yes but he sure likes to respond to my little speeches.

beatabix wrote:
Basically, the changes I am thinking about are not simply aesthetic, they are intended to the actual editing environment and visual feedback/presentation for animators. Forms, volumes and silhouette are vital considerations in 3D animation, and the current system gives a very poor representation of these factors. There is a reason why Character Studio uses a mesh for the skeleton. If we could add an option to display an armature as a 3D form, intereract with light and giving an adequate representation of volume, then the need for cumbersome alternate meshes would be removed. There is a great deal of potential in this area.

later
BEAT


This sounds perfect. Like a user pref to change the type would be good. Also being able to change the size and structure of the mesh would be a good trait for it so the rig is not all skinny.

I am testing at the code but It keeps giving errors as I do not know what I am breaking until I compile. Oh well :D

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Thu Feb 19, 2004 6:42 pm

Money_YaY! wrote:Yes but he sure likes to respond to my little speeches.

See it as a learning process. You're propositions have a lot less non-sense than before (no offense meant). With the amount of stuff you say, a good idea is bound to pop out at some point.

Martin
Life is what happens to you when you're busy making other plans.

- John Lennon

Monkeyboi
Posts: 561
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Postby Monkeyboi » Fri Feb 20, 2004 3:17 pm

Any thought going towards the Armature null thing? Theeth, what is your oppinion?

Money_YaY!
Posts: 876
Joined: Wed Oct 23, 2002 2:47 pm

Postby Money_YaY! » Fri Feb 20, 2004 11:49 pm

Update,
I know that this bit of code does not work .

Code: Select all

now let's go for something bigger. This is all just conjecture until someone proves or disprove it. please go ahead all the people who can compile.

replace this:


Code:

   gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
   gluPartialDisk( qobj, 0,  1.0F*size, 32, 1, 360.0, 360.0);

   glRotatef (90, 0, 1, 0);
   gluPartialDisk( qobj, 0,  1.0F*size, 32, 1, 360.0, 360.0);

   glRotatef (90, 1, 0, 0);
   gluPartialDisk( qobj, 0,  1.0F*size, 32, 1, 360.0, 360.0);



with something like this:



Code:

   gluQuadricDrawStyle(qobj, GLU_FILL);
   gluSphere( qobj, 0,  1.0F*size, 12, 12);


(a reference for the gluSphere function)



I get this error
w/include/SDL -D_THREAD_SAFE -I../render/extern/include -I../renderconverter -I../blenkernel -I../blenlib -I../python -I../makesdna -I../imbuf -I../img -I../blenloader -I.. -I../../kernel/gen_system -I../../gameengine/SoundSystem -I../ftfont -I../radiosity/extern/include -I/Users/filemake/projects/tuhopuu/tuhopuu2/source/gameengine/Physics/Sumo/include -I/Users/filemake/projects/tuhopuu/tuhopuu2/../lib/darwin-7.0.0-powerpc/guardedalloc/include -I/Users/filemake/projects/tuhopuu/tuhopuu2/../lib/darwin-7.0.0-powerpc/decimation/include -I/Users/filemake/projects/tuhopuu/tuhopuu2/../lib/darwin-7.0.0-powerpc/bsp/include -I../readstreamglue -I../include -DNAN_BUILDINFO -I../quicktime -DWITH_QUICKTIME -DINTERNATIONAL -I/System/Library/Frameworks/OpenGL.framework editarmature.c -o /Users/filemake/projects/tuhopuu/tuhopuu2/obj/darwin-7.0.0-powerpc/blender/src/editarmature.o
editarmature.c: In function `draw_boneverti':
editarmature.c:1273: error: stray '\312' in program
editarmature.c:1273: error: stray '\312' in program
editarmature.c:1273: error: stray '\312' in program
editarmature.c:1273: error: too many arguments to function `gluSphere'
editarmature.c: In function `create_vgroups_from_armature':
editarmature.c:2963: warning: implicit declaration of function `create_dverts'
make[3]: *** [/Users/filemake/projects/tuhopuu/tuhopuu2/obj/darwin-7.0.0-powerpc/blender/src/editarmature.o] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
'[filemaker:~/projects/tuhopuu/tuhopuu2] filemake% '

Eric
Posts: 192
Joined: Wed Oct 16, 2002 1:01 pm
Location: Sweden, Norrköping

Postby Eric » Sat Feb 21, 2004 2:54 am

You get a quite clear error message here:

Code: Select all

editarmature.c:1273: error: too many arguments to function `gluSphere'


And if you look at beatabix code-example (he actually said "something like this" btw)

Code: Select all

gluSphere( qobj, 0,  1.0F*size, 12, 12);


You see that there are 5 arguments...And by taking a quick look in the reference again you see that gluSphere() wants 4 arguments.

Go figure the rest =)


Return to “Animation”

Who is online

Users browsing this forum: No registered users and 2 guests