HomeNewsFeaturesLicensingDownloadsScreenshotsFAQRoadmap Contact Us
Search:
3 Online

Community

Discussion Topics Recent Postings User Contributions General Articles Example Documentation Credits

Licensed Developer

Programmer's Manual Artists Manual Tutorials and Articles

Programming: Game Code

Game Code Overview Server Side Game Code Client Side Game Code

Programming: System

Alphabetical Function List Renderer File System Collision & Ray Casting Low Level Audio Game Audio The Console Console Variable List Multiplayer Localisation Maths Library Memory Manager Model File Formats Texture Formats

Art: Overviews

Specifications Shaders Particle Systems Lens Flares Cipher console Cipher file types Tutorials Reference

Art: Tools

Shader Designer Particle Designer 3dsmax tools Model Conversion Font Generator

Cipher Engine
Game Development Search Engine
GameDev.net
You are not signed in - [sign in] [register]
Animation Update Thursday, January 29, 2004

A new update has been posted that adds support for attaching animations from one model to another model. This has been designed to be used in cases where you have a lot of models that share the same skeleton and use the same set of animations. For example, all the people in your game might use a common skeleton and all use the same walk, run etc animations. This function allows you put all the animations into one model, and leave all the other characters with just a single reference frame. You can then attach the full animation set to each model after loading them, saving a load of memory and making model exports easier.

This release also fixes a couple of issues with the previous release.

Licensed developers can download the update from the usual place.

Below is a list of all the changes...

  • Fixed lighting issue in Shader Designer (models are brighter again)
  • Added new function to attach animations from one model to another model (r_AttachAnimation).
  • Exposed r_AttachAnimation to cgame, via cipher_r_AttachAnimation.
  • Updated New Game Wizard to support the new function.
  • Ciphertool was always regenerating normals on models. This is now off by default, using the normals in the .ase file. You can enable it by using the ciphertool command RegenerateNormals 1. Execute ciphertool +listcmds for more info.
  • Defaulted VBO to off. If you are using ATI hardware on your dev machine, set r_arb_vertex_buffer_object to 1 for a big speed boost. If you are using Nvidia hardware, leave it off for now, as there are driver issues.

Update: Build 2791 released. This fixes the bounding box bug when attaching new animations to a model.

User Contributed Comments

rikh 29th January, 2004 21:28
This update should fix most of the issues people experienced with the previous release, plus it adds a new animation feature.


Iguana 29th January, 2004 22:58
Huhuhu *crying*
I just did a quick hack of the attach animation issue for Charles today. Rik was faster then me again :-(


JiuQ 30th January, 2004 01:12
thanks rik :)


Charles 30th January, 2004 02:07
Iguana, what can I say... sorry. Don't cry ;), you helped me, so I will create the model and animations you asked for your prototype. I'll get back to you on this.

Rik, what can I say... PERFECT.

(By the way, I have nVidia hardware (GeForce FX), and with r_arb_vertex_buffer_object set to 1 it runs much faster.)


Charles 30th January, 2004 02:13
Ooops... sometimes the model with the attached animation disappears.

I have the Michael3 model walking about my scene, and when I rotate the view with the mouse (during animation), then at a certain spot the swimsuit disappears, but when I direct the mouse back into the previous position the swimsuit appears again. Strange, so under certain angles (?) the model doesn't show.

To make it clearer maybe: moving the mouse slightly but quickly right-left-right-left at a certain point makes the swimsuit go 'on and off'.
Edited 30th January, 2004 02:18


rikh 30th January, 2004 07:45
Docs for the function can be found here...
http://www.cipherengine.com/prog/func.php?f=re_AttachAnimation


rikh 30th January, 2004 07:48
This looks like it is probably a bounding box issue. Your models move away from their original origins during animation, don't they? When the animation is attached, it looks like it will need to regenerate the bounding boxes for the model, based on the animation data provided (or just use the bounding box data from the source model...)


Charles 30th January, 2004 11:05
Yes, the models move away from their origin.

With which functions can I regenerate the bounding box for these models? I found 'bsp_InsertEntity', but I'm not sure how to use it.


rikh 30th January, 2004 13:33
Sadly there isn't one at the moment. I am updating the attach animation stuff so that it will do this automatically.


Charles 30th January, 2004 13:55
Okay, do you have an idea on when you will release this?


Charles 30th January, 2004 15:36
I'm testing the new version, and now I notice that (with the same code, I copied it into the new Temple Demo code from the 2789) Cipher crashes after using 'cipher_r_AddItemToScene'. But I can't reproduce the error exactly, because it crashes on different occasions, and not always 'cipher_r_AddItemToScene' seems to create a crash.
Edited 30th January, 2004 16:29


rikh 30th January, 2004 22:48
Soon hopefully. Not sure what the crash problem you are getting is. I assume you have done a rebuild all of all your game components, cipher and the renderer to make sure they are all in sync. The update added a new function to the interface of cgame, so you will need your game code to be in sync with the engine.
CCC, temple and the dancer are all running without errors, and they all make heavy use of that entry point. Try running a debug verion in the debugger and next time it happens you will be able to see where and why.


Charles 30th January, 2004 23:34
I compiled all the debug-dll's and debug-programs (core and renderer), but I get an error when I try to start Cipher: "cgame version error. Expecting version 9. Found version 10."

In cgame I added some c++ code and changed cg_main into a cpp-file. How can I make Cipher recognize this file as 'version 9', or what did I do wrong? Thanks.
Edited 30th January, 2004 23:35


Iguana 31st January, 2004 07:51
You have to recompile your cgame.dll as well with the updated .c and .h files. That means 'cg_syscalls.c', 'cg_local.h' (check if you did modify it) and 'cg_public.h' and 'r_api.h' in the 'common' folder.
BTW, I had to recompile the temple demo as well before I could start it.


Charles 31st January, 2004 12:53
Thanks Iguana, I got it running in debug mode.


rikh 31st January, 2004 14:48
The latest update added a function to the cgame interface, so you will need to make sure that the 2 files Iguana mentioned are up to date. The easiest way to do this is to run the New Game Wizard, make a new sample and then copy these 2 system files over and rebuild.


rikh 31st January, 2004 15:09
Ok, the bounding box bug has been fixed. Download build 2791 to get it.


Charles 1st February, 2004 22:57
Okay, I'm sorry, it was absolutely not 'cipher_r_AddItemToScene' that created an error, it was my amateuristic code. Thanks for all the help.

And now I'll be testing the new 2791, great that you fixed it Rik, thanks!


Charles 5th February, 2004 02:02
I've tested my project on the 2791 with the 'r_AttachAnimation'-function for all models. It runs perfectly, no models are disappearing anymore. I brought the heapmegs down from 600 MB to 150 MB. I now can add new models in a flash... This is really a MAJOR improvement. Thanks again Rik.
Edited 5th February, 2004 02:05


Charles 9th February, 2004 12:30
This animation update has been really important to our project. Parallel to this development I'm working on a larger animation system concept for Cipher, which integrates morphing, dynamics and advanced skeletal animation etc.

My question is about the following. At this point models can use skeletal animation from another model as long as they use exactly the same skeleton.

Now, would it be possible to create an extra function that (during runtime) converts a 'universal' skeleton to the skeleton a model really needs? This way you just need one model with all skeletal animation. In our project we're using several human characters which have different hights, and therefore different skeletons.

I guess the .skl-data should be converted in realtime, and maybe that is just too heavy during runtime?
Edited 9th February, 2004 12:30


rikh 9th February, 2004 13:09
The only real requirement for "same skeleton" that Cipher cares about is that the bones are in the same order. for example, if the upper leg was bone 12 in your source animation, it would need to be bone 12 in the destination model as well. As long as the source model has at least as many bones as the destination model, then Cipher is happy.

If all your skeletons are basically the same (eg all human with the same bone layout) then it might just work. Give it a try and see...


Charles 9th February, 2004 15:03
I tried to do this, but it only works for the one of the models.

I have three models: a male body-model, hair-model and swimshorts-model. I also have a female model, which is about 15 centimeters shorter (its skeleton too). I use the female skeleton animation on the male body, hair and swimshorts models. Only the male body model adapts perfectly.

The hair is placed too low, the swimshorts are placed too high. I've updated the hair models z-origin for each frame, but this doesn't work completely: when the male model turns his head, the hair also turns, but in a slightly different way. As a result it intersects with the male head and becomes partially invisible (it's not correctly attached to the head).

Only the male body uses all the bones, and maybe that is the reason it is animated correctly. The hair only uses the 'Bip01 Head' bone for instance.
Edited 9th February, 2004 15:06


Charles 11th February, 2004 17:28
Hello Rik,

Do you have any suggestions on this issue? The hair and swimsuit have a skin based on the same skeleton, but they don't use all of the bones.

Or maybe I can calculate the right position of the hair and swimsuit models in a way that I just can't figure out? It feels like there is an easy solution to this.

It would be great if I could end up with only one model that contains all the animation.
Edited 11th February, 2004 17:28


rikh 11th February, 2004 18:15
Not using all the bones shouldn't be a problem at all. Make sure the hair / etc were attached to the bones in the exact same reference pose as the master animation file though, or all the offsets that Cipher calculates might be off by a bit.


codeman01101001 15th February, 2004 15:01
Hello Rik,

I have a question about the way you are submitting new versions of the cipher source code.

It would be very comfortable for me if you submit a patch file with the changes of the new release along the full source code. I am also working on the source code and a merge of your changes would be much more easier with a patch file instead of the full source.

Would it be possible to submit such patch files?

Thanks in advance
Edited 15th February, 2004 15:02


JiuQ 15th February, 2004 16:30
Chances are the patch file won't apply cleanly on a lot of licensee's codebases, and that would bring a lot of grief to a lot of people :)
A CVS server would be nice, but Cipher not being a huge engine, it's not that big a deal.
Use WinMerge (free and opensource) to do your merging between releases, and always keep a clean copy of the source to be able to see what's changed, on top of your own codebase.
Or start your own local CVS or Subversion repository, and import the new releases into it, which will allow you to merge back your codebase into your repository.
Note that all these solutions, including the one your prefer, having patches, don't do anything for you when you get conflicts : it's always back to browsing by hand in those cases...
HTH


anadara 2nd March, 2004 05:15
could you give me some hint about the volumetric shadow?
my model shadow look awful.
i have follow the right specification for volumetric shadow.


Charles 2nd March, 2004 16:30
Hello anadara,

Can you post a link to a screenshot with the bad shadows? Or can you mail it to me at caster@xs4all.nl ? I've solved shadow problems in the past, so maybe I can help you.
Edited 2nd March, 2004 16:30


codeman01101001 2nd March, 2004 17:28
There are many people, who have those shadow problems
Me too.

The Solution was here:

http://www.cipherengine.com/discuss/viewthread.php?t=672

But after i changed the code , nothing changes ;)




Register and Sign In to discuss this article