Difference between revisions of "HPL3/Blender HPL3 export plugin"

From Frictional Wiki
Jump to navigation Jump to search
(Upload from wiki)
 
(Formatting)
Line 1: Line 1:
 
= [Add-on] Blender to HPL3 =
 
= [Add-on] Blender to HPL3 =
  
----
+
This addon allows you to model anything from single assets to entire maps within Blender, and synchronize them to an HPL3 engine map, automatically creating and configuring textures, material, and entity files for a fast iteration process. The script is also capable of removing objects from the HPL3 map which have been removed in the Blender scene, exporting rigged and animated objects, and baking lighting onto scene objects.
  
[https://i.imgur.com/1PrPPuD.jpg?nolink&546x345]
+
Add-on homepage: [https://github.com/cadehaley/BlenderHPL3export GitHub]
  
[https://github.com/cadehaley/BlenderHPL3export https://github.com/cadehaley/BlenderHPL3export]
 
  
To Download: (GitHub → "Clone or Download" → "Download ZIP")
+
== Installation ==
  
'''HPL3 Exporter Version 3.1''' <br /><br />This addon allows you to model anything from single assets<br />to entire maps within Blender, and synchronize them to an HPL3 engine map,<br />automatically creating and configuring textures, material, and entity files<br />for a fast iteration process. The script is also capable of removing objects<br />from the HPL3 map which have been removed in the Blender scene,<br />exporting rigged and animated objects, and baking<br />lighting onto scene objects.
+
The add-on requires Blender 2.80 or later.
  
== INSTALLATION (Requires Blender 2.80 Beta or later) ==
+
# Go to [https://github.com/cadehaley/BlenderHPL3export GitHub] → "Clone or Download" → "Download ZIP"
 
+
# Copy "io_export_hpl3.py" and the "nvidia" folder to Blender's addons directory ("…/Blender/2.80/scripts/addons")
----
+
# Open Blender, go to Edit > Preferences > Add-ons > Search "hpl3"
 
+
# Check box next to "Import-Export: HPL3 Export" and press "Save Preferences"
1. Copy "io_export_hpl3.py" and the "nvidia" folder to Blender's addons<br />directory ("…/Blender/2.80/scripts/addons")<br /><br />2. Open Blender, go to Edit > Preferences > Add-ons > Search "hpl3"<br /><br />3. Check box next to "Import-Export: HPL3 Export" and press "Save Preferences"<br /><br />4. Exit window and go to the Tools bar in the left side of the 3D View. Drag<br />the width of the Tools bar out to set fields, and press T to hide the tools<br />bar at any time. Have fun!
+
# Exit window and go to the Tools bar in the left side of the 3D View. Drag the width of the Tools bar out to set fields, and press T to hide the tools bar at any time. Have fun!
  
 
== Important usage notes ==
 
== Important usage notes ==
 
----
 
  
 
On export, the subdirectory and mesh file will take this name ("Suzanne.dae"), and having name conflicts in HPL3 can cause the wrong textures to load. The "Object Name" does not matter as much, and will be used to name that instance of the object when placed in the map.
 
On export, the subdirectory and mesh file will take this name ("Suzanne.dae"), and having name conflicts in HPL3 can cause the wrong textures to load. The "Object Name" does not matter as much, and will be used to name that instance of the object when placed in the map.
Line 25: Line 22:
 
* '''Rigged Meshes''': Use "Single Export" when you have an animated mesh broken into separate objects (e.g. shirt, head, hair) that are deformed by the same armature (skeleton). Exporting meshes that are deformed by different armatures to one file/entity is not supported by HPL3 and will produce unexpected results.
 
* '''Rigged Meshes''': Use "Single Export" when you have an animated mesh broken into separate objects (e.g. shirt, head, hair) that are deformed by the same armature (skeleton). Exporting meshes that are deformed by different armatures to one file/entity is not supported by HPL3 and will produce unexpected results.
 
* '''Baking Modes''':
 
* '''Baking Modes''':
'''* Textures Per Material: <br />Think of each material as having its own UV set. Faces assigned to Material A <br />cannot overlap in the UV editor with other Material A faces, though it is ok <br />(even recommended) for faces assigned to Material B to use up the full UV space, <br />since it won't matter if a face from Material A overlaps with a face from Material B.
+
* '''Textures Per Material:''' <br />Think of each material as having its own UV set. Faces assigned to Material A <br />cannot overlap in the UV editor with other Material A faces, though it is ok <br />(even recommended) for faces assigned to Material B to use up the full UV space, <br />since it won't matter if a face from Material A overlaps with a face from Material B.
 
* '''Instancing''': Use ''Alt+D''  to create copies of an object in Blender to place around a map, since they will point to the same "Mesh" datablock. Using Copy/Paste or Shift+D creates a new "Mesh" datablock every time, and therefore a new .dae and .dds file on export, leaving you with multiple repeat numbered .dae and/or .dds files taking unnecessary space on export.
 
* '''Instancing''': Use ''Alt+D''  to create copies of an object in Blender to place around a map, since they will point to the same "Mesh" datablock. Using Copy/Paste or Shift+D creates a new "Mesh" datablock every time, and therefore a new .dae and .dds file on export, leaving you with multiple repeat numbered .dae and/or .dds files taking unnecessary space on export.
 
== Troubleshooting ==
 
== Troubleshooting ==
 
----
 
  
 
* Hover your pointer over options for more in-depth info on how to use them
 
* Hover your pointer over options for more in-depth info on how to use them
* When using "Textures Per Material", if texture is black or has black parts, <br />make sure objects are UV unwrapped and UV faces are within the UV boundary. <br />This mode requires that all UV faces lie within UV image bounds.
+
* When using "Textures Per Material", if texture is black or has black parts, make sure objects are UV unwrapped and UV faces are within the UV boundary. This mode requires that all UV faces lie within UV image bounds.
* If materials are failing to export properly, try switching between <br />"Textures Per Material" and "Textures Per Object", as one mode may <br />work better with your material setup than the other. Also, keep in mind that <br />texture baking requires that each material use a single `Principled BSDF` node
+
* If materials are failing to export properly, try switching between "Textures Per Material" and "Textures Per Object", as one mode may work better with your material setup than the other. Also, keep in mind that texture baking requires that each material use a single `Principled BSDF` node
* In the Level Editor, if objects fail to appear after pressing <br />the button to reload static object or entity changes, try exiting out of the <br />editor and reloading your map to make objects appear properly again.
+
* In the Level Editor, if objects fail to appear after pressing the button to reload static object or entity changes, try exiting out of the editor and reloading your map to make objects appear properly again.
 
 
== BUGS ==
 
  
----
+
== Bugs ==
  
For any questions or to report any bugs, message me @cadely on the [https://discordapp.com/invite/frictionalgames|Frictional Games Discord]] or on [[http://frictionalgames.com/forum frictionalgames.com/forum]
+
For any questions or to report any bugs, message me @cadely on the [https://discordapp.com/invite/frictionalgames|Frictional Games Discord] or on [http://frictionalgames.com/forum frictionalgames.com/forum]

Revision as of 19:47, 9 November 2020

[Add-on] Blender to HPL3

This addon allows you to model anything from single assets to entire maps within Blender, and synchronize them to an HPL3 engine map, automatically creating and configuring textures, material, and entity files for a fast iteration process. The script is also capable of removing objects from the HPL3 map which have been removed in the Blender scene, exporting rigged and animated objects, and baking lighting onto scene objects.

Add-on homepage: GitHub


Installation

The add-on requires Blender 2.80 or later.

  1. Go to GitHub → "Clone or Download" → "Download ZIP"
  2. Copy "io_export_hpl3.py" and the "nvidia" folder to Blender's addons directory ("…/Blender/2.80/scripts/addons")
  3. Open Blender, go to Edit > Preferences > Add-ons > Search "hpl3"
  4. Check box next to "Import-Export: HPL3 Export" and press "Save Preferences"
  5. Exit window and go to the Tools bar in the left side of the 3D View. Drag the width of the Tools bar out to set fields, and press T to hide the tools bar at any time. Have fun!

Important usage notes

On export, the subdirectory and mesh file will take this name ("Suzanne.dae"), and having name conflicts in HPL3 can cause the wrong textures to load. The "Object Name" does not matter as much, and will be used to name that instance of the object when placed in the map.

  • Rigged Meshes: Use "Single Export" when you have an animated mesh broken into separate objects (e.g. shirt, head, hair) that are deformed by the same armature (skeleton). Exporting meshes that are deformed by different armatures to one file/entity is not supported by HPL3 and will produce unexpected results.
  • Baking Modes:
  • Textures Per Material:
    Think of each material as having its own UV set. Faces assigned to Material A
    cannot overlap in the UV editor with other Material A faces, though it is ok
    (even recommended) for faces assigned to Material B to use up the full UV space,
    since it won't matter if a face from Material A overlaps with a face from Material B.
  • Instancing: Use Alt+D to create copies of an object in Blender to place around a map, since they will point to the same "Mesh" datablock. Using Copy/Paste or Shift+D creates a new "Mesh" datablock every time, and therefore a new .dae and .dds file on export, leaving you with multiple repeat numbered .dae and/or .dds files taking unnecessary space on export.

Troubleshooting

  • Hover your pointer over options for more in-depth info on how to use them
  • When using "Textures Per Material", if texture is black or has black parts, make sure objects are UV unwrapped and UV faces are within the UV boundary. This mode requires that all UV faces lie within UV image bounds.
  • If materials are failing to export properly, try switching between "Textures Per Material" and "Textures Per Object", as one mode may work better with your material setup than the other. Also, keep in mind that texture baking requires that each material use a single `Principled BSDF` node
  • In the Level Editor, if objects fail to appear after pressing the button to reload static object or entity changes, try exiting out of the editor and reloading your map to make objects appear properly again.

Bugs

For any questions or to report any bugs, message me @cadely on the Games Discord or on frictionalgames.com/forum