A root node for skeletons

Started by
3 comments, last by RobTheBloke 18 years, 3 months ago
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?
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
Advertisement
Perhaps the camera position has been included in the model as a separate object? I suppose you could simply ignore root nodes named "cam".
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]
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
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?
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
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

This topic is closed to new replies.

Advertisement