https://www.posetteforever.com/viewtopic.php?f=1&t=2672
-----------------------------------
goat4444
Friday, 02 February 2007, 02:31 PM

[Tutorial]  Cars With Posable Pedals, Steering Wheel
-----------------------------------
How about I start creating parts of the car that are poseable? Can I do this in 3D Studio Max? I want to do steering, especially pedals, gauges with needles, shifter, etc.

Thanks!


-----------------------------------
Tormie
Friday, 02 February 2007, 07:38 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobr
-----------------------------------
Hi goat4444 and welcome to Posetteforever  :grin:  :thumb:  :clap:  :dance: !

3D modelling is out of my knowledge  :oops: , However there are GREAT models makers here, I hope they will reply to you soon  :pray: . About the cobra you could import it in 3d studio and look at VK's technique or ask him directly


-----------------------------------
VK
Tuesday, 06 February 2007, 03:14 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Hi goat4444,

You can use any 3D modeler like 3DS Max to make a car model with poseable parts.

If I understand your question correctly, you'd like to use the car model in Poser. Here is a brief overview of the major steps:

1. Prepare the geometry for your Poser model. 
The car model in Poser is a figure with several body parts. Poser will load the model from (usually) a single Wavefront .obj geometry file.

The .obj file must have group definitions, that is, each part of the geometry is a group with a group name. You can define and export .obj groups in 3DS Max and most other 3D modelers.

The groups in the .obj file are used to identify the parts in Poser. Usually, each group in the .obj file is an actor (body part) of the Poser figure. The .obj file of the car model has for example groups "car", "steering", "pedal", etc. The Poser figure library has actors "car", "steering", "pedal", etc. Poser treats the corresponding geometry group as a separate object.

There are other ways to achieve the same result: You can create the parts separately and load each part into Poser. Then you assemble the parts (car, steering, pedals, etc.) in Poser and export all parts from Poser to a single .obj file. When you use the proper export options, each part will be a group in the .obj file.

Or, you define a Poser figure library which uses many different .obj files, one for each actor. In this case, you simply create an .obj file for the car, one for the steering, another one for the pedal, etc. In the Poser figure library, actor "car" will load the "car.obj", actor "steering" will load the "steering.obj", etc.

2. Prepare the Poser figure library (.cr2).
When your figure .obj is ready, you define a .cr2 figure library to use the model in Poser. To create the .cr2 in Poser 5 or later, you can use one of the "rooms". There are several utility programs (I guess) which can create .cr2 libraries.   
Alternatively, you can write a ".phi" text file ("Poser Hierarchy File") and use the "Convert Hierarchy File..." command to convert the .phi to a .cr2 library.

Your .cr2 file defines a hierarchy among the actors. For example, actor "steering" and "pedal" are children of actor "car". Furthermore, the .cr2 defines whether the seams of two actors are glued together or not. The parts of a car are typically not glued. The .cr2 can include additional actors which have no corresponding geometry.

The .cr2 defines a pivot ("origin") for each part, and "channels" to perform standard transformations (rotate, translate, scale, etc.). These standard channels are automatically included when Poser creates your .cr2.

3. Tune your .cr2.
Once your .cr2 exists, you can adjust the actors properties in Poser or edit the .cr2 in a text editor.

When you want a poseable steering wheel, for example, you center the pivot of actor "steering" and adjust the "orientation" angles if necessary. Poser displays dials for the "rotate" channels in the dials palette. To turn the steering wheel, you just set the proper "rotate" dial. You can rename dials, hide not used dials, and set channel limits, to make a user-friendly interface.

That's it. Since most of the parts of a car perform very simple motions, you don't need additional channel code. The opening doors, hood, trunk lid, wheels, and gauge needles are all simple rotations.

4. Customize your .cr2.
You can add non-standard code to your .cr2 if you want special behavior of your moving parts. You can for example use the "PointAt" constraint to implement automatic orientation of your moving parts, use "alternate geometry" to load or modify parts of the car model, or use Morph Targets to deform the geometry.

You can use "ERC" code to synchronize several moving parts. For example, you include code to turn the steering wheel and the front wheels accordingly when a single "Steer" dial is set. 

To learn more about ERC code, you can download my ERC tutorial here:
http://www.atlantis23.com/erc_download.html

There is a code example for the steering mechanism in Chapter 3 of the tutorial.

Hope this is the information you're looking for.

VK


-----------------------------------
Posy
Tuesday, 06 February 2007, 03:15 PM


-----------------------------------
I fail to see the relevance of that allusion. Do you think I should alter my programming? Two what? I don't know when. Can you think of another example? Then what is it? Three what? "" is "rename dials hide not used dials and set channel limits to make a user-friendly interface"? Oh four.


-----------------------------------
Tormie
Tuesday, 06 February 2007, 03:25 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobr
-----------------------------------
Thank you for the tutorial VK  :grin:  :thumb:


-----------------------------------
JanReinar
Tuesday, 06 February 2007, 03:52 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks for the tutorial VK !  :)  :thumb:


-----------------------------------
ahjah
Tuesday, 06 February 2007, 11:35 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Great information by the master himself :thumb:  (I'm still in love with the Vespa :heartbeat: )


-----------------------------------
Posy
Tuesday, 06 February 2007, 11:35 PM


-----------------------------------
Thanks for your support.  I do not understand.


-----------------------------------
ahjah
Tuesday, 06 February 2007, 11:37 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Too much input, though! :grin: Posy seems a bit confused :wink:  :lmao:


-----------------------------------
Posy
Tuesday, 06 February 2007, 11:37 PM


-----------------------------------
Oh.  Try saying that with more context.


-----------------------------------
Tormie
Tuesday, 06 February 2007, 11:58 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobr
-----------------------------------
Yep I like the Vespa a lot  :heartbeat:  :heartbeat:  :heartbeat: I made a lot of pics with her ! What about another little scooter  :whistle:  :whistle:  :whistle: ? Maybe a Lambretta  :grin: !!

here is Clara  :heartbeat:


-----------------------------------
goat4444
Wednesday, 07 February 2007, 12:06 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobr
-----------------------------------
WOW!  I'll give it a try!

Thanks!


-----------------------------------
Whazizname
Wednesday, 07 February 2007, 08:19 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks for the info VK.

Let me see if I'm understanding this though:

1.) Save imported obj as cr2 (to figure library).

2.) Set rotation and dial limits.

3.) re-save cr2.

? is that the short version of what you said?

(:


-----------------------------------
VK
Wednesday, 07 February 2007, 11:31 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Yes, these are basically the steps you have to do. Unfortunately, the process is a bit complicated when it comes to the details.

1. You can't safe the imported obj directly as a cr2 figure library. 
When you have the obj, someone or something must create a first version of the cr2 based on this obj. In Poser 5 or later, you take the obj into the "figure-creation-room". I don't know the name of the room because I use Poser 4. 

In Poser 4, you write a "phi" file. In this file you specify the name and path of the obj which should be used for the cr2 creation. I usually place the obj file in the Geometries folder. In Poser, you choose the "Convert Hierarchy file..." and Poser creates the new cr2 library and puts it into the "New Figures" folder of the Character libraries. The new cr2 will use the obj at the path you specified in the phi file.

The "phi" method is old-fashioned but still the best when you create a complicated model with many parts. The following code is the phi file for the cobra. You can see the obj file, the actors, their hierarchy, and rotation order. Each actor is a group name in the obj, and will be the name of the body part in the cr2.

2.+3. Once you have the first version of the cr2, you load the cr2 in Poser from the figure library, set rotations and dial limits, and re-save the cr2 to the library.

At this point, you can load the model from the new cr2 library and you have a working model in your scene. 

However, you a lot of work can't be done in Poser. When Poser creates the cr2, it assumes you want to make a human or animal. A lot of code in the cr2 is used for this sort of soft-body models. When you make a car, you will adjust or remove this code from the cr2. So, you usually edit the cr2 in a text editor and then go back to Poser, load the cr2, and check the modifications.

BTW, thanks for the cool textures, Whazizname  :) 

[code linenumbers=false]
objFile :Runtime:Geometries:cobra:ac427sc.obj

1 car yzx
	2 doorL yzx
	2 doorR yzx
	2 trunk xyz
	2 hood xyz
	2 windshield xyz
		3 windowL yzx
		3 windowR yzx
		3 sunscreenL xyz
		3 sunscreenR xyz
		3 wiperpivotL zxy
			4 wiperarmL xyz
				5 wiperbladeL xyz
		3 wiperpivotR zxy
			4 wiperarmR xyz
				5 wiperbladeR xyz
	2 seatL yzx
	2 seatR yzx
	2 bumperF yzx
	2 bumperB yzx
	2 dashboard yzx
		3 glovecomp xyz
		3 steeringshaft zxy
			4 steeringwheel zxy
			4 blever zxy
		3 dial1 zxy
		3 dial2 zxy
		3 dial3 zxy
		3 dial4 zxy
		3 dial5 zxy
		3 dial6 zxy
		3 dial7 zxy
	2 gearshift yzx
	2 handbrake xyz
	2 pedalL xyz
	2 pedalC xyz
	2 pedalR xyz
	2 chassis yzx
		3 uparmFL zxy
		3 loarmFL zxy
			4 bearingFL yzx
				5 axleFL xyz
					6 wheelFL xyz
						7 spinnerFL xyz
			4 rodFL yzx
			4 saFL zxy
		3 sapistonFL zxy
		3 uparmFR zxy
		3 loarmFR zxy
			4 bearingFR yzx
				5 axleFR xyz
					6 wheelFR xyz
						7 spinnerFR xyz
			4 rodFR yzx
			4 saFR zxy
		3 sapistonFR zxy
		3 axleBL xyz
			4 bearingBL xyz
				5 wheelBL xyz
					6 spinnerBL xyz
			4 rodBL xyz
			4 saBL zxy
		3 sapistonBL zxy
		3 axleBR xyz
			4 bearingBR xyz
				5 wheelBR xyz
					6 spinnerBR xyz
			4 rodBR xyz
			4 saBR zxy
		3 sapistonBR zxy
		3 cooler yzx
		3 engine yzx
[/code]


-----------------------------------
Whazizname
Thursday, 08 February 2007, 01:45 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks for the additional info VK.

Now I have to see if Poser 5 can use the "phi file method".
Poser's expectation that a figure is a humanoid has been the problem for me. I have a car that has been in the "set-up room", and all the groups are available; but I'm unclear as to where/ how to add bones.

It seems like I will need to use ERC because the car I've chosen has "Scissor type" doors. :roll: 

Also;
It was my pleasure to create the textures for the Cobra & Vespa {in fact, there are a few un-released ones still floating about in my runtimes...}. I am pleased that so many people thought that they were useful. (Over 800 Cobra downloads since I posted the textures!)


(:


-----------------------------------
melamkish
Thursday, 08 February 2007, 02:53 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobr
-----------------------------------
VK, thanks for the tutorial links. They are quite timely since I have been experimenting with ERC's.

Whazizname, a good way to get a general concept of boning is to open an existing file, such as the cobra, go into the setup room and see how it is rigged. You will probably get a warning about morphs may become unusable, but as long as you don't save or change anything, all will be fine. Looking at a couple of vehicles would show how the creator set up the bone and rigging.  Don't forget to look at how the joint parameters are set up. I usually set the mat spheres display to wire frame, so I can see the areas of influence.

Once you see how something is boned and rigged, then you can begin to see how to do your own figure. Creating the bones is pretty easy once you get the hang of it. The time consuming part will be adjusting all the joint parameters and mat sphere settings to get the figure to respond to your dials.  As you experiment, take a little extra time to write down your settings. This has been a real help as it gives you a reference point to go back to if you mess up (has saved me many times). If your are working on symmetrical parts of a model, Poser's symmetry tools can transfer joint parameters from one side setup to the other. Another big time saver.


-----------------------------------
Whazizname
Sunday, 11 February 2007, 11:18 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks for the additional tips melamkish.

Now that i have conquered the household flu virus; I'll look into this some more.

(:


-----------------------------------
VK
Wednesday, 21 February 2007, 12:07 PM

Making A Car Figure Tutorial
-----------------------------------
Ok, here is a beginner's tutorial on how to make a car figure in Poser 4:

1. We make a simple car in the modeler. The example model has only the most important parts: floor, wheels, and pedals. If your modeler can export Wavefront obj groups, you can name the parts and then export as obj.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:09 PM

Making A Car Figure Tutorial
-----------------------------------
2. Import the model as a prop in Poser. Be sure to choose some "Percent of standard figure size", if your modeler exports the model in very large dimensions. Check if all parts are imported. You often get reversed normals on some parts, like the wheels of our car model.

You can't create texture coordinates in Poser. You have to map the model in your modeler or with a mapper software before you import it. If your modeler exports a mat file associated with the obj, Poser will import the material definitions from the mat file. If your modeler exports "usemtl" tags in the obj, you can assign materials in Poser with the Group Editor.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:11 PM

Making A Car Figure Tutorial
-----------------------------------
3. The parts of your model are groups of the Poser prop. Open the Group Editor and check if all group names are present and correct.

You can easily fix the reversed normals of a group with the "Reverse Group Normals" button in the Group Editor.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:13 PM

Making A Car Figure Tutorial
-----------------------------------
4. Load a Poser human as a reference to scale your model properly. Place the model where the figure library should load it. A car model is usually placed on the ground in the center of the scene facing the front camera.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:15 PM

Making A Car Figure Tutorial
-----------------------------------
5. Now the model is a single object with geometry groups. You can export this model and use it as figure geometry file. If your model geometry is a skin (like a human or animal), you should use the "welded" geometry. In this case, the seams of the groups share the same vertices.

If you make a hard body model like a car, the parts are usually not welded. In this case it's a good idea to break the single geometry into pieces, and export the pieces in a single obj file.

Open the Group Editor and hit "Spawn Props" to create a new prop for every geometry group f the original object. Your scene is now populated with several props. Be sure to delete the original object, otherwise you have a duplicate of the geometry in the scene.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:17 PM

Making A Car Figure Tutorial
-----------------------------------
6. Write a phi text file. The phi starts with the line

objFile :Runtime:someFolder:otherFolder:objfilename.obj

which is the file path of the obj file used to create the figure. This is the folder where you will place your obj. The phi lists all parts of the figure (except for BODY), the hierarchy level, and the rotation order. The parts are the props you have in your scene. Be sure to use the exact names of the props.

Save the phi file in the same folder, that is, the directory you defined in the first line of the phi.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:18 PM

Making A Car Figure Tutorial
-----------------------------------
7. Export the props from Poser to create the new obj file. Use the export option "Include body part names in polygon groups", which will use the prop names as group names in the obj.

Save the new obj in the directory you defined in the phi file.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:20 PM

Making A Car Figure Tutorial
-----------------------------------
8. Choose the "Convert Hier File..." menu, choose your phi file, and convert. Poser tries to find the obj file and to parse the phi file, and generates a new figure library (.cr2) for the model. Enter a name for the new library. The new figure is placed in the "New Figures" folder.

Save and close your pz3 document. You should keep the file because it contains a backup of your original figure geometry.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:21 PM

Making A Car Figure Tutorial
-----------------------------------
9. Open a new document. Load the new figure from the Characters palette. Before you do anything else, save a new .cr2 from the loaded figure, and replace the original library. The hierarchy converter in Poser 4 writes a library version which is for some reason not compatible with the Joint Editor. When you save the library from a document, Poser 4 writes a correct .cr2.

10. Delete the existing figure in the document. Load a new figure from the new library. Open the Hierarchy Editor and check if all parts are there and if the figure hierarchy is what you expect.

The parts of a car don't deform like a limb of a human, when you move them. Because of this, you have to turn off the "Bend" option of each part. Select each part and uncheck the "Bend" option in the Properties window. 

Deactivating the "Bend" option disables the joint deformation engine. However, the joint definitions are still in the cr2. If you want to remove the code (a lot of code, actually) you have to edit the .cr2 in a text editor.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:23 PM

Making A Car Figure Tutorial
-----------------------------------
11. Now you can adjust the joints of the car parts. Open the Joint Editor, select the parts and examine the center points. The center point (origin) of a part is displayed as a green crosshair in the scene. The origin is the rotation center and the reference point for scaling. For example, the origin of a wheel should be centered such that the wheel rotates about its center.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:24 PM

Making A Car Figure Tutorial
-----------------------------------
12. For example, the pedals should rotate about the hinge where the pedal is mounted on the floor. Select a pedal body part and move the green crosshair to the appropriate position.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:26 PM

Making A Car Figure Tutorial
-----------------------------------
13. All body parts have 3 rotate dials. Select a pedal and try which rotation to use (xRotate in this case). Check which rotation direction you need and how far the pedal should rotate. The example pedal should xRotate by +40 degrees.


-----------------------------------
VK
Wednesday, 21 February 2007, 12:27 PM

Making A Car Figure Tutorial
-----------------------------------
14. Open the parameter window of the xRot dial. Choose "Min Limit" 0 and "Max Limit" 40. Name the dial, for example, "Push". Now when you activate the "Use Limits" option (Figure menu), the pedal will move only within the limits. That's it. Your car model is ready.

Some modifications of the cr2 can't be done in Poser. For example, you might want to hide or even remove the yRot and zRot dials on the pedals, since you don't use them. Poser adds translate dials to every body part. These dials are by default only visible in the root actor and in the goal of an activated IK chain. If your part uses a translation, you have to open the cr2 in a text editor and make the dial visible.


-----------------------------------
ahjah
Wednesday, 21 February 2007, 02:09 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
:clap:  :clap:  :clap: Great tutorial, thanks a lot, VK! :dance:


-----------------------------------
Whazizname
Wednesday, 21 February 2007, 04:26 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Yes, Thank you VK!

{I just took the time to see if the"phi text" method was available to P5 users;... 
The manual says: "Figure creators wishing to use the old method should refer to the electronic Poser 3 Advanced Techniques document, which covers the old figure creation method in detail. This document is in PDF format and is included on your Poser 5 content CD in the documentation folder." 
It is not on my version of the CD. :roll: }

{ I did however notice a bunch of free content (including morph targets for Don & Judy) that I did not remember were there. :grin:}

Now having said that;... How can a P5 user make use of this beginner's tutorial?

(:


-----------------------------------
Whazizname
Wednesday, 21 February 2007, 06:05 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
WhooWeee!

I was able to download the "Poser 3 Advanced techniques" document from eFrontier.

(:


-----------------------------------
goat4444
Friday, 16 March 2007, 08:30 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Great detail in here!

So, if I have an existing car model, with pedals that don't move, hoe can I make them move?

Thanks!


-----------------------------------
Whazizname
Tuesday, 20 March 2007, 01:37 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
I'm with Goat on this...
I think that I need a "hand-holding type" tutorial on how to rig a car model in P5.

I looked at already poserized vehicles (The Cobra, The Veepster, a Hummer, and others); but they only helped to confuse me more as to where the bones need to be.

As for the phi file, whew... I think I understand how to make it; but I am unclear when to make it; or even if I need to make it in P5.

 :mmmh: 


(:


-----------------------------------
VK
Tuesday, 20 March 2007, 11:16 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Sorry, I can't help with the Setup room in Poser 5 and later. However, the steps are always the same.

Maybe it helps when I try to answer your questions.

@goat4444:
Make the first step: Import the existing car model into Poser (menu "Import > Wavefront OBJ").
Once you see the car model in Poser, open the Group Editor and check if there is for each pedal a group including only the pedal geometry.

You always have to start with a properly grouped model. So this is always the first step. Please ask for more information if you don't know how to import the model or how to use the Group Editor. 

If the car model has no groups for the pedals, you need to group the model. This can be done in your modeler or in Poser. If you don't know how to group the model please ask here for more information.

If your car model has groups for the pedals, you're ready for the next steps:
- Scale the model if necessary.
- Place the model in the Poser scene where you want it to load.
- Adjust reversed normals if necessary.
- Use "Spawn Props" in the Group Editor to create props from the model groups.
- Delete the original car model.
- Export all the props to create the figure obj file.

If you don't understand these steps, please ask for more information.

Once you have the figure obj file, you can start to create the .cr2 (rig the model), see below.


@Whazizname:
I'm sure there are tutorials how to use the Setup room in Poser 5 or later to rig the model.

The phi-method is usually much faster (and painless, too). Here's some more information:

1. You can create the phi-file at any time. I usually make the phi when I have spawned the props in Poser. This way I can see the exact group names and make sure that all groups are included in the phi.

2. Usually, the car rig should be very simple. The simpler the better. You have a root object (the car body), and all parts are attached to the car body (like wheels, doors, pedals, etc.). Because of this, the phi is also very simple. You can use the following code as a template.

[code linenumbers=false]
objFile :Runtime:Geometries:cartest.obj

1 cargroup yzx
	2 wheelgroup xyz
	2 doorgroup zxy
	2 hoodgroup zyx
	2 pedalgroup yxz

[/code]

When you use the template, you insert your group names and add more actors (for the wheels, for example).

- The "objFile" line: This is a file path using the ":" separator. The line starts with the word "objFile", followed by a space or tab, followed 
by ":Runtime", followed by the path to your obj file. Use the exact filename of your obj. The line must end with a return.

- Write a line (a full line ending with a return) for each actor.

- Each line starts with the hierarchy level (a number), followed by a space or tab. 

The logic of these numbers is simple: The root actor has number 1. This actor will be the child of actor BODY in the figure. Most objects like humans and cars have a single root actor. However, you can define several root actors, for example two roots for two faerie wings. All actors with number 2 are children of the root actor. These parts are attached to the root actor.

All actors with a higher number are children of the prior actor with the prior number. For example, a "3" actor is a child of the "2" actor in the latest preceding line:
2 foo
3 foochild
3 foochild2
2 goo
3 goochild
3 goochild2.

- Each line lists the exact group name, followed by a space or tab. Spaces are not allowed in the group name, and your obj must not contain groups with spaces.

- Each line ends with a rotation order flag, followed by a return. The rotation order is for example "xyz". The above template can be used for a car model facing the front camera (the usual setup).

- Be sure to finish the phi file with a return to make a full line for the last actor. 

- The rotation order is crucial when you make a soft body model, because Poser tries to set up complicated joint parameters for the figure. You don't need these parameters in a car model, so you don't need to care for this stuff. Once you have the .cr2, you load the car figure and simply adjust the origin of the parts.

However, the rotation order flags in the phi can help to place the origins. Here are the rules:

The origin of the root actor is always centered in the root actor. The flags in the phi just define the rotation order, that is the order of the rotate channels on the root actor.

For children of the root actor, the first dimension (axis) defines the major axis of the child. The second and third dimensions define the plane where the child is attached to its parent. When Poser converts the phi, the origin and the end point of the actor are placed at the end points of the major object axis, and centered in the second and third axes.

For example, the wheels have flags "xyz". The x-axis is the major axis of the wheel, and "yz" define the plane where the wheel is attached to the car. Using this flag, Poser places the origin and end point of the wheels on the x-axis, and in the center of the y and z dimension of the wheel. This is exactly what you want. Remember that this setup can be used when your car geometry faces the front camera.


-----------------------------------
VK
Tuesday, 20 March 2007, 11:19 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Likewise, the door actor has flags "zxy". The origin and endpoint of the door is placed at the endpoints of the door in the z-axis, and centered  in the xy-plane. 

Poser uses the bounding box of the geometry group to calculate the position of the origin and endpoint. The bounding box is the smallest box enclosing the entire geometry. For example, the hood actor has flags "zyx", the origin is centered in the xy-plane. This is not the hinge point of the hood. So you need to adjust the origin when you have your first .cr2.


-----------------------------------
VK
Tuesday, 20 March 2007, 11:21 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
The phi-flags also define the rotation order of the actor, that is the order of the rotate channels in the .cr2. You can set up the rotation order in the phi or later in the .cr2. Most actors rotate about one axis (like the doors, hood, pedals, etc.). In this case, the rotation order doesn't matter, maybe you even delete the unused rotate channels from the .cr2.

The rotation order does matter when the actor uses more than one rotation axis, like the front wheels (to drive and steer). There are two important rules for the order of the rotate channels:
1. Later rotate channels carry the rotation axis of prior rotate channels. 
2. The middle (second of three) rotate channel can generate "gimbal lock".

A "later channel" is a channel whose code appears later in the .cr2. The "middle" rotate channel is the channel whose code appears after the first and before the third rotate channel.

Let's see what this means for the front wheels: We choose the rotation order "xyz". X-rotate revolves the driving wheel. Y-rotate turns the wheel when you are steering. Z-rotate is unused. When you drive and steer, you set both rotations, that is
x-rotate (drive)
y-rotate (steer).

The subsequent steer channel carries the rotation axis of the prior drive channel. When you steer the wheel, the drive rotation axis is carried and points to a new direction. This is what you want.

Rule 2 doesn't apply to the front wheels, since we use only 2 rotation axes.


-----------------------------------
Tormie
Tuesday, 20 March 2007, 11:56 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobr
-----------------------------------
Thank you for your tutorials VK, they are really priceless  :notworthy:  :notworthy:  :notworthy:


-----------------------------------
ahjah
Wednesday, 21 March 2007, 12:08 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
:thumb:  :clap:  :clap: Thanks a lot, VK :grin:


-----------------------------------
VK
Wednesday, 21 March 2007, 12:45 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
You're welcome.  :)


-----------------------------------
Whazizname
Wednesday, 21 March 2007, 09:17 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks again VK.

I have a few questions:

1.)  The model I've chosen loads facing away from the camera. How does this alter the tutorial you posted? (I rotated & scaled the model; but when I spawned the props, they were unscaled, and unrotated.)

2.)  The model I've chosen has multiple "body" parts; should these be grouped together to form one "car body"?

3.)  (This is related to #2 above.) There were 74 props spawned from the model; some parts need to "work" together.(Tires, wheels, brake rotors, brake calipers,...)Do I need to group the parts that work together before I spawn the props?

4.)  Are the default OBJ export options ok for this?

(:


-----------------------------------
Whazizname
Wednesday, 21 March 2007, 11:15 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
@ VK;
Please ignore questions 2 & 3. I used the group editor to combine the parts that work together before spawning props.

I have one additional question though: How do I prevent the brake calipers from rotating as the wheels, rotors & tires roll?


(:


-----------------------------------
VK
Wednesday, 21 March 2007, 12:29 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Answer 1: 
When the car faces the back camera, the procedure is exactly the same. You can use the same phi setup. For example, the major axis of the wheels is still the x-axis, and the flags in the phi are
2 wheelgroup xyz

You need different phi-flags when the car is oriented on the x-axis (facing the right or left camera).


Answer 4:
You choose special export options. Uncheck all options, check only "Include body part names in polygon groups".


-----------------------------------
Posy
Wednesday, 21 March 2007, 12:29 PM


-----------------------------------
What was the question ?


-----------------------------------
VK
Wednesday, 21 March 2007, 12:31 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Answer 5:
You usually don't need a separate actor (group) for the brake calipers, since the calipers won't move in the car figure. Therefore, the calipers are part of the carbody, and the wheels are a separate actor.

If your car object has separate caliper groups, include the caliper geometries into the carbody group, and delete the caliper groups:
1. Open Group Editor.
2. Select the carbody group in the Group Editor.
3. Click "Include Group" and select a caliper group.
4. Repeat for all caliper groups.
5. Select a caliper group in the Group Editor. Click "Delete Group". Repeat for all caliper groups. 

Caution: Don't delete the wrong group by mistake. And don't forget to delete the caliper groups, otherwise you have two groups including the same geometry. Before you spawn the props, check "Show Multigrouped Faces" in the Group Editor. Poser highlights all faces which are members of more than one group. When you spawn props from an object with multigrouped faces, you get a duplicate of the same geometry. For example, the caliper geometry is included in the carbody part and in the caliper part.

If your car has a moveable suspension, you group the caliper geometry with the part where the caliper is attached. Of course, the geometry of the suspension should be mechanically consistent. This means, there must be some geometry where the caliper is attached (usually the housing of the bearing).

When you have different parts which should roll with the wheel, you choose a common parent for all rotating parts. For example, you have an actor "axleFL". When you rotate the wheel, you set exactly one rotate channel of actor "axleFL". All actors which should follow the rotation are children of actor "axleFL". The hierarchy could look like this:
2 axleFL
3 brakerotorFL
3 rimFL
4 spinnerFL
4 tireFL

Now when you rotate "axleFL" all children follow the rotation, that is the brake rotor and the 
rim and the children of the rim.
            
Usually you don't need a separate tire actor, unless you want to move the tire away from the rim in your car figure. Therefore, you group the rim and the tire and make a single actor "wheel".


-----------------------------------
Whazizname
Wednesday, 21 March 2007, 01:27 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
The car I've chosen doesn't have a suspension, or axle group. 

The way I understand it is: the  front rotors, and calipers need to steer with wheels & tires; and the rotors need to roll (x- rotate?) with wheels & tires. 

So, in this situation, what would you suggest to prevent the front calipers from rolling with the wheel/tire/rotor group?


(:


-----------------------------------
Whazizname
Wednesday, 21 March 2007, 01:59 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
I thought I should post this image for P5 or newer users following this thread.

{I left the roof panels in seperate groups because I wanted to be able to make them invisible when desired. I left the spoiler a seperate group; because it's height is adjusted as the vehicle increases speed. I left the engine part in their original groups; because I was unsure of the detail accuracy, and may want to change them in the future.)

Question 6:
Is it nessesary to put something in the phi file to change the spoiler height; or is it ok to just use the y-trans dial?

(:


-----------------------------------
VK
Wednesday, 21 March 2007, 05:09 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
You're right. You need two separate actors to steer and drive.   

You could try the following rig for the front wheel:

2 caliper
3 brakerotor
4 wheel

Use the y-rotate on parent "caliper" to steer. Use the x-rotate on child "brakerotor" to drive. When you steer, the caliper and its children follow the rotation. When you drive, the caliper is fixed. The brakerotor rotates and its child "wheel" follows the rotation (see image).

Answer 6:
No need to modify the phi. You can use the y-tran dial on the spoiler actor. 

Poser includes translate channels for each actor in the new cr2, but the translate dials are by default hidden (except for the dials on the root actor). When you want to use translate dials in a child actor, you have to open the cr2 in a text editor and edit the "hidden" line in each translate channel you want to access in the dials palette. "hidden 0" display a dial for the channel, "hidden 1" doesn't.

BTW, your car looks great.


-----------------------------------
Whazizname
Thursday, 22 March 2007, 02:07 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks VK!
:)

That is a clever solution to my rotor problem. 

I might have more questions about the joints. I now have the bones in place.; but I am not having the expected results when adjusting the position.

But; now I need sleep.

Thanks again.

(:


-----------------------------------
Whazizname
Thursday, 22 March 2007, 06:31 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
{I forgot to say, that the car model is not created by me; I just chose it to learn rigging in Poser.}

It seems as if the "crosshairs" are in the reverse order from those shown in VK's diagrams. {I mean, the green one is at the rear edge of the door, and the red one is at the front edge.} Is this caused by the model originally facing rearward?

I positioned the "crosshairs" in the Left door to match the diagrams; but when I apply rotation the whole front part of the car bends. I'm unclear about how to control only the desired actor.

also, the bones seem to be in an incorrect position. The main bone seems to be located near the Right front wheel. :mmmh: 

{see image.}


-----------------------------------
VK
Thursday, 22 March 2007, 08:53 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
A. The reversed door-joint:
This could be caused by the orientation of the geometry. Poser assumes the new figure is facing the front camera which is the default for all Poser humans and animals. 

On the other hand, my simple example car has correct orientations for the door when I have a facing front and a facing back model and create the figure using the same phi-file. It's maybe just a fluke, who knows.

Of course, you can always correct the joint orientation in the Joint Editor.

B. Front part bending:
You have to disable (uncheck) the "Bend" option of all actors: 
1. Select an actor. 
2. Open the Info dialog.
3. Uncheck "Bend".
The Bend option activates the soft-body joint attributes. These attributes define which polygons should be deformed when you bend (rotate) the actor of a skin (an organic figure). Cars are not skins and the joints shouldn't deform the geometry. Therefore you have to uncheck the Bend option. (You should also delete the respective channels in the cr2).


C. Origin of the root actor:
I'm not sure whether I understand the bones in your picture. The base of the cone is the origin, the top is the endpoint, right? The large bone from the center to the right front wheel seems to be the origin and endpoint of the root actor "carbody".

It looks like Poser places the endpoint of actor "carbody" at the origin of the first child (the front wheel on the right "RIMRF" according to the Hierarchy Editor shown). From there, Poser draws a line to the origin of the following children. This would explain the white lines originating at RIMRF and ending at the origin of the remaining children.

In a car model you usually only need the origin, not the endpoint, of an actor. The origins look OK as far as I can see.

To fix the endpoint problem (if this is a problem), you could place the endpoint of actor "carbody" at the center of the car, right above the origin of "carbody" (same xz-coordinates of origin and endpoint).

I don't know if you can edit the endpoints in Poser 5. The Joint Editor of Poser 4 only shows the endpoint of the "goals" (the last children in the hierarchy). To modify the endpoint (in Poser 4), you have to edit the cr2 in a text editor:
1. Open the cr2 in a text editor.
2. Find the code of actor "carbody". The code could look like this:
[code linenumbers=false]

actor carbody:1
	{
	name    car
	on
	bend 0
	dynamicsLock		1
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent BODY:1
	channels
		{
[/code]

3. Scroll down to the end of this actor's code. It looks like this:
[code linenumbers=false]

		}
	endPoint 0.326 0.253 -0.307
	origin 0.332 0.253 0.08
	orientation 0 0 180
	displayOrigin		0
	displayMode USEPARENT
	customMaterial	0
	locked 0
	}
  
[/code]

4. Edit the "endpoint" line. There are 3 numbers separated by a space. The numbers are the xyz-coordinates of the endpoint. Write the xz-values from the "origin" line into the xz-values of the "endpoint" line. Save and close.

As far as I can see, the cr2 should work well. If you modify the endpoint of "carbody", post a new picture with the resulting bones. If you get unexpected results with the cr2, post the problems.


-----------------------------------
Whazizname
Friday, 23 March 2007, 01:19 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
In Poser5 the endpoints are controllable with the joint editor. I'll change their positions to match the origins' positions. {I'd done this with the Left door; but the body still bent; so I changed it back. Now that you've explained the bending issue to me, I'll redo it.}

Thanks again VK!

 :) 


(:


-----------------------------------
Whazizname
Friday, 23 March 2007, 05:15 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
The cr2 is almost complete. 

Just a few things...:

The endpoints are not a problem, after bend is unchecked for each part.

I have been unable to unhide the ytrans dial for the spoiler. I changed the "hidden" from 1 to 0; no success. I then noticed that there were fewer lines in the "groupNode Transform" section; so I added the missing ones to the c2. I again changed the "hidden" value; no success.
Suggestions?

Also... How do I set limits for the dials? {I mean, so the doors & hood will open only so far...}

(:


-----------------------------------
VK
Friday, 23 March 2007, 06:43 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
A. Dial limits:
In the channel code, there is a "min" and a "max" line, like

[code linenumbers=false]
rotateY yrot
	{
	name Open
	initValue 0
	hidden 0
	forceLimits 4      <------- set the "forceLimits" flag
	min 0       <-------   the minimum value of the dial
	max 80       <-------   the maximum value of the dial
	trackingScale 1
	keys
		{
		static  0
		k  0  0
		}
	interpStyleLocked 0
	}
[/code]

1. Write your min and max values into the channel code. The minimum value must be smaller than or equal to the maximum value. When your door opens to -80 degrees, you choose
min -80
max 0 

When the values are equal or the max value is smaller than min, the dial is locked.

2. Write the "forceLimits 4" flag. The default value 0 means the limits are by default disabled. The dial can take any value unless the user activates "Figure > Use Limits". When the "Use Limits" menu is activated, the dial takes only values within the "min" and "max" limits in the channel code.

A "forceLimits" value other than 0 means the "min" and "max" limits in the channel code are always enabled. The user cannot choose a value beyond the limits. This is what you want.


B. Y-tran dial invisible:
I'm not sure what the problem is. Could you post the code of the "groupNode Transform"? Are there any IK-chains in the model? IK-chains, if available, are listed in the Hierarchy Editor. Delete all of them. 

Save a document with the model and open the document in a text editor. Is the y-tran channel in the code? Is the "hidden 0" line set?

You can send me the cr2 code (without geometry, maps, etc.) so I can take a look at it.


-----------------------------------
Whazizname
Friday, 23 March 2007, 11:50 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Ah... I forgot about Figure->Force Limits. Limits work now; thanks.
:)

I attached the cr2. I left in the modifcations that I made to the groupNode code; because I was sucsessfl in removing the "taper dial" from the spoiler with it.


(:


-----------------------------------
VK
Saturday, 24 March 2007, 03:17 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
I could run the cr2 in Poser 4 with an example geometry (some cubes). The yTran dial of the spoiler is available
and works as expected. Poser 4 strips some of the script when the model loads, but the essential channel code
is the same as the code used by Poser 5. 

The "groupNode" is only used to group dials in the tabs of the dials palette, AFAIK. This parameter does not
affect the channels. It seems as if you have to list the channels in a groupNode when you want to see the dials.
Anyway, the yTran channel was already listed in the groupNode of actor SPOILER.

I noticed a "SPOILER_jointx" dial on actor "Carbody". Channel "jointX SPOILER_jointx" is usually invisible
(and should be automatically hidden when you open and close the Joint Editor with selected "Carbody"). However,
this shouldn't affect the channels of the spoiler.

I attach a zip with 3 different cr2's you can test:

carreratest1.cr2: 
This is basically your original cr2. The only difference is a hidden "jointX SPOILER_jointx" channel on actor
"Carbody". The yTran dial on actor "SPOILER" should be available in the dials palette of the spoiler.

carreratestPo4.cr2:
This is the original cr2 loaded and saved in Poser 4. I used this cr2 for my test. The yTran dial on actor
"SPOILER" is available in the dials palette and works as expected. Note that the "figureResFile" lines point at
:Runtime:Geometries:carrera.obj. And the materials are Poser 4 style, of course. Poser 4 doesn't use the 
groupNode code. If all fails, try this cr2. 

carreratestStrip.cr2:
The stripped version of your cr2. I removed the unused code. 
There are several channels in each actor used only for joint and geometry deformation: "twistX", "jointY", 
"smoothScaleZ" etc. and "taper". These channels bloat the cr2 and are dead code (never used).
There are "weld" commands for each parent and child. "Weld" glues the seams of parents and children. This is 
only used when you have a skin with a continuous surface. Car actors are usually not welded, and the code can 
be removed. The filesize of the stripped cr2 is about 10% smaller. The more actors you have, the more 
overhead you get. The overhead is duplicated in each document which includes the figure.


-----------------------------------
Whazizname
Saturday, 24 March 2007, 03:31 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
Thanks VK.

I intended to remove the bloat; but wanted to get the cr2 working well first.


I'll try out the cr2s and get back to you.

(:


-----------------------------------
ahjah
Saturday, 24 March 2007, 05:58 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
*stomp* I want this Porsche :grin:


-----------------------------------
Whazizname
Saturday, 24 March 2007, 07:49 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
To VK;

I loaded the "carrerateststrip.cr2", directed it to the correct obj, and everything works well.  :clap:  :notworthy:  :notworthy: 
Thank you very much for assistance with this!  

I do have a couple more questions though...

1.) Would there be a great size benefit to removing all of the unused dials(scaling for children, zrotate for wheels,...) from the cr2?

2.) Could you please explain the much smaller cr2 size of the P4 version?

{I intend to look into & compare the different versions; but I'm being invaded by friends from out of town. It must be "Spring Break" somewhere in the world... :roll: }


To Ahjah;

I'm glad that I excepted this and the other Hankster automobiles as perks from one of my "testing jobs". I almost didn't; because they were not "poserized"; Now, thanks to VK's tutorial, and assistance... they are (or will be...).   :grin: 



To Goat;

If you've been lurking this thread recently, I'm curious to know how your progress is going.  :)

I decided that I don't use much Poser animation, so I did not include poseable pedals, and I did not link the turning of the steering wheel to the steering of the tires. I think I will include those with the next auto I poserize; but now I want to spend some time getting aquainted with Apollo Maximus, and Miki 2.


(:


-----------------------------------
VK
Saturday, 24 March 2007, 09:55 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
I'm glad to hear that the model is working well.  :) 

Re filesize:
1. Removing the unused channels saves about 5% of the (stripped) cr2 filesize.
2. The big difference between Poser 4 and Poser 5 is the material code: In the 
stripped cr2, the channel code is less than 20%, the material definitions are about 80% 
of the cr2 (84 KB versus 460 KB).


-----------------------------------
Whazizname
Thursday, 29 March 2007, 12:39 AM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
To VK;

I noticed that on the Vespa, there are dials in the "body" that control the visiblity of the spare tire, and extra seat.
 Would you please explain the procedure for accomplishing that?

(:


-----------------------------------
VK
Thursday, 29 March 2007, 12:44 PM

Re: Cars With Posable Pedals, Steering Wheel - Like The Cobra
-----------------------------------
The changing parts are "alternate geometry".

In the figureResFile, the geometry of actors "sparewheel" and "pillion" is a single tiny polygon "p_dummy" inside the Vespa body. The "p_dummy" geometry is invisible. 

[code linenumbers=false]
actor sparewheel:1
	{
	storageOffset 0 0 0
	geomHandlerGeom 13 p_dummy    <---  tiny single polygon 
	}
actor pillion:1
	{
	storageOffset 0 0 0
	geomHandlerGeom 13 p_dummy  
	}
[/code]

There are extra geometries for the pillion, the spare wheel, and the rack to mount the spare wheel. 

In the respective actors, for example "pillion", there is an "alternateGeom" instruction to load the pillion geometry. There is also a "geomChan" channel which displays a dial to choose the alternate geometry. 

[code linenumbers=false]
actor pillion:1
	{
	name    pillion
	on
	bend 0
	dynamicsLock		0
	hidden		0
	addToMenu	1
	castsShadow		1
	includeInDepthCue		1
	parent vespabody:1
	alternateGeom    pillion
		{
		name pillion
		objFile 1003 :Runtime:Geometries:vspscooter:pillion3.obj    <--- the alternate geometry
		}
	channels
		{
		geomChan pillion  <--- choose alternate geometry
			{
			uniqueInterp
			name (pillion)
			initValue 0
			hidden 1
			forceLimits 4
			min 0
			max 1
			trackingScale 0.045
			keys
				{
				static  1
				k  0  0
				}
			interpStyleLocked 1
			staticValue 0
			valueOpDeltaAdd   <---   ERC slave code
				Figure 1
				BODY:1
				vpvsp3pillion
			deltaAddDelta 1.000000
			}
		}
[/code]

The geomChan channel is an ERC-slave of a master channel in BODY. When you set the master, the geomChan loads and displays the alternate geometry, for example the pillion.

[code linenumbers=false]
actor BODY:
	{
		{
		valueParm vpvsp3pillion    <--- ERC master
			{
			name Pillion
			initValue 0
			hidden 0
			forceLimits 4
			min 0
			max 1
			trackingScale 2
			keys
				{
				static  0
				k  0  0
				}
			interpStyleLocked 1
			}
[/code]

You find more information on alternateGeom and ERC in the ERC tutorial, Chapter 9.
(www.atlantis23.com/erc_download.html).


-----------------------------------
goat4444
Friday, 06 July 2007, 03:34 PM

Re: [Tutorial]  Cars With Posable Pedals, Steering Wheel
-----------------------------------
Just wondering if anyone has had luck making more cars!  

Great tutorial!!


-----------------------------------
Tormie
Friday, 06 July 2007, 05:59 PM

Re: [Tutorial]  Cars With Posable Pedals, Steering Wheel
-----------------------------------
Not me but I'm having some ideas for alternate geometries :grin:


