SketchUp to AC3D exporter: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 26: Line 26:
[[Category:Scenery enhancement]]
[[Category:Scenery enhancement]]
[[Category:Modeling]]
[[Category:Modeling]]
==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. There are two advantages to that:
*Sketchup and FG can both read PNG and no conversion will be necessary
*PNG files are smaller than RGB files
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>.
248

edits

Navigation menu