SketchUp to AC3D exporter: Difference between revisions

Jump to navigation Jump to search
m
update
m (update)
Line 1: Line 1:
With the '''SketchUp to AC3D exporter''', developed by James Turner, you're able to export [http://sketchup.google.com SketchUp] models to the [[File Formats#.2A.ac|.ac fileformat]]. The script works on both the free version aswell on the pro version.
With the '''SketchUp to AC3D exporter''', developed by James Turner and impvored by others, you are able to export [http://sketchup.google.com SketchUp] models to the [[File Formats#.2A.ac|.ac fileformat]]. The script works on both the free version aswell on the pro version.
 
==Installation==
You can download the script at [[File:ac3d_export.rb|this link]]. Place the .rb file into your <tt>SketchUp/Plugins</tt> folder. Now restart SketchUp and the script should be visible through the <tt>Plugins > Export to AC3D</tt> menu.
 
For texture format conversion, install ImageMagick:
* Windows - [http://www.imagemagick.org/script/binary-releases.php#windows click]
* Mac - for the moment, see [http://www.imagemagick.org/script/binary-releases.php#macosx this], but I'll switch to using a simpler solution in the near future
 
==A note about textures==
The AC3D exporter is set to export textures to the PNG format by standard. That means that for FlightGear to be able to display your model correctly, you will have to provide your textures in the .png format.
 
Also see: [[AC files: Basic changes to textures and colors#Textures|AC files: Textures]] and [[Textures & Texture Maps in SketchUp#Correct display of texture colors in the AC file|SketchUp: Correct display of texture colors in the AC file]].


==Development==
==Development==
Line 6: Line 18:
'''Done:'''
'''Done:'''
* Geometry export
* Geometry export
* Texture export (including conversion to .rgb format)
* Texture export


'''Known Issues:'''
'''Known Issues:'''
Line 14: Line 26:
'''To do:'''
'''To do:'''
* Conversion of lat- and longitude locations.
* Conversion of lat- and longitude locations.
==Installation==
You can download the script at http://www.goneabitbursar.com/ac3d_export.rb (Right mouseclick > Save as). Place the .rb file into your <tt>SketchUp/plugins</tt> folder. Now restart SketchUp and the script should be visible through the <tt>Plugins > Export to AC3D</tt> menu.
For texture format conversion, install ImageMagick:
* Windows - [http://www.imagemagick.org/script/binary-releases.php#windows]
* Mac - for the moment, see [http://www.imagemagick.org/script/binary-releases.php#macosx], but I'll switch to using a simpler solution in the near future
==PNG adaption==
The AC3D exporter is set to export textures to RGB format by standard. That means that for FG to be able to display your model correctly, you will have to provide your textures in RGB format. Sketchup, however, cannot read RGB files, so you first have to feed them into Sketchup in another format, e.g. JPG and then convert them after exporting the model.
You can change that by telling AC3D exporter to export the textures as PNG files. The advantage is that Sketchup and FG can both read PNG and no conversion will be necessary. In order for this to work, open the file <tt>ac3d_export.rb</tt> in any text editor and change two lines as follows:
<tt>return File.basename(n, File.extname(n)) + ".rgb"</tt> becomes<br>
<tt>return File.basename(n, File.extname(n)) + ".png"</tt>
and
<tt>output_path = File.join($output_dir, File.basename(t, File.extname(t)) + ".rgb")</tt> becomes<br>
<tt>output_path = File.join($output_dir, File.basename(t, File.extname(t)) + ".png")</tt>
And you're done! Now AC3D exporter will tell all .ac files to request textures in PNG format.
You can check whether this has worked by opening your .ac files in a text editor. Texture lines should now have PNG endings like here:<br><tt>texture "oilrig09contyellow.png"</tt>.
Also see: [[AC files: Basic changes to textures and colors#Textures|AC files: Textures]] and [[Textures & Texture Maps in SketchUp#Correct display of texture colors in the AC file|SketchUp: Correct display of texture colors in the AC file]].


{{3d}}
{{3d}}


[[Category:Modeling]]
[[Category:Scenery enhancement]]
[[Category:Scenery enhancement]]
[[Category:Modeling]]

Navigation menu