Dark Reign 3 Status Updates

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

I took Unarekin's advice and did a search and got this as a result: http://irrlicht.sourceforge.net/phpBB2/ ... ight=cal3d
Now, for the lefthanded versus righthanded coordinate problem:
this doesn't affect the rendering in the local way (triangle scattering or what ever) but in a global way, rotations are the oposit way round and vertecis are mirrored.

I hope this helps prevent similar errors
That's the problem, now all i have to do is figure out how to fix it :? I also have the EXACT same problem with MD3 models. They have to be rotated the right way in code too. Here's a quote from the Cal3D site that may be of use:
What coordinate system does Cal3D use?

Cal3D characters exported from a modeling package such as 3DSMax or Milkshape will be in the same coordinate system as the package. For instance, a model exported from MAX and loaded for use in an OpenGL application will require a -90 degree rotation about the X-axis to be converted to the OpenGL coordinate system.
It should also be noted that Cal3D's math classes assume a left-handed rotation system. Right-handed systems are much more common, so this is not a minor detail. Think of it like this: take your right hand and point your thumb straight up while curling your fingers a bit - kind of like you're holding a coffee mug.

Your thumb is the vector axis of rotation. If you have a positive-value rotation, you will be rotating counter-clockwise about your thumb's axis. If you have a negative-value rotation, you'll be rotating clockwise.

Now do the same thing, but with your left hand. Note that your fingers now curl around clockwise. So with positive rotation values in a left-handed system, you get a clockwise rotation. This is the opposite of the right- handed system.
Is this the info necessary? I guess that Irrlicht must use a right handed system :(

PS. If someone can help fix this I'll integrate Cal3D into the engine and post it here as a patch. I've also added other things to the Cal3D scenenode such as animation changing, LOD and other fixes.
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

PS. If someone can help fix this I'll integrate Cal3D into the engine and post it here as a patch. I've also added other things to the Cal3D scenenode such as animation changing, LOD and other fixes.
That would be great. . . unfortunately I can't help you with your problem :cry:

BTW: how do you find the speed of Cal3d, I'm sure it'sfast at doing the actual skeletal transforms and skinning, but does having to pass all that vertex data between irrlicht and Cal3d slow things down significantly?
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

Cal3D is reasonably fast. Any slowdown is mainly because of the way in which the scene node is implemented. It's not integrated directly into the engine so it's not as fast as what it could be. However it still is fast. Unfortunately my skills aren't up to improving it but i'm not too worried. It's fast enough for my purposes.

FYI, the standalone Cal3D demo gets around 400+ fps with a 2000+ poly model. Irrlicht is slower than this. (It gets around 200-300 fps i think)
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

Fourth Update
Just a quick update... DR3 is going well although coding has taken a bit of a backseat as I iron out some of DR3's ideas.
However, I have coded one tool that may be of use to people. It's a camera track creator. You know that flyby at the start of the Irrlicht demo? Well this little tool allows you to build up a list of points and then have a camera follow them. You can also set look targets and then change them when the scene is playing back. At the moment the code is simple and has no error checking and also it's kinda useless because you can't save the points it creates, however I'm going to add in XML writing support. If people are interested I could also post the code when I get it done. It's a VERY simple program but VERY effective.

PS. Anyone solved that Cal3D problem yet? :cry:
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Don't go for xml, its overkill. Create a file like so.

Code: Select all

CameraTrack1
1 35 23
4 59 20
25 94 30
594 28490 2389
A text file with a name, and a bunch of points after it.

BAHZING
The Robomaniac
Project Head / Lead Programmer
Centaur Force
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

I personally prefer XML to regular text files, though perhaps is overkill if only storing one type of data
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

file comments, freeform...

Post by buhatkj »

the advantages of using XML are that you can have file comments, and write freeform. if you just use a text file, you have to write a parser, and have certain spacing and certain stuff on specific lines, IE. it can get annoying for big config files. Thats why I feel XML rocks :-)
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Creating a text parser is really easy to do. Look up strtok on google. also, while (file.good) works for just parsing an indeterminate of schtuff
The Robomaniac
Project Head / Lead Programmer
Centaur Force
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

XML is very good for being able to load the information straight into a tree structure as it is already in one, complete with opening and closing tags.
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

I'm mainly going for ease of coding at the moment rather than speed. However, if XML really is that slow and unweildy, I'll switch to a text file as Robomaniac suggests.

Btw, here's the code to the camera track path saver/loader. Enjoy! :D
http://eve-corp.com/darkreign3/CameraTrack.zip
Download includes all you need.

Here's a basic control summary:

Track Viewer:
ESC - Exit
Z and X - Swap camera target

Track Creator:
ESC - Exit
Mouse1 - Place a camera point (There MUST be at least one in each track or the viewer will crash!)
Mouse2 - Places a camera target (There also must be AT LEAST one in each track or the viewer will crash...)

Both those crash bugs can easily be fixed... Just couldn't be bothered at the moment to fix em.

PS. The Cal3D problem is still there and still isn't fixed :( Anyone?
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
ManakelCal3dInterrested

Post by ManakelCal3dInterrested »

I think you could had a transform node as parent of Cal3DNode and set his transform matrix to the matrix that do the change of Coords Systems.

Wish i remenber this matrix from my math lessons., have a loock to Viewer Code in Cal3D they perform a bit of it since the viewer is using OpenGl.


I'll try to work on it next week cause i'm very very interrested in adding Cal3D scene node...
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Captain_Kill wrote:I'm mainly going for ease of coding at the moment rather than speed. However, if XML really is that slow and unweildy, I'll switch to a text file as Robomaniac suggests.
I don't know that XML is much slower than parsing a text file as it is essentially a text file itself. It does have the bonus of being able to use the tree that is provided than parsing a text file for data. The XML parser for Irrlicht is pretty basic so I don't think that you would even notice any speed gain you get by parsing the text file.

I think we would be talking about milliseconds and since it would probably be parsed in the loading sequence you aren't really getting see the difference.
ManakelProXML

Post by ManakelProXML »

And anything you write in XML is never lost for any other of your progs....
It is also Human Readable and most often quite understandable from scratch.

So XML is better for:
- persistence and perennity
- clarity of format
- if you use a DOM parser-> easy manipulation of Data and maybe as DB storage (XPATH..)
- if you use Irrlicht Parser->working in about a quarter...
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Just use text, readability isn't a problem, because how much different do you think it is to read

Code: Select all

<point>
<x>20</x>
<y>20</y>
<z>20</z>
</point>
and

Code: Select all

20 20 20
Using xml is overkill, just use a text parser file, they're easy to write, and do the same thing as xml w/o the frills.

If u were writing a format that has more than one type of item, then use xml, other than that, the text parsers are fine
The Robomaniac
Project Head / Lead Programmer
Centaur Force
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

this is a matter of opinion

Post by buhatkj »

robo, i guess you ar ea minimalist, from a spartan perspective, yes a text file is all you generally NEED to make this sort of thing work, but XML just provide so much more when you do a big config file or a complex script. IMHOP, the first seems more clear to me anyways...the x, y, and z are CLEARLY labeled as such . what if for instance, it was a date?? well in europe they do dd/mm/yyyy, whereas in the USA, we do mm/dd/yyyy, so if our file was

Code: Select all

2 10 2004
well now does that mean feb 10, 2004, or oct 2, 2004??? if is was XML, we would have

Code: Select all

<date><month value="2"/><day value="10"/><year value="2004"/></date>
and we remove all doubt. This in essence is why i personally highly recommend XML
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Post Reply