Sign in to follow this  

A root node for skeletons

This topic is 4358 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on writing a loader for milkshape models, and I'm going pretty well. I've gor the triangle groups and materials working properly, but now I'm on to loading the skeleton and I'm got my own joint class. I've decided that the root node of a model should have it's own name, but no name for the parent node. It's done the same way in milkshape. In my loader function, it gives an error when it finds two root nodes, and it has apparently found two in the model that I'm trying to load. One is called "base" which I believe is the root node, which all others are connected to, and the other is called "cam". How should my loader decide what is a proper root node?

Share this post


Link to post
Share on other sites
Perhaps the camera position has been included in the model as a separate object? I suppose you could simply ignore root nodes named "cam".

Share this post


Link to post
Share on other sites
Is the camera position usually included as a seperate joint?

I mean, yes, I could simply ignore joints named "cam", but can't you manually name the joints when you're modelling something? The camera joint could be called "camera", or "camera_node_here".

I was mostly wondering if this was a usual thing and if there was a standard way of dealing with it.




Edit:: Also, while I'm here, I want to be able to draw the geometry of a model and be able to draw the skeleton on top of that, so you can always see the skeleton.

I'm currently using opengl, and I go this working by disabling depth testing just before I draw the skeleton and then enabling it right after I finish.

I'm just wondering if I attempt to draw something in front of the model, say a cube, obviously the skeleton shouldn't be seen through the cube.

Is there a way to do this API independently? Because I'm attempting to make my engine independent, and I currently have OGL calls in one of my scene node classes.

Also, the geometry of the model looks a bit transparent. Should it be, considering I'm only turning off depth testing for the time that it takes to draw the skeleton?

[Edited by - Endar on January 12, 2006 2:09:26 AM]

Share this post


Link to post
Share on other sites
Or does the geometry only look transparent because something is being draw over top of it and it looks like I'm seeing through the geometry?

Share this post


Link to post
Share on other sites
Quote:
Original post by Endar
Is the camera position usually included as a seperate joint?

I mean, yes, I could simply ignore joints named "cam", but can't you manually name the joints when you're modelling something? The camera joint could be called "camera", or "camera_node_here".

I was mostly wondering if this was a usual thing and if there was a standard way of dealing with it.



pre-process the data, load and then remove any unwanted stuff and save. If you can't name the cam node, then name root to always be root and only write that out.

Quote:

Edit:: Also, while I'm here, I want to be able to draw the geometry of a model and be able to draw the skeleton on top of that, so you can always see the skeleton.....


enable blending src_alpha, one_minus_src_alpha
setcolor(1,1,1,0.3);
draw the mesh using front face culling.
disable blending
draw the bones.
enable blending
then draw again using back face culling.
disable blending

Share this post


Link to post
Share on other sites

This topic is 4358 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this