If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Choosing a Stationary Character (Mesh vs. BIN w/Examples)

This is going to be a long complex post, but I'll try to keep it to the point. Also, it can easily confuse some people, so if anyone doesn't understand something please read it again to make things easier. I will keep this thread updated if needed. Also, I apologise if my photos are too large as I currently don't know how to reduce their sizes.

Okay, I have a character that plays a lute. I tried the Motion Editor for quite some time, at first trying to clip a short loop out of the motion "femturnh" which looks like somebody holding a lute and moving a bit.

SAVE/LOAD - Load Name - String Argument - femturnh. We can change Play Options to play the motion once or play it as a loop, tweaking it further if needed. On the left I have my first lute player and beside him another servant mesh. To play the motion, always click "Done" under SAVE/LOAD. From there move your mouse along the track bar to see frames within the motion.

Frame tab - "Mark Left" of the motion, Set Flag, Start Motion Here. Conversely, mark right of the frame you want and set a flag to end the motion. Click Done under Frame, Save under Save/Load, then Quit MotEditor.

When I first tried this I had a gap between marks for the selected motion frames, but the saved clip was showing the full motion in-game. As a result, I brought the left and right marks very close to isolate one frame. This resulted in a successful stationary mesh frozen in place. One thing to note is that the player's awareness state must be set to "asleep" for it to stand still.

I recently studied the FM "Rebellion of the Builder 2". It has large statues which look like frozen meshes similar to previous effort. So I thought, why not try to bring my mesh into Blender or Anim8or, try to make an object from it, and make my own statue?

After some effort I extracted malsev02.e from Mesh.crf and loaded it 3ds2bin. Yes or No question: This file appears to be a mesh. Switch to Mesh mode? I click No in order to export the .E file as .BIN. Make sure the Mesh box with the green check is left unchecked.

When the .BIN has exported from 3ds2bin, I can now import it into the Blender program as a static object. File - Import - Dark Engine Static Object (.bin). All the flat squares touching the figure are joint planes. You can read more about these from the Low Poly Guild at thiefmissions.com - http://thiefmissions.com/lpg/ImportMesh.html .

I'm not going to get into the specifics of model editing programs, you can read tutorials for yourself. Now I have my .BIN loaded in Blender. File - Export - Wavefront (.obj).

Next I plan to delete the joint planes, insert bones into the character, and position it just like the mesh I had before so that it will be frozen and look like it's playing a lute. After that I would export it as a .3DS and change it back to .BIN.

Why am I doing this? To make it a simple object without a .CAL file or an assigned motion.

I did this for fun, but after I got to the Anim8or stage I wondered is it really worth it to put in the bones and try to position it? Anyway I wanted to test my limits to see how far I'd go.

Last edited by Derspegn; 6th Jan 2019 at 11:44.
Reason: Updated link for LPG at thiefmissions.com, stationary mesh must be asleep

If you are familiar with 3dsmax, you could use Dark Animation Tools for 3dsmax. It lets you import a rigged AI mesh with ease and pose or animate it to your will.

Sorry for the delay, I've had other things keeping me from posting. I don't use 3dsmax, but it might be easier to submit a video of the looped motion clip to a beta tester, and they could get the results I want.

When I go into Game Mode, I can see one clipped loop from where I set left and right marks that were individually flagged as starting or ending points for the motion. Any further attempts to go into Game Mode result in full motion clip in which any "crop" marks are no longer effective. What I'm also noticing is that even though the .mi file is being updated (including start & end points for the motion?), the .mc file is not. I have a "motions" folder in my root Thief 2 folder that I brought over from the Motion Workshop. Usually, if another file is in the root Thief 2 folder, it will be read before any file included in a \RES\name.crf file. I'm still pretty semi-noob with all of this. The 3dsmax route seems easier, but I'll post what I've seen so far for those who want to stay with other programs.

EDIT: I can achieve a motion loop in Game Mode if it is set to "Frame Based" under "Play Options". "Time Based" always seems to result in a static frozen character.

The lute player currently has a DetailAttachment link to Schwaa's lute object. When I click 'Update' on the bottom row of commands at the left, I get the following error message:

When I'm able to have the lute player move in the Motion Editor or in Game Mode, he slowly sidesteps to the right and moves far away from the loot. If I put a stool next to him, this slows it down but the character gradually moves too far right.

Thus far I've spent most of my time with the level's 'building' aspect and only focusing on a few NPCs for motions. By marking frames left and right and bringing them very close I could achieve a frozen position. After looking at Frame-->Set Flag in the Motion Editor, I'm still not sure about Triggers yet or if those have more to do with patrol points related to conversations.

So if I choose to actually have the lute player move instead of staying still, I will likely send a video of a motion loop to a beta tester whenever I get to that point, and they can modify it with 3dsmax, of course receiveing due credit for their efforts.

Create a marker, render it visible and add the shape of the lute. Then attach it to the AI.

I followed these steps, but the mesh continues to step sideways and the marker remains stationary. I'm also getting the same error message about the DetailAttachement having an unsupported physics model. I still get the error message when I change Link Data fields, Optimize, and restart DromEd.

Having someone finish the motion clip with 3dsMax is likely the easiest choice, but my stubborn curiosity won't give up! I had the lgtoolkit readme under the Motion Workshop file another Thief 2 install. It has a description for Blender 2.5, and I have Blender 2.79 installed. The "io_scene_e" file, when placed into scripts-->addons, can allow you to run commands in the Blender Python Console. I will post the code directly:

I don't know Python yet, so I viewed a YouTube video about running a .py script in the console (quite detailed albeit with convoluted details).

After opening the MI2BVH.py script in the Blender Python console, the line that really caught my attention was the "def read_mc...Load the frames from a MC file. I'm curious about that part because in order to get a clip of a motion, the MC file has to be altered from the original. However, this part is different from the "usage" script command.

After using different combinations of script entries, I continually received error messages:

I just want to ask if any Blenderheads would prefer to use these conversions sequences over the ones available for 3dsMax.

In this case a mesh attach might (Renderer--Mesh Attach) be better. Attach it to the right hand and turn it.
This is trial and error work to find the angle/position and offset.

The mesh attach is much more confusing as each joint has it's own center point in relation to X,Y,Z. Here's what I currently have for the stationary mesh (as the AI currently appears in Game Mode) - not perfect but good for now. Now, when the AI shuffles sideways in the Motion Editor, The Lute is definitely attached to the lute player!

Why on earth are you not using DetailAttachment? Just create a marker, make it rendered, set its shape to the lute and attach it to the AI's right hand or wrist and adjust the offset and rotation. Mesh attachments are a big steaming mess these days.

Why on earth are you not using DetailAttachment? Just create a marker, make it rendered, set its shape to the lute and attach it to the AI's right hand or wrist and adjust the offset and rotation. Mesh attachments are a big steaming mess these days.

When I used DetailAttachement before with a marker (rendered & shaped), It was attached to the AI's abdomen. I originally tried the right hand and wrist using the actual lute object, but it didn't look as good as when I made an attachment to the abdomen and adjusted it.

I'm also experimenting with with a standing motion (motion: femturnh, Schema Conv 128). When I set flags as start & end points after marking left & right within the motion track and play it in the Motion Editor, the AI will gradually move sideways to the AI's right side. With the previous DetailAttachement, the AI was moving but the marker (lute) was remaining stationary in place. I can go back and attempt another DetailAttachement as you suggested to compare results.

If I allow the AI to move instead of standing frozen I'd be looking for a motion clip where the AI returns to the original standing position without stepping sideways. The easier option seems to have another person do this with 3dsMax because I only use Blender (even though the lgtoolkit included a python folder for Blender 2.5). Here is a portion of the readme.txt for the lgtoolkit:

Code:

Looking Glass Toolkit for Blender 2.5
1. Install Python 3.2.
http://python.org/download/
2. Install Blender 2.5.
http://www.blender.org/download/get-blender/
3. Install the E plugin.
Copy "io_scene_e" to your Blender addons directory.
"%USERPROFILE%\AppData\Roaming\Blender Foundation\Blender\2.58\scripts\addons"
Python MI2BVH.py Input.CAL Input.MAP Output.BVH
or Input.MI Input.CAL [Input.MAP] [Output.BVH]
Reads the MI/MC with CAL and MAP, or a CAL with MAP and write to the BVH file.
Writes to standard output if no BVH file is specified. If the motion file is
omitted, a model hierarchy alone is written.
Motion data is stored in two files. The name of the MC file is inferred from
the MI file name. A motion name of FOO.MI will be associated with FOO_.MC.
The .MI extension may also be omitted and it will be added automatically.
The MAP file is (sometimes) optional when a motion file is being read.
Mappings for standard creature types are built-in. Unusual or custom joint
names will need a MAP file. A MAP file is always needed when reading a
CAL file alone.
Python BVH2MI.py Input.BVH Input.MAP CreatureType Output
or Input.BVH CreatureName Output
Creates a MI/MC pair of files with the output name. The .MI and _.MC extensions
are added automatically.
Creature type is a hex number. It can be one of the following:
7FFFF : Human
FFFFF : HumanWithSword
3FFFF : Droid
FF : SpidBot
1FFFFFFF : Arachnid
E : PlyrArm
3FFFFF : BugBeast
1FFFFF : Crayman
7F : Sweel
7 : Overlord
Or specify the name of the creature to use a built-in mapping.

After some effort I extracted malsev02.e from Mesh.crf and loaded it 3ds2bin. Yes or No question: This file appears to be a mesh. Switch to Mesh mode? I click No in order to export the .E file as .BIN. Make sure the Mesh box with the green check is left unchecked.

When the .BIN has exported from 3ds2bin, I can now import it into the Blender program as a static object. File - Import - Dark Engine Static Object (.bin).

Perhaps I've missed something but it seems like several unnecessary steps are being performed.

The .e file can be converted to .3ds using the program Eto3DS (there should be a copy in Thief2\Tools\3dstobin\3ds\Workshop, and it runs from the command prompt). Anim8or can import that file format, as can Blender and many other object programs.

The .e file can be converted to .3ds using the program Eto3DS (there should be a copy in Thief2\Tools\3dstobin\3ds\Workshop, and it runs from the command prompt). Anim8or can import that file format, as can Blender and many other object programs.

Correct, and I discovered that fact (in regards to command prompt) only after I posted. The way I described is another way to go about it, but a bit more complicated.

EDIT: In regards to importing objects into Anim8or, I've had better success with menu commands with .obj files. This may only apply to my own computer. This screenshot shows gaps between edges in a roof I was trying to bridge together. When using the Edit--Bridge command, I could select two faces when using an .obj file, but not with a .3ds file. In both cases, the circular icon for moving an object around was turned off.

Why on earth are you not using DetailAttachment? Just create a marker, make it rendered, set its shape to the lute and attach it to the AI's right hand or wrist and adjust the offset and rotation. Mesh attachments are a big steaming mess these days.

I made a new DetailAttachement for the rendered marker to the AI, this time at the right wrist. It has the same settings as the previous DetailAttachment that was attached to the AI's abdomen. Appearance-wise it looks better than the Mesh Attach I made, but in the Motion Editor the AI is still not bound to the side-stepping AI, whereas the marker is bound to the AI with a Mesh Attach. With the DetailAttachment, the marker is unbound mid-motion, regardless of the setting under DetailAttachment--Link Data--Type.

In the Motion Editor I load the motion "femturnh". The motion track is marked and flagged to indicate start and end points for the clip to be viewed. This method only updates the .MI file, but not the .MC file.

If you add the lute to the AI's hand I would think the lute should be oriented in a way that the motion places the hand & lute correctly in front of the AI.

One thing that you might have already considered is that the first frame and last frame of the motion should arrive physically at the same place, and the motion should include the AI moving to one position and back to the original position. Its been a while since I used the motion editor, and on today's resolutions it almost requires a microscope to see the stick figure's limbs. To me its hard to see the limbs rotate. Anyway all of the motion values should be the same in the first and last frame to make the motion seemless. You could probably get away with the last frame being the same as the second frame since in a loop the first frame will appear again after the last frame.

The motion database needs the .MI and .MC files. I'm trying to see if I need to change the .MC file somehow in order to change the motion. It appears that these files are required (.MI) and referenced (.MC), but I wanted to see if I could test an update of the database.

As per instructions, in order to update the motion database, I brought over files (with updated femturnh.MI) from my Thief 2 install for making the FM and put makmdb.exe in a separate install which contains the files "motions" and "MSchema".

!make.mdb.cmd was placed into "Cmds" in the same install.

The default motiondb.bin was copied into a "backup" folder in the test install.

In Command Prompt, I navigated to the T2 install for testing and typed Makmdb [motiondb.bin]. I also tried Makmdb [motiondb]. In either case, the motiondb.bin did not update, and no Nmotiondb.bin file was created.

I have never opened AdvancedBow.mos, so I'm unsure about the "Undefined Tag" message.

I dont like answering when I can't reference my pc, but alphbetically I believe AdvBow is the first motion tag and there should be an additional file tags.moc that contains just the motion tags. Makmdb.exe is probably looking for this file and bails out because its not present in your test folder.

I dont like answering when I can't reference my pc, but alphbetically I believe AdvBow is the first motion tag and there should be an additional file tags.moc that contains just the motion tags. Makmdb.exe is probably looking for this file and bails out because its not present in your test folder.

I just checked the MSchema folder in my test install and tags.moc is present. What could the error be from then?