Actors

Frequently Asked Questions about Reality Factory and their answers...
Post Reply
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:20 pm

Q. My player actor is facing the ground!

A. This happens if your modelling program is using a different coordinate system than RF (e.g. 3D Studio Max). Simply change the ActorRotation in the PlayerSetup entity (for actors created in 3D Studio Max this will probably be: X = -90, Y = 180, Z = 0).

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:20 pm

Q. The list of 3rd person player animations is rather long. Do I need an animation for all these predefined animations or can I simpy delete the definitions of the extra animations I don't have?

A. Basically, you need to define all animations.
Also setting up the playersetup.ini file using the same animation names for each animation that is missing, will cause problems, including random crashing, because the animation switching RF is doing requires different names for each animation.
What you need to do is export the animation - even if you only need 1 - as all of the different animation names, so you have identical copies of the animation for walk/run/crouch and all of the other animations.
Simply copying/renaming the animation won't work as there is internal data that needs to be updated as well - you need to actually export the animation as different names.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:22 pm

Q. If I have some extra animations for my player. Would I be able to simply add the name of animation to the playersetup.ini file and it will work?

A. No. Each and every player animation currently supported is added via programming. If you require new animations, you have to program them in or replace the default player with a scripted version (advanced scripting!).

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:22 pm

Q. When trying to export .nfo files from 3D Studio Max an error occurs:

Assertion
Failed In file "..MaxSDK\include\tab.h"
Line 117


A. There are two different versions of the .nfo exporter plugin; one version works with physiqued models and the other works with skinned models. Also, the plugin for physiqued models is found in your "FILE-EXPORT" menu whereas the skinned plugin is a MAXScript file found in the Utilities - MAXScript tool section (on the right hand side of the screen). If you are having trouble exporting as one type, you might try the other.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:24 pm

Q. How do I make an actor with 3D Studio Max?

A. Creating .act files:
  1. Build and texture your model in Max.
  2. Create a bone system and skin/physique your model to it (nfo objects require at least 2 bones to compile properly in astudio.)
  3. Make sure all geometry in your scene is attached to your skeletal system. All extraneous/non- skeletal geometry will cause errors in your Actor Studio compile. Don't use weighted vertices (only 1 bone/vertex).
  4. Export nfo file (keep in mind 0,0,0 in your max world will be the "floor" for the model, so make sure the "feet" rest on the ground plane.) For actors, make sure the nfo pose is the default "airplane" pose for your model. The following steps are just a precaution I take. I know Actor Studio can create .act files without animations (i.e. weapons) but I've never tried to create a StaticEntityProxy without adding an "idle" animation to the .act file, even if it's just a single frame with no motion.)
  5. Set time slider to the length of your animation.
  6. Export key file.
  7. Open Astudio.exe (in the tools folder of your RF installation)
  8. File/New create a new apj file in the folder that has your .nfo, .key and material files (you can point AStudio at a different materials directory if you need to as well.)
  9. Give your .act file a name, point AStudio at your .nfo file, create a new animation called "idle" and point it at your key file.
  10. Build your actor!

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:33 pm

Q. How do I make an actor with Gmax?

A. Apparently you can, copy and paste the link below into your browser:
http://www.genesis3d.com/forum/viewtopi ... &forum=2&6

The Gmax exporter can be downloaded from the RF main site. The files g_keyexp.ms and g_nfoexp.ms go in /gmax/scripts

People are basically having trouble getting the vertices 'rigid' and assigned to only 1 bone, Gmax DOES come with tutorials. Also, there's http://terrymorgan.net/pipeline.zip for getting an .act file out of GMAX using the MD3 exporter.

How to animate and skin a Gmax mesh:

Select the mesh you wish to animate and add a skin modifier. Select the skin modifier and you will see an empty list control with a button under that says "add bone". Click this button and a form comes up with a list of all the bones in your seen. Select all the bones and click the "select" button. Now all the bones you selected are in the empty list control.

Then to assign vertices to bones simply select the bone out of the list and click the "edit envelope" button located right above the bones list. On the viewpoint a strange red and brown rectangular shape will appear around the selected bone. Inside this shape there are square handles you can use to resize the shape. To assign vertices to the selected bone expand the shape to encompass all the vertices the bone should control. Do so until all vertices are assigned to their bone and the export should work.

The Gmax scripts are limited by the Script Listener buffer (you must copy/paste data from the listener into a new text file which is saved in standard ASCII format as *.NFO or *.KEY depending on which script is used). There are 2 problems with this:

1a) High poly count models will run out out of listener buffer space so all the data will not be exported. I tested it on a 1400 model and it worked fine, so for the average G3D actor, this won't be a problem.

1b) Long animations on complex models will likely suffer the same consequences when exporting to KEY.

2) The gMax version of the MaxScript Listener will only let you select a limited amount of text. (Pressing Ctrl-A (which in the full Max version, and most Win32 apps, selects ALL the text), only selects a limited amount of text in the gMax listener. This means you have to hit Ctrl-A (Select All) in the listener to select the maximum amount of text, Ctrl-X to "cut" the text (instead of Ctrl-C [copy] to release the listener text buffer so you can continue to cut/paste more text), then Ctrl-V (paste) the text into your text document. Repeat until all the Listener text has been cut/pasted. If your careful not to move the cursor at all, in either the Listener or your text editor, during the cut/paste operations, you should be OK. Just save the text file with the proper extension and AStudio will see it as the proper file format (NFO or KEY depending on script).

Well, needed and very little known trick with Gmax:

As usual, all is output to the listener window that Gmax has. If you select all, and paste then in notepad or wordpad, it will only paste a very smal paragraph. This can become a pain for a model with high poly count. Trick: select all with left mouse drag - not releasing the left mouse button. Once at the end of it all tap in the right mouse button. Now , depending on the kind of OS you are, you can just go to the "copy" command in the context floating menu that you know so well, and only then, release the left mouse button. That will allow you to copy the full content of the listener without needing nothing extra, just using the mouse.

A Gmax tutorial on Jet3d actors, similar to Genesis3D and RF actors:


http://www.jet3d.com/tutorials/ActorStudio/astudio.htm

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:35 pm

Q. How do I make an actor with TrueSpace?

A. Get the trueGENE actor exporter for TrueSpace (it can be downloaded from the main RF site)
  1. Create your .cob file in TrueSpace and make sure that the textures are the correct size.
  2. Save the .cob and the scene and click on truegene exporter.
  3. Use the "COB file containing body:" button to browse for the .cob file.
  4. It will ask for the texture, browse to your texture.
  5. Use the "Actor/Map file to create:" button to create a filename for your actor.
  6. You may need to set the Scale text box to scale your actor.
  7. Click the "Make Actor" button to make your actor.
If you have animations it is better to have different scenes for each animation. The biggest problem with trueGENE is to make sure that the texture is correct and in the right place. You might want to move the .cob file and the texture to the trugene sample folder.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:36 pm

Q. How to create semi-transparent actors for Genesis3D?

A. You will be needing these:
  • 3D modelling app that can export .bdy and .mot files
  • tga2gebmp2.exe (in the tools folder of your RF installation)
  • Actor Studio
First you need to create 2 textures. The first texture is a .tga file which should contain an alpha layer. Read some tutorials if you don't know how to create an alpha layer. Now you probably won't be needing the second texture but I will because I'm using an old 3d modeller that does not support .tga files. So next we create a 256 color bmp file. Then we add the bmp file to our 3d model and compile it to .bdy file.

Now we have: actor.bdy, actor.mot, skin1.tga, skin1.bmp. Then we compile the .act file using Actor Studio... so now you have actor.act file.

Now open the actor.act file in tga2gebmp2.exe. You will see the actor's materials in the Skin list. Select the one you want to replace, press Replace selected and browse for the new texture. Click on Save changes and you are done.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:36 pm

Q. How do I get Half Life or Counter Strike model files (characters and weapons) into Reality Factory?

A. This is quite simple with MilkShape3D. Put the MDL file in its own directory as a lot of files are produced. If you want to work with non-player actors (ie. monsters) you have to have all the correct MDL files in one directory. For example the AGrunt actor has an AGrunt.mdl and an AGruntt.mdl file. Both are needed or you can't decompile the actor. Some actors have 3 or more files.

In MilkShape3D got to Tools->Half-Life Models->Decompile Normal and select the base file if there is more than one (ie. AGrunt.mdl). A little box will pop up with a bunch of checkboxes. Hit OK. The MDL file will be decompiled into a bunch of SMD files, which can be loaded into MilkShape via File->Import.

At this point go to the main RF site and look for a tutorial on converting HL models to RF actors. It deals with player models but the same techniques apply to all actors.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:37 pm

Q. What are the minimum requirements for a 1st person player actor?

A. The only two animations required for a first person actor are IDLE and CROUCH. That's it. If you want head bobbing when walking, it can be set up with the player setup entity. If you get weird head bobbing, set the head bob number to 8 for the first number and .2 for the second.

An avatar for a first person shooter only requires a set of square geometries that outline the bounding boxes and the only two animations required are IDLE and CROUCH. Most first person shooter avatars will behave properly to this no matter what type of mods are made to the camera height or speed. The IDLE animation is used to set up the bounding box and is used as the default animation if nothing else is available. CROUCH is used to give you the height when crouching.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:38 pm

Q. When I load an actor into ActView, it says 'Engine Begin Frame Failed', why?

A. This typically happens if there is a texture on the actor that is not a power of 2 - 8x8, 16x32, 32x32, 64x32, 128x128, 128x256 etc in size. You can build the actor in AStudio with textures the wrong size but they aren't usable by Genesis3D.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:38 pm

Q. My actors have black spots, white spots, see through holes in their textures.

A. The white spots might be because you have a color in the #255 slot in your bitmaps. This is used to make transparent textures. Open up the bitmap in your paint program, increase the color depth to 24 bit, then decrease to 8bit again and put in 255 for the number of colors, then save. Don't confuse this with the actual level brush transparency scheme, where the color #255 has to be R-255, G-0, B-254. Actor bitmaps color #255 can be any color, whatever is in that slot will not be drawn.

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Actors

Post by QuestOfDreams » Sun Feb 10, 2008 6:39 pm

Q. I made some actors but the bounding box is always too small. It goes from the top to about midway down.

A. You may check if you have placed the root bone of the actor somewhere near the bottom of the model, otherwise the bounding box might start at the middle of the actor.

Post Reply