Editing G3D support

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 13: Line 13:
 
#Open the python file you just downloaded.
 
#Open the python file you just downloaded.
 
#*Alternatively, it's possible to manually install the script by placing it in the Blender scripts folder. The location varies depending on where you told the installer to create this folder, and could be in the installation directory or a user directory (such as the home folder or the AppData folder).
 
#*Alternatively, it's possible to manually install the script by placing it in the Blender scripts folder. The location varies depending on where you told the installer to create this folder, and could be in the installation directory or a user directory (such as the home folder or the AppData folder).
#The addon will now be found in this window, in the import-export category, under the name "G3D Mesh Import/Export". <b>Tick the checkbox beside it to enable it</b>.
+
#The addon will now be found in this window, in the import-export category, under the name "G3D Mesh Import/Export". Tick the checkbox beside it to enable it.
 
#Note that in order to be able to export in future sessions, you must save the user preferences with <tt>Ctrl + U</tt>.
 
#Note that in order to be able to export in future sessions, you must save the user preferences with <tt>Ctrl + U</tt>.
  
 
==Limitations==
 
==Limitations==
 
*All faces must be triangulated (the 2.6x exporter automatically converts them to triangles before export). Faces can be converted to triangles by selecting all faces and using the hotkey <tt>ctrl + T</tt>.
 
*All faces must be triangulated (the 2.6x exporter automatically converts them to triangles before export). Faces can be converted to triangles by selecting all faces and using the hotkey <tt>ctrl + T</tt>.
*( In old versions, the axis differs in G3D, which might make some trouble with old models. In old versions the Y axis was height, X axis was length, and Z axis was width.)
+
*The axis differs in G3D, with the Y axis being height, X axis being length, and Z axis being width, unlike Blender's default of the Z axis being height, X being length, and Y being width.
  
 
==Model preparation==
 
==Model preparation==
Line 24: Line 24:
 
*The start and end animation frame should be set appropriately. A large number of frames causes a massive filesize. G3D interposition of frames is considerably smoother than viewed in Blender, so models should rarely require more than 30 frames. If the model is unanimated, the start aand end frame should be set to 1 in the timeline window.
 
*The start and end animation frame should be set appropriately. A large number of frames causes a massive filesize. G3D interposition of frames is considerably smoother than viewed in Blender, so models should rarely require more than 30 frames. If the model is unanimated, the start aand end frame should be set to 1 in the timeline window.
 
*<span id="linking_textures">The texture of the model must be properly linked in order for it to appear on the exported G3D model. To link the texture, in the properties window, under the textures tab, with the model selected, set the type to "Image or movie" and open the image.</span>
 
*<span id="linking_textures">The texture of the model must be properly linked in order for it to appear on the exported G3D model. To link the texture, in the properties window, under the textures tab, with the model selected, set the type to "Image or movie" and open the image.</span>
*In the G3D support panel, under Object Data in the properties window, the g3d object properties can be set:
+
*In the G3D support panel, under Object Data in the properties window, the model can be single sided or double sided (which controls whether or not the object can only be viewed from one side), have [[teamcolor]] or transparency (if team colour is toggled, alpha in the texture will be replaced with team colour), and be toggled as selectable or not (non-selectable objects can't be clicked on to select the unit, such as the pebbles that scatter when a worker is mining).
**<b>double sided</b> Controls whether or not the object can only be viewed from both sides
+
*In versions older than the Blender 2.63 version of the script:
**[[teamcolor]] Controls if team colour or transparency is used. Transparent parts ( alpha ) in the texture will be replaced with team colour.
+
**Single sided or double sided can be toggled object data tab in the properties window, by ticking or unticking the double sided box. This defaults to double sided, which means the faces from both sides of the model, compared to just the side the face's normal points.
**<b>non-selectable</b> Non-selectable objects can't be clicked on to select the unit, such as the pebbles that scatter when a worker is mining.
+
**The usage of teamcolour or transparency is toggled in the materials tab of the properties window. Under the options header, if "face textures alpha" is ticked, alpha in the texture will become transparency. If unticked, as is the default, alpha will be replaced with [[teamcolor]].
**<b>fully opaque</b> which makes the model invisible, but its still selectable!! ( Help to make small units easier to select, such as snakes spiders ... )
 
**<b>glow</b> this lets the object glow the way MG's particles "glow".
 
 
*To make a material partially transparent (for use such as [[transparent teamcolor]]), in the materials tab of the properties window, check the transparency box and under Z transparency, adjust the alpha slider.
 
*To make a material partially transparent (for use such as [[transparent teamcolor]]), in the materials tab of the properties window, check the transparency box and under Z transparency, adjust the alpha slider.
  
Line 41: Line 39:
 
==Troubleshooting==
 
==Troubleshooting==
 
*'''White model''' - The texture was not properly linked to the object (detailed [[#linking_textures|above]]).
 
*'''White model''' - The texture was not properly linked to the object (detailed [[#linking_textures|above]]).
*'''Model is sideways''' - Model not orientated properly. The Z(blue) axis is height, the X axis is width, and the Y axis is depth, like Blender's defaults.'''(Warning: Orientation is different in older versions of the script!)'''
+
*'''Model is sideways''' - Model not orientated properly. The Y axis is height, the X axis is length, and the Z axis is width, unlike Blender's defaults.
  
 
==See also==
 
==See also==

Please note that all contributions to MegaGlest are considered to be released under the Creative Commons Attribution Share Alike (see MegaGlest:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)