At the moment I have a 3D Max model and all elevators, rudders and ailerons are made as separate Mesh elements.
As I know Outerra will import COLLADA format - so should all elements be separate models or elements?
yes all moving parts have to be separate elements, you don't have to do any skinning for those elements, the only thing you have to be aware of is the pivot orientation. Mesh elements that have to be exported as bones have to be defined in impcfg file which looks like this for cessna model:
cessna172 [object]
propeller_nose [*propeller_nose]
propeller_plane [*propeller_plane]
Propeller [*propeller]
Rudder [*Rudder]
ElevatorLeft [*ElevatorLeft]
ElevatorRight [*ElevatorRight]
ElevatorRightTrim [*ElevatorRightTrim]
FlapsLeft [*FlapsLeft]
AileronLeft [*AileronLeft]
AileronRight [*AileronRight]
FlapsRight [*FlapsRight]
pointer_heading [*pointer_heading]
pointer_airspeed [*pointer_airspeed]
pointer_fuelflow [*pointer_fuelflow]
pointer_QTY_R [*pointer_QTY_R]
pointer_QTY_L [*pointer_QTY_L]
pointer_OIL_Temp [*pointer_OIL_Temp]
pointer_OIL_Press [*pointer_OIL_Press]
pointer_VAC [*pointer_VAC]
pointer_AMP [*pointer_AMP]
pointer_vsi [*pointer_vsi]
pointer_attitude [*pointer_attitude]
pointer_attitude_pitch [*pointer_attitude_pitch]
pointer_altimeter_long [*pointer_altimeter_long]
pointer_altimeter_round [*pointer_altimeter_round]
pointer_altimeter_short [*pointer_altimeter_short]
rudder_L [*rudder_l]
rudder_R [*rudder_r]
pointer_RPM [*pointer_RPM]
pointer_heading_set
pointer_EGT_REF [*pointer_EGT_REF]
pointer_EGT [*pointer_EGT]
legL [*landing_gear_l]
wheel_L [*wheel_l]
legR [*landing_gear_l]
wheel_R [*wheel_r]
legF [*landing_gear_nose]
wheel_F [*wheel_front]
THROT [*throttle_lever]
MIX [*mixture_lever]
rudder_L [*control_wheel_l]
rudder_R [*control_wheel_r]
flapsLever [*flaps_lever]
exit_point [*exit_point]
nose_gear [*nose_gear]
camera_pilot [*camera_pilot]
the names in the square brackets define bone names used in the engine, in this case those names are mostly same as mesh node names...
And what files (scripts to prepare) to control those elements and link whole model to JBsim?
the "script" is not ready yet, but the plane configuration will be easy, something like JsbSim variable -> mesh element : filter params, this will be used for control elements and indicators, i am not sure what we will use for more complicated systems, but probably it will be Javascript or native code scripting.
But there are other requirements:
Do not use default 3DS Max COLLADA export! Use OpenCOLLADA plugin instead.
http://opencollada.org/download.htmlAll textures have to be in the right DDS format
- diffuse has to be DXT1 format
- normal map has to be 3Dc/ATI2 format
- opacity map has to be ATI1 format
- roughness map has to be ATI1 format
- material reflectance map has to be ATI1 format
those last two texture maps allow you to define whole material in textures so you can have one single mesh and multiple materials and the mesh is still rendered in one draw call. Usually reflectance is not so important as the roughness so in most case the roughness texture map is enough.
there is a nice tool set for texture conversion
http://code.google.com/p/nvidia-texture-tools/ but please always use lossless formats as the source like TGA, because all our target formats are lossy, so if you use use a JPEG for source the result will have terrible quality...
Do not make triangles longer than 0.5m.
This is a temporary requirement and it will be solved automatically during the import process later. And there is also automatic real-time solution for that but it is not tested yet...
Level of details (LOD)
Every separate object in COLLADA file has to have corresponding root node with object name. In the second hierarchy level you can define LOD levels, these levels are optional but you should use them because they help a lot with performance. Currently we support 4 LODs, these LOD parents names have to start with LOD0.., LOD1..., LOD2..., LOD3..., COLLISION... the last will be used as a collision mesh...