Howto:Place 3D objects with WED
using X-Plane's World Editor for precise object placement
Placing scenery objects with the UFO is easy but not always the best choice. If you want to place objects or group of objects with precise position and heading you can also use the WorldEditor(WED) and use it's features like: top-down view, enter exact values for lat,lon,heading, rubberband-select, copy & paste,...
In order to do that, you need the object in X-Plane's .obj format. Blender can export that with an Blender-addon "io_xplane2blender" (but not import). Here are a already a few flightgear shared models in .obj format: https://github.com/mherweg/objects
For WED you need a "fake" scenery folder, please read the wiki article about WED
Put your objects into:
Custom Scenery/Your-Project/objects
Example:
objects/Models/Airport/Jetway/jetway-movable.xml.obj objects/Models/Airport/Jetway/jetway-20.xml.obj objects/Models/Boundaries/Fence-20m-green.xml.obj objects/Models/Boundaries/Fence-20m-green.ac.obj objects/Models/Boundaries/Fence-50m-green.xml.obj objects/Models/Boundaries/Fence-10m-green.xml.obj
After placing your objects with WED, click "Save" You will find the file:
Custom Scenery/Your-Project/earth.wed.xml
earth.wed.xml is the input file for the converter script
wed2stg.py
SYNOPSIS:
wed2stg.py -i <inputfile> -e <elevation in meters above MSL> > out.stg
Note that wed2stg.py does not do elevation probing, this is done by our scenery server after you uploaded your stg lines.
here's the first version of the script that converts object positions from earth.wed.xml into
.stg lines: https://github.com/mherweg/d-laser-fgtools/blob/master/wed2stg.py if you feel like improving WED, here is the code: http://developer.x-plane.com/code/#Get_the_source_code http://dev.x-plane.com/cgit/cgit.cgi/xptools.git/tree/src In case you use blender and the 2 addons io_scene_ac3d and io_xplane2blender to convert from .ac to .obj: After import you have to go to properties->scene and add one x-plane layer. enable Export for Layer 1 and name it like the object without extension. e.g. Fence-50m-green.ac -> Fence-50m-green ..or maybe with the extension - I'll have to try that: Fence-50m-green.ac -> Fence-50m-green.ac Fence-50m-green.xml -> Fence-50m-green.xml it would be nice to have a command line tool for this conversion step, similar to: xplane2fg http://wiki.flightgear.org/index.php?title=Howto%3AConvert_objects_from_X-Plane&type=revision&diff=81008&oldid=69852#Convert If you edit the heading in WED then use the "north" hand of the cross to get headings from 0 to 359 degrees. avoid negative headings! you can also enter exact headings in the property menu on the bottom right in WED. use "Edit->Duplicate" crl-sh-D to create many objects with the same heading. |
screenshots that can be used for this howto:
http://www.23hq.com/laserman/photo/21443715/original
http://www.23hq.com/laserman/photo/21443716/original
http://www.23hq.com/laserman/photo/21443717/original
http://www.23hq.com/laserman/photo/21443720/original
http://www.23hq.com/laserman/photo/21443721/original
http://www.23hq.com/laserman/photo/21443722/original
http://www.23hq.com/laserman/photo/21443723/original