Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » Logical Bodytypes
Logical Bodytypes[message #257910]
|
Fri, 30 July 2010 03:10
|
|
Bio |
|
Messages:62
Registered:April 2009 Location: Rhineland-Palatinate/Germ... |
|
|
Hi there,
It's been well over a year since I posted the last time. Sorry for the long absence.
I decided to create a new thread for this (the last one went a little astray). I hope that is OK. As you know, last year I presented my framework for batch rendering multi-layered, shadow-casting animations and for batchprocessing the rendered images into STI archives ready to deoploy (since the applying of the palette is in the mean time also done automatically, there is actually zero user input required, you simply start the script and let it do the heavy lifting). I was a little disappointed that there was so little interest in actually using said framework; I guess it is because 3dsmax6 is a prerequisite (though newer versions might work as-well). If any of you have access to 3dsmax and would be willing to invest some time, that would be very much appreciated.
After realizing last year, that multi-layered body types were not gonna be a reality anytime soon, I didn't find the motivation to continue animating my model (by then, I had invested way more time in the automatic rendering process of pixel-acurate acurate layered animations (including layered shadows), that the little time I had spend modelling/animating didn't seem relevant). And since I am not a graphic designer, modeller, animator or somesuch by any stretch of the imagination, but merely a programmer, I set myself the goal to implement multi-layering, before doing anymore modelling/animating (especially since I was still hopeful, that some other people would chime in to help on that front). I started analyzing the code, then I contacted BirdFlu, because he had done some preliminary work in that direction. He provided me with the stuff he had already done (in terms of externalizing the animation database). I din't end up using any of his code, though I did take over some of his ideas. However, shortly after I had set out to implement layering, my vacation was up and I had very little time (and even less interest) to keep on working on that stuff. I have a 1.5h drive to work + the usual massive overtime so I'm rarely getting home earlier than 9pm. Let's just say when I get home I'm way too tired to continue doing basically the same stuff I do in the office...). This week I had vacation and since I didn't have anything else on my queue I went back to the layering function. And I have progressed quite nicely and far enough to have something to show.
Since it is so hard to add a new physical bodytype to the game (since everything is hardcoded), I decided to instead implement what I termed logical body types. The idea is to let the current animation/surface model as-is. And implement something on-top of it. Whether this will be the implementation that will be used in the end, or not (if BirdFlu gets around doing his thing, which basically would be to externalize all animation data, requiring a substanial re-work of the current implementation. But would probably be cleaner and also faster). So, because my system is build on-top of the old one (and the integration in the rendering process, is a little, well..., let's just leave it at that). My datamodel is pretty much finished. I am completely by-passing the caching mechanism (to safe memory only a sub-set of the surfaces used for rendering the animations is kept in-memory). Instead I am loading all surfaces (until I have a good reason for not doing so). Currently the memory requirement of the game is just above 100MB (with all my surfaces in memory). Since it is not 1999 I thought it prudent to not spent much time on a feature, that might not be needed anymore). I had my doubts about the efficiency of my system, but as I said already, that seems to have been unnecessary. The CPU load for the JA2 process is at under 2% while rendering multiple mercs on my machine, with a couple of logical bodytypes, a number of layers and a number of filters defined.
OK, guess it's time for some details. There are 4 XML files that have to be altered to implement a logical body type.
AnimSurfaces.xml:
here the surfaces are defined. With animation specific data and links to the STI container for the animation and the struct type file.
Layers.xml:
contains the layer hierarchy. Currently there are 15 distinct layers defined (how many will be fully realizeded is basically merely a matter of modeling/animating and editing XML files. For instance it would be trivial to add different heights, simply scale the model and all props with it down and re-render the whole thing). For now I have implemented 3 layers (corresponding to what STI files I had ready from last year). Namely: the body (only in the rifle-bearing posture, since this is the one I had done last year), the vest and the right hand (or weapon). I will probably add a backback next. Because it is easy and to test how the layering concept copes with backpack + body + weapons layers simultaneously.
Filters:
this is the logical component of the logical body types. Mind you filter is probably not the right term, but it will do for now. Anyway, these filters are quite powerful. You can match against a ton of different stats. And there is a nice arsenal of operators at your disposal. A small except:
You can match against:
the physical bodytype, the merc's name, nickname, against his skills/expierence, his sex, his traits.
you can match agains team affiliation, against merc type and of course and most importantly against stuff he wears (for every single pocket).
Operations availabel are: and, or, not, equal, greater than, less than, between and in. This is all already implemented and should be ready tobe uses.
BodyTypes:
the final data file. Brings everything together. Here are all the logical body types defined. A logical body type consists of a filter (The system determines the first body type that matches and uses this for rendering) and of an arbitrary number of animation surface layer elements that belong to a certain animaton sate (WALKING, STANDING, aso.), to a certain layer, links to one of the animation surfaces defined in AnimSurfaces.xml and of course can have a filter assigned (for instance IsAk47TypeGun). As you see this system is extremely flexible. You can define new layers and bodytypes. By just editing the XML files.
The data model is pretty much completed (I have some minor issues on my TODO list, but it is working flawlessly and also much more efficient than I had hoped). The rendering part seem to work quite nicely. However I still have a problem with some artifacts (black pixels). Might be connected to the rendering of the shadows. However, it is not that bad and will certainly be ironed out soon.
Sorry for this unorganized write-up. I usually try do edit out all the typing errors and superfluous sentences that I'm prone to produce and I'm afraid this time it is especially bad - sorry for that. I have practically worked on this for 2 days str8 and find it quite hard to articulate a coherent sentence at the moment (and to spell it correctly too - ugh!)
Here are some screenshots showing the layers in-game (sorry for not providing a video, but the animations are not exactly professional grade anyways ) and some of the stitched PNGs produced by the batch rendering framework (these PNG are than cut and cropped and added to the STI containers). If someone wants to try this stuff, I can provide a build with my additions (using the current tip revision) and the needed data files.
OK. The screenshots are not very enticing (and I probably should have made a gif animations to visualize the differences better). However, fully layered, flexible body-types are a reaility!
For kicks: the filter configuration used for these screenshots.
MERC_TYPE__AIM_MERC
0
0
606,616
14,25,26,35,347,602,603,608,655,656,706,708,742
795,797
12,23,346,715,797,630,632,633,662,762,763,769,1066,1070,1072,1077
MALE
SOLDIER_CLASS_ARMY
FEMALE
Len
Ivan
MERC_TYPE__AIM_MERC
Bun
And the coresponding body type xml:
The following are just the monolithic stitched renders (with palettes applied). Don't know why only the preview for the middle one is being displayed. They are all the exact same size and uploaded the exact same way.
[Updated on: Fri, 30 July 2010 03:12] by Moderator Report message to a moderator
|
Corporal
|
|
|
|
|
Logical Bodytypes
By: Bio on Fri, 30 July 2010 03:10
|
|
|
Re: Logical Bodytypes
By: Beka on Fri, 30 July 2010 03:35
|
|
|
Re: Logical Bodytypes
By: Slax on Fri, 30 July 2010 04:19
|
|
|
Re: Logical Bodytypes
By: Kaerar on Fri, 30 July 2010 07:18
|
|
|
Re: Logical Bodytypes
By: Zarax on Fri, 30 July 2010 09:53
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: lockie on Fri, 30 July 2010 18:30
|
|
|
Re: Logical Bodytypes
By: P.Val on Fri, 30 July 2010 18:54
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Bio on Fri, 30 July 2010 22:18
|
|
|
Re: Logical Bodytypes
By: Bio on Fri, 30 July 2010 23:07
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Bio on Sat, 31 July 2010 01:25
|
|
|
Re: Logical Bodytypes
By: Bio on Sat, 31 July 2010 01:36
|
|
|
Re: Logical Bodytypes
By: Mauser on Sat, 31 July 2010 02:27
|
|
|
Re: Logical Bodytypes
By: Bio on Sat, 31 July 2010 04:38
|
|
|
Re: Logical Bodytypes
By: Bio on Sat, 31 July 2010 04:51
|
|
|
Re: Logical Bodytypes
By: Slax on Sat, 31 July 2010 05:32
|
|
|
Re: Logical Bodytypes
By: Toneone on Sat, 31 July 2010 16:21
|
|
|
Re: Logical Bodytypes
By: Mauser on Sat, 31 July 2010 20:11
|
|
|
Re: Logical Bodytypes
By: Bio on Sat, 31 July 2010 21:29
|
|
|
Re: Logical Bodytypes
By: Yombie on Sun, 01 August 2010 01:40
|
|
|
Re: Logical Bodytypes
By: Mauser on Sun, 01 August 2010 21:04
|
|
|
Re: Logical Bodytypes
By: Bio on Sun, 01 August 2010 21:34
|
|
|
Re: Logical Bodytypes
By: Bio on Sun, 01 August 2010 21:52
|
|
|
Re: Logical Bodytypes
By: lockie on Sun, 01 August 2010 23:05
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Kaerar on Mon, 02 August 2010 03:36
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: cdudau on Mon, 02 August 2010 18:46
|
|
|
Re: Logical Bodytypes
By: lockie on Mon, 02 August 2010 19:27
|
|
|
Re: Logical Bodytypes
By: Bio on Tue, 03 August 2010 05:45
|
|
|
Re: Logical Bodytypes
By: deknegt on Tue, 03 August 2010 13:12
|
|
|
Re: Logical Bodytypes
By: clbg on Tue, 03 August 2010 13:19
|
|
|
Re: Logical Bodytypes
By: Bio on Tue, 03 August 2010 13:21
|
|
|
Re: Logical Bodytypes
By: lockie on Tue, 03 August 2010 19:44
|
|
|
Re: Logical Bodytypes
By: Bio on Wed, 04 August 2010 02:56
|
|
|
Re: Logical Bodytypes
By: Bio on Sun, 08 August 2010 10:01
|
|
|
Re: Logical Bodytypes
By: lockie on Sun, 08 August 2010 11:53
|
|
|
Re: Logical Bodytypes
By: CptMoore on Sun, 08 August 2010 13:38
|
|
|
Re: Logical Bodytypes
By: Bio on Sun, 08 August 2010 20:50
|
|
|
Re: Logical Bodytypes
By: CptMoore on Sun, 08 August 2010 22:06
|
|
|
Re: Logical Bodytypes
By: Bio on Mon, 09 August 2010 01:46
|
|
|
Re: Logical Bodytypes
By: Sandro on Thu, 12 August 2010 01:41
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Mauser on Mon, 23 August 2010 19:09
|
|
|
Re: Logical Bodytypes
By: Bio on Mon, 23 August 2010 23:49
|
|
|
Re: Logical Bodytypes
By: Beka on Tue, 24 August 2010 14:20
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Mauser on Wed, 25 August 2010 07:06
|
|
|
Re: Logical Bodytypes
By: SharkD on Sat, 28 August 2010 07:45
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: jmaze on Tue, 07 September 2010 22:53
|
|
|
Re: Logical Bodytypes
By: Bio on Wed, 08 September 2010 01:04
|
|
|
Re: Logical Bodytypes
By: Bio on Wed, 08 September 2010 01:33
|
|
|
Re: Logical Bodytypes
By: jmaze on Wed, 08 September 2010 06:32
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: mtb20 on Wed, 08 September 2010 11:46
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: tais on Wed, 08 September 2010 12:11
|
|
|
Re: Logical Bodytypes
By: Mauser on Wed, 08 September 2010 13:45
|
|
|
Re: Logical Bodytypes
By: CptMoore on Wed, 08 September 2010 13:57
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Sun, 12 September 2010 21:27
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Fri, 24 September 2010 07:15
|
|
|
Re: Logical Bodytypes
By: Bio on Tue, 28 September 2010 21:23
|
|
|
Re: Logical Bodytypes
By: Khor1255 on Tue, 28 September 2010 21:42
|
|
|
Re: Logical Bodytypes
By: Mauser on Tue, 28 September 2010 22:30
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Tue, 28 September 2010 23:28
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Tue, 05 October 2010 21:27
|
|
|
Re: Logical Bodytypes
By: Bio on Sun, 10 October 2010 03:29
|
|
|
Re: Logical Bodytypes
By: Mauser on Sun, 10 October 2010 04:04
|
|
|
Re: Logical Bodytypes
By: Slax on Mon, 11 October 2010 16:07
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Mon, 11 October 2010 22:48
|
|
|
Re: Logical Bodytypes
By: Bio on Mon, 11 October 2010 23:41
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Mon, 11 October 2010 23:54
|
|
|
Re: Logical Bodytypes
By: sorca_2 on Tue, 12 October 2010 06:06
|
|
|
Re: Logical Bodytypes
By: Bio on Tue, 02 November 2010 02:14
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Bio on Thu, 18 August 2011 16:08
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Cell on Sun, 21 August 2011 00:05
|
|
|
Re: Logical Bodytypes
By: lockie on Sun, 21 August 2011 13:52
|
|
|
Re: Logical Bodytypes
By: Cell on Sun, 21 August 2011 15:20
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: Cell on Sun, 21 August 2011 15:43
|
|
|
Re: Logical Bodytypes
By: Bio on Wed, 14 September 2011 00:43
|
|
|
Re: Logical Bodytypes
By: izechias on Tue, 20 September 2011 22:13
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: The_Bob on Mon, 23 April 2012 22:19
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: The_Bob on Tue, 24 April 2012 01:07
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
|
|
|
Re: Logical Bodytypes
By: merc05 on Sat, 21 December 2019 18:27
|
|
|
Re: Logical Bodytypes
By: The_Bob on Thu, 23 January 2020 02:47
|
|
|
Re: Logical Bodytypes
By: merc05 on Thu, 23 January 2020 22:12
|
Goto Forum:
Current Time: Sat Sep 14 05:57:09 GMT+3 2024
Total time taken to generate the page: 0.02655 seconds
|