by date
Getting a Poser character into the Adventure Kit
Getting a Poser character into the Adventure Kit
| Name: | GamerGirl | |
|---|---|---|
| Date Posted: | Dec 28, 2006 | |
| Rating: | 4.7 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for GamerGirl |
Blog post
I've been lurking here at GarageGames as an owner of both TGE and TGB, but never posted a blog entry... mostly because I wasn't sure what I could talk about that would be useful. I never had time to get very far into a project because I was in one mad crunch after at work.
I'm starting a new project in TGB, which has come a long way since the Early Adopter version I bought when it first became available. I'm trying to find my way around as a newbie, so I figured I would blog about some of my discoveries in case they help other folks who are just starting out. For you experts, it may seem like trivial stuff, but it's not that obvious when you're just starting out in TGB (and you're not much of a programmer). There are also probably easier ways to do some of this, so let me know and I'll keep this updated so it's useful.
GETTING A POSER CHARACTER INTO THE ADVENTURE KIT
Uses TGB, Adventure Kit, Poser 6, and Photoshop
1) Take a single frame of one of the orc animations (I used the run east) and save it out as a jpg. You can resize it to 2X or 3X to make it a bit easier in Poser. You can find these in the TorqueGameBuilderPro\games\resources\AdventureKitArt\sprites folder.
2) In Poser, choose File/Import/Background Picture and import the orc frame you saved out. If it asks you to resize the main window, let it resize. Your main view window should look something like this.

3) Select the Front camera from the Camera Controls.
3) On the parameters panel, set the Front camera to the settings below. This gets the camera roughly in the right position, in a view with no perspective.

4) Put a figure into the scene. I used Jesse Casual for the first test, because it's easier to tell which leg is in front, etc. when the figure has clothes on.
5) Choose Body for Figure 1 from the pull-downs on top of the view window, then set its parameters to match the ones below. This puts the figure in the right position relative to the camera, and turns it to face east (which matches the orc, if you used an eastern-facing pose for your background). Note that the orc is broader and shorter than the Poser male, so there will be a bit of difference in how they look.

6) Put whatever animation you would like onto the character, but don't change his translation. He will be moved through code.
7) Choose Render Settings... from the Render menu. Set the first tab (Render Settings) to whatever style you want.
8) Go to the second tab, Movie Settings, and use the settings below. Note that the Every Nth Frame setting of 3 works only if your animation has 30 frames in it. The goal is to have 10 total frames, so TOTAL FRAMES / X = 10 gives you your Every Nth Frame setting (the X in the equation).

9) Render the movie and it will save a series of PNG files with no background... which is just what we want, except as separate frames.
10) In Photoshop, open the orc animation file that matches the animation you just made. For me, it was the orc forward east animation filmstrip.
12) Open the 10 frames you rendered from Poser. It helps if you arrange them in numerical order, since they will come in out of order (for example, file 12 opens before file 1).
13) Starting with the first frame of your Poser animation, with the Move tool (see below), drag the Poser animation frame onto the orc animation frame, lining it up with the orc.

14) Continue to drag and drop each frame of the Poser animation onto the orc animation. Note that each drag and drop produces a new layer.

15) When all frames have been added, select all but the last (orc) layer in the layer window. With the move tool still selected, choose center align vertical and center distribute horizontal from the tool bar to line the animations up.

16) Hide the last layer (the orc) by clicking on the eye icon to its left.
17) Save the file. I usually save it as a layered PSD first, then do a Save As to generate the PNG.
18) Open TGB, and make a new project using the Adventure Kit template.
19) Add the new .png as an imagemap, choose CELL as the type with the spacing of 10 horizontal and 1 vertical. That should break it up into cells of 165 X 165.
20) Create a new animation using that imagemap. Click Use All Frames and it makes it right away. Remember the name you used for it. I just substituted "man" for "orc" to make it easier.
There is probably an easier and neater way to do these next steps, but here is what I did.
21) Open the managed/datablocks.cs file for your project, and the resourceDatabase.cs file from the resources/AdventureKitArt folder. Find the datablock in resourceDatabase.cs that matches the animation you did. For example, if you created a new forward east animation, you would find the datablock that starts with
.
22) Copy the entire line that starts with "dir" for that animation. For the forward east animation, it would be
.
23) In the datablocks.cs file, find the new datablock created for your animation. At the end of that datablock, paste in the line you copied that starts with "dir." That sets the direction for the animation so the app will use the correct one.
24) Close and save the datablocks.cs file.
25) Open the /gameScripts/orcAnimSets.cs file, and find the orc animation that matches the animation you changed. Since I'm working with the forward east animation, this is the block that applies to me:
etc.
26) Change the name of the anim you made to match the datablock you set up in TGB. For me, that line was OrcRunAnims.add( man_forward_eastAnimation );
When you start TGB again, load your project, then load and play the start level, you will see your new animation replacing the old one!
A better way to handle those last few steps would be to create a new AnimSets file for your new character, but this gets the animation into the game ASAP. Since you saved the PSD file, it's easy to go back and tweak the placement of any of the frames to make it line up better. Just save the .png over the old one, and you're in business.
I'm starting a new project in TGB, which has come a long way since the Early Adopter version I bought when it first became available. I'm trying to find my way around as a newbie, so I figured I would blog about some of my discoveries in case they help other folks who are just starting out. For you experts, it may seem like trivial stuff, but it's not that obvious when you're just starting out in TGB (and you're not much of a programmer). There are also probably easier ways to do some of this, so let me know and I'll keep this updated so it's useful.
GETTING A POSER CHARACTER INTO THE ADVENTURE KIT
Uses TGB, Adventure Kit, Poser 6, and Photoshop
1) Take a single frame of one of the orc animations (I used the run east) and save it out as a jpg. You can resize it to 2X or 3X to make it a bit easier in Poser. You can find these in the TorqueGameBuilderPro\games\resources\AdventureKitArt\sprites folder.
2) In Poser, choose File/Import/Background Picture and import the orc frame you saved out. If it asks you to resize the main window, let it resize. Your main view window should look something like this.

3) Select the Front camera from the Camera Controls.
3) On the parameters panel, set the Front camera to the settings below. This gets the camera roughly in the right position, in a view with no perspective.

4) Put a figure into the scene. I used Jesse Casual for the first test, because it's easier to tell which leg is in front, etc. when the figure has clothes on.
5) Choose Body for Figure 1 from the pull-downs on top of the view window, then set its parameters to match the ones below. This puts the figure in the right position relative to the camera, and turns it to face east (which matches the orc, if you used an eastern-facing pose for your background). Note that the orc is broader and shorter than the Poser male, so there will be a bit of difference in how they look.

6) Put whatever animation you would like onto the character, but don't change his translation. He will be moved through code.
7) Choose Render Settings... from the Render menu. Set the first tab (Render Settings) to whatever style you want.
8) Go to the second tab, Movie Settings, and use the settings below. Note that the Every Nth Frame setting of 3 works only if your animation has 30 frames in it. The goal is to have 10 total frames, so TOTAL FRAMES / X = 10 gives you your Every Nth Frame setting (the X in the equation).

9) Render the movie and it will save a series of PNG files with no background... which is just what we want, except as separate frames.
10) In Photoshop, open the orc animation file that matches the animation you just made. For me, it was the orc forward east animation filmstrip.
12) Open the 10 frames you rendered from Poser. It helps if you arrange them in numerical order, since they will come in out of order (for example, file 12 opens before file 1).
13) Starting with the first frame of your Poser animation, with the Move tool (see below), drag the Poser animation frame onto the orc animation frame, lining it up with the orc.

14) Continue to drag and drop each frame of the Poser animation onto the orc animation. Note that each drag and drop produces a new layer.

15) When all frames have been added, select all but the last (orc) layer in the layer window. With the move tool still selected, choose center align vertical and center distribute horizontal from the tool bar to line the animations up.

16) Hide the last layer (the orc) by clicking on the eye icon to its left.
17) Save the file. I usually save it as a layered PSD first, then do a Save As to generate the PNG.
18) Open TGB, and make a new project using the Adventure Kit template.
19) Add the new .png as an imagemap, choose CELL as the type with the spacing of 10 horizontal and 1 vertical. That should break it up into cells of 165 X 165.
20) Create a new animation using that imagemap. Click Use All Frames and it makes it right away. Remember the name you used for it. I just substituted "man" for "orc" to make it easier.
There is probably an easier and neater way to do these next steps, but here is what I did.
21) Open the managed/datablocks.cs file for your project, and the resourceDatabase.cs file from the resources/AdventureKitArt folder. Find the datablock in resourceDatabase.cs that matches the animation you did. For example, if you created a new forward east animation, you would find the datablock that starts with
new t2dAnimationDatablock(orc_forward_east_anim)"
22) Copy the entire line that starts with "dir" for that animation. For the forward east animation, it would be
dir = "1 0";
23) In the datablocks.cs file, find the new datablock created for your animation. At the end of that datablock, paste in the line you copied that starts with "dir." That sets the direction for the animation so the app will use the correct one.
24) Close and save the datablocks.cs file.
25) Open the /gameScripts/orcAnimSets.cs file, and find the orc animation that matches the animation you changed. Since I'm working with the forward east animation, this is the block that applies to me:
if ( !isObject( OrcRunAnims ) )
{
new SimSet( OrcRunAnims );
OrcRunAnims.add( orc_forward_northAnimation );
etc.
26) Change the name of the anim you made to match the datablock you set up in TGB. For me, that line was OrcRunAnims.add( man_forward_eastAnimation );
When you start TGB again, load your project, then load and play the start level, you will see your new animation replacing the old one!
A better way to handle those last few steps would be to create a new AnimSets file for your new character, but this gets the animation into the game ASAP. Since you saved the PSD file, it's easy to go back and tweak the placement of any of the frames to make it line up better. Just save the .png over the old one, and you're in business.
Recent Blog Posts
| List: | 01/05/07 - How to create a pre-rendered background for use with the Adventure Kit 12/28/06 - Rough character portraits 12/28/06 - Getting a Poser character into the Adventure Kit |
|---|
Submit your own resources!| Martin Schultz (Dec 28, 2006 at 08:32 GMT) Resource Rating: 4 |
| dubbros (Dec 28, 2006 at 10:01 GMT) Resource Rating: 5 |
I'm working on something like that with troll character as you can see ...

| Leroy Frederick (Dec 28, 2006 at 11:39 GMT) Resource Rating: 5 |
| Alan H (Dec 28, 2006 at 14:02 GMT) Resource Rating: 5 |
Out of curiousity, how long did it take you to do this one animation from when you opened poser to when you had finished it for TGB?
Edited on Dec 28, 2006 14:04 GMT
| J Sears (Dec 28, 2006 at 14:24 GMT) |
| Gustavo Boni (Dec 28, 2006 at 14:46 GMT) |
Thanks GamerGirl!
| Tom Spilman (Dec 28, 2006 at 15:36 GMT) Resource Rating: 5 |
| David Montgomery-Blake (Dec 28, 2006 at 15:36 GMT) |
No.
You cannot use the mesh data without obtaining per-person, per-project permission. It is in the first pages of the book that ships with Poser 7 and has been in the EULA since the 90's. You are allowed to use render data.
| GamerGirl (Dec 28, 2006 at 17:28 GMT) |
J Sears, you can use the renders any way you want, just not the meshes (as David says). So for TGB, it's perfect since all we want are renders anyway. Daz3D, PoserPros, and Renderosity all have an amazing number of figures, clothing and props including real world, historical, fantasy and sci fi.
You can also do some pretty nice renders out of Poser, for character portraits. I'm going to post one I did last night in a little while. :-)
Edited on Dec 28, 2006 17:29 GMT
| David Montgomery-Blake (Dec 28, 2006 at 19:48 GMT) |
| Tank Dork (Dec 29, 2006 at 02:49 GMT) Resource Rating: 5 |
| Leroy Frederick (Dec 29, 2006 at 10:24 GMT) Resource Rating: 5 |
| GamerGirl (Dec 29, 2006 at 16:47 GMT) |
| Ed Averill (Jan 16, 2007 at 18:17 GMT) Resource Rating: 5 |
Who would have thought I could use D|S or Poser for game art? Now I can use all my custom morphed figures I've been dinking with!
You must be a member and be logged in to either append comments or rate this resource.


4.7 out of 5


