| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
hpl3:community:other:hpl2_import [2016/08/22 02:40] cadely |
hpl3:community:other:hpl2_import [2020/02/11 19:43] (current) timan [Other problems? Questions?] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Importing Models from HPL2 ====== | ====== Importing Models from HPL2 ====== | ||
| - | |||
| - | <note>Errors may come up when your models are exported to your custom story. Looking into it. | ||
| - | |||
| - | - Romulator (11 Oct 2015)</note> | ||
| Importing models from HPL2 to HPL3 is not a complex process but will involve needing to "convert" textures to a format that HPL3 understands. There are some problems which you may face, and this tutorial is here to try and tackle some of the errors and give you a basic idea of importing models from Amnesia: The Dark Descent and Amnesia: A Machine For Pigs. | Importing models from HPL2 to HPL3 is not a complex process but will involve needing to "convert" textures to a format that HPL3 understands. There are some problems which you may face, and this tutorial is here to try and tackle some of the errors and give you a basic idea of importing models from Amnesia: The Dark Descent and Amnesia: A Machine For Pigs. | ||
| Line 11: | Line 7: | ||
| Please refrain from importing these models and releasing the entirety of them. By following this tutorial, it is assumed you have a legally purchased copy of Amnesia: The Dark Descent and/or Amnesia: A Machine For Pigs. While I cannot stop you from performing these steps, please consider some respect for the modellers and their works by purchasing the games. | Please refrain from importing these models and releasing the entirety of them. By following this tutorial, it is assumed you have a legally purchased copy of Amnesia: The Dark Descent and/or Amnesia: A Machine For Pigs. While I cannot stop you from performing these steps, please consider some respect for the modellers and their works by purchasing the games. | ||
| - | --------------------- | + | ---- |
| **<font 24.0pt/arial,sans-serif;;#333333;;inherit>Converting HPL2 Textures to HPL3</font> ** | **<font 24.0pt/arial,sans-serif;;#333333;;inherit>Converting HPL2 Textures to HPL3</font> ** | ||
| Line 19: | Line 15: | ||
| <font 10.5pt/arial,sans-serif;;#333333;;inherit>When loading a Machine for Pigs asset (for example) into the HPL3 Model Viewer, you’ll likely be confronted with this:</font> | <font 10.5pt/arial,sans-serif;;#333333;;inherit>When loading a Machine for Pigs asset (for example) into the HPL3 Model Viewer, you’ll likely be confronted with this:</font> | ||
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit></font> | + | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_01.jpg?nolink&500x594}} |
| <font 9px/inherit;;inherit;;inherit>(Assets placed into a single folder before loading the model):</font> | <font 9px/inherit;;inherit;;inherit>(Assets placed into a single folder before loading the model):</font> | ||
| Line 37: | Line 33: | ||
| <font 10.5pt/arial,sans-serif;;#333333;;inherit>You’ll notice that the lighting reacts very strangely when using “Keylight on Camera” and that an odd green sheen can be seen tween the edges in the scene. This is because of a change over the way that specular textures (file_spec.dds) and normal textures (file_nrm.dds) are interpreted in HPL3.</font> | <font 10.5pt/arial,sans-serif;;#333333;;inherit>You’ll notice that the lighting reacts very strangely when using “Keylight on Camera” and that an odd green sheen can be seen tween the edges in the scene. This is because of a change over the way that specular textures (file_spec.dds) and normal textures (file_nrm.dds) are interpreted in HPL3.</font> | ||
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>This section will present a guide of how to convert these specular and normal textures from HPL2 format to HPL3 format using Photoshop CS6 with the</font> [[https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop|Nvidia DDS exporter]]<font 10.5pt/arial,sans-serif;;#333333;;inherit>plugin. GIMP users can also follow the manual process below provided the GIMP DDS exporter is installed.</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>This section will present a guide of how to convert these specular and normal textures from HPL2 format to HPL3 format using Photoshop CS6 with the</font> [[https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop|Nvidia DDS Exporter]] <font 10.5pt/arial,sans-serif;;#333333;;inherit>plugin</font> <font 10.5pt/arial,sans-serif;;#333333;;inherit>. GIMP users can also follow the manual process below provided the GIMP DDS exporter is installed.</font> |
| - | **<font 24.0pt/arial,sans-serif;;#333333;;inherit>Converting a Specular Texture</font> ** | + | **<font 24.0pt/arial,sans-serif;;#333333;;inherit>Converting a Specular Texture</font> ** |
| - | **__<font 10.5pt/arial,sans-serif;;#333333;;inherit>Method 1: Photoshop Script</font> __ ** | + | **__<font 10.5pt/arial,sans-serif;;#333333;;inherit>Method 1: Photoshop Script</font> __ ** |
| - | - <font 10.5pt/arial,sans-serif;;#333333;;inherit>Save the following block of code in an administrative-level text editor as __ HPL2specConvert.jsx __ under</font> | + | - <font 10.5pt/arial,sans-serif;;#333333;;inherit>Save the following block of code in an administrative-level text editor as __ HPL2specConvert.jsx __ under</font> |
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts\</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Presets\Scripts\</font> <font 10.5pt/arial,sans-serif;;#333333;;inherit>(or wherever your Photoshop installation is…)</font> |
| <code> | <code> | ||
| - | <font 9px/inherit;;inherit;;inherit>if (documents.length> 0) { | + | if (documents.length> 0) { |
| alert("Document is open, press ok to convert."); | alert("Document is open, press ok to convert."); | ||
| var theImage = app.activeDocument; | var theImage = app.activeDocument; | ||
| Line 112: | Line 108: | ||
| else { | else { | ||
| alert("No doc open"); | alert("No doc open"); | ||
| - | }</font> | + | } |
| </code> | </code> | ||
| Line 119: | Line 115: | ||
| <font 10.5pt/arial,sans-serif;;#333333;;inherit>3. Save as a .DDS file of type DXT5, preferably with “_spec” still appended to the end of the filename</font> | <font 10.5pt/arial,sans-serif;;#333333;;inherit>3. Save as a .DDS file of type DXT5, preferably with “_spec” still appended to the end of the filename</font> | ||
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit></font> | + | **__<font 10.5pt/arial,sans-serif;;#333333;;inherit>Method 2: Manual</font> __ ** |
| - | + | ||
| - | **__<font 10.5pt/arial,sans-serif;;#333333;;inherit>Method 2: Manual</font> __ ** | + | |
| - <font 10.5pt/arial,sans-serif;;#333333;;inherit>Open the specular texture in Photoshop.</font> | - <font 10.5pt/arial,sans-serif;;#333333;;inherit>Open the specular texture in Photoshop.</font> | ||
| {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_03.jpg?nolink&500x289}} | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_03.jpg?nolink&500x289}} | ||
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>An HPL2 image such as this AAMFP texture will appear as green, because HPL2 relies on the individual channels for specular information, where __ Red = Intensity, Green = Power, and Blue = Unused (black) __ . The HPL3 format relies on Red, Green, and Blue for Intensity, and relies on the Alpha channel for Power.</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>An HPL2 image such as this AAMFP texture will appear as green, because HPL2 relies on the individual channels for specular information, where __ Red = Intensity, Green = Power, and Blue = Unused (black) __ . The HPL3 format relies on Red, Green, and Blue for Intensity, and relies on the Alpha channel for Power.</font> |
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>For more information, look at the</font> [[https://wiki.frictionalgames.com/hpl3/tutorials/basic_modeling|HPL3 Modeling Tutorial]] | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>For more information, look at the</font> [[https://wiki.frictionalgames.com/hpl3/tutorials/basic_modeling|HPL3 Modeling Tutorial]] |
| <font 10.5pt/arial,sans-serif;;#333333;;inherit>Our goal is to create a copy of the intensity channel on the Red, Green, and Blue channels, and move the power channel to the Alpha channel.</font> | <font 10.5pt/arial,sans-serif;;#333333;;inherit>Our goal is to create a copy of the intensity channel on the Red, Green, and Blue channels, and move the power channel to the Alpha channel.</font> | ||
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>2. Go to the “Channels” tab next to Layers, and select only the green channel. Select with Ctrl-A and copy the channel to the clipboard.</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>2. Go to the “Channels” tab next to Layers, and select only the green channel. Select with Ctrl-A and copy the channel to the clipboard.</font> |
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>3. If an “Alpha” channel already exists, select it, otherwise create a new channel using the button at the bottom of the pane and paste into the Alpha layer.</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>3. If an “Alpha” channel already exists, select it, otherwise create a new channel using the button at the bottom of the pane and paste into the Alpha layer.</font> |
| {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_04.jpg?nolink&500x293}} | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_04.jpg?nolink&500x293}} | ||
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>4. Select the Red channel, Ctrl-A, copy, then select the Green channel and Blue channel individually, pasting the same (red channel) clipboard image each time</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>4. Select the Red channel, Ctrl-A, copy, then select the Green channel and Blue channel individually, pasting the same (red channel) clipboard image each time</font> |
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit></font> | + | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_05.jpg?nolink&500x291}} |
| - | <font 10.5pt/arial,sans-serif;;#333333;;inherit>5. Save as a .DDS file of type DXT5, preferably with “_spec” still appended to the end of the filename</font> | + | <font 10.5pt/arial,sans-serif;;#333333;;inherit>5. Save as a .DDS file of type DXT5, preferably with “_spec” still appended to the end of the filename</font> |
| - | **<font 24.0pt/arial,sans-serif;;#333333;;inherit>Converting a Normal Texture</font> ** | + | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_02.jpg?nolink&500x453}} |
| - | - <font 10.5pt/arial,sans-serif;;#333333;;inherit>Simply open the normal texture (typically _nrm appended to filename) and save using the NVIDIA exporter in the __ 3DC format __ . Do not forget to switch this back to DXT5 when exporting other DDS textures.</font> | + | **<font 24.0pt/arial,sans-serif;;#333333;;inherit>Converting a Normal Texture</font> ** |
| + | - <font 10.5pt/arial,sans-serif;;#333333;;inherit>Simply open the normal texture (typically _nrm appended to filename) and save using the NVIDIA exporter in the __ 3DC format __ . Do not forget to switch this back to DXT5 when exporting other DDS textures.</font> | ||
| {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_06.jpg?nolink&500x323}} | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_06.jpg?nolink&500x323}} | ||
| Line 152: | Line 147: | ||
| <font 10.5pt/arial,sans-serif;;#333333;;inherit>If all is well and good, you should have an asset with working lighting and proper specular highlights, ready for you to place in your HPL3 map.</font> | <font 10.5pt/arial,sans-serif;;#333333;;inherit>If all is well and good, you should have an asset with working lighting and proper specular highlights, ready for you to place in your HPL3 map.</font> | ||
| - | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_07.jpg?nolink&600x468}} \\ <font 10.5pt/arial,sans-serif;;#333333;;inherit>Note that if the object is an entity, you might have to open the .ent file with the Model Editor and save the file again, then test to see that the entity is still functioning properly and make adjustments- see the below sections.</font> | + | {{https://wiki.frictionalgames.com/_media/hpl3/community/hpl2_asset_tut_07.jpg?nolink&600x468}} \\ <font 10.5pt/arial,sans-serif;;#333333;;inherit>Note that if the object is an entity, you might have to open the .ent file with the Model Editor and save the file again, then test to see that the entity is still functioning properly and make adjustments- see the below sections</font> <font 10.5pt/arial,sans-serif;;#333333;;inherit>.</font> |
| ---- | ---- | ||
| - | ====== <font 24px/inherit;;inherit;;inherit>Importing to the Level Editor</font> ====== | + | ====== Importing to the Level Editor ====== |
| - | ==== How can I import Static Objects? ==== | + | **How can I import Static Objects?** |
| Static Objects are arguably, very easy to import. After converting the textures, it is more or less just a copy and paste of the static_objects in question (plus their textures) into SOMA's static_objects folder, or your mod's directory. For the sake of examples, I will use mansionbase, since mansionbase is probably the most common. | Static Objects are arguably, very easy to import. After converting the textures, it is more or less just a copy and paste of the static_objects in question (plus their textures) into SOMA's static_objects folder, or your mod's directory. For the sake of examples, I will use mansionbase, since mansionbase is probably the most common. | ||
| Line 212: | Line 207: | ||
| ==== How can I import Enemies? ==== | ==== How can I import Enemies? ==== | ||
| - | <note>The Manpigs from Amnesia: A Machine For Pigs are currently untested. I will look into this at a later time.</note> | + | <note>Editing the enemies to have their own sounds requires making a new class for those enemies in SOMA's Script folder. In the below tutorial, the Brute will mimic the Construct sounds.</note> |
| - | + | ||
| - | <note>At current, because I am not fully aware of making custom classes, monsters you import will not have the sounds they usually had in their previous games. I will look into this at a later time.</note> | + | |
| Import the enemies just like in the entity tutorial above until you get to the Model Editor step. Load up the enemy. You may get a prompt when loading up the enemy. Just press OK and you should be good to go. In the case of Amnesia's notorious Servant Brute, we will load it up and be greeted by this. | Import the enemies just like in the entity tutorial above until you get to the Model Editor step. Load up the enemy. You may get a prompt when loading up the enemy. Just press OK and you should be good to go. In the case of Amnesia's notorious Servant Brute, we will load it up and be greeted by this. | ||
| Line 252: | Line 245: | ||
| ===== Other problems? Questions? ===== | ===== Other problems? Questions? ===== | ||
| - | If you have any questions or face other problems, please, feel free to start a thread in [[https://www.frictionalgames.com/forum/forum-82.html|SOMA's Development support forum]], or drop a [[https://www.frictionalgames.com/forum/private.php?action=send&uid=27667|Personal Message to Romulator]] on the forum. I may not be able to solve all problems, but if I cannot, I'll just ask you create a thread. | + | If you have any questions or face other problems, please, feel free to start a thread in the [[https://discordapp.com/invite/frictionalgames|Frictional Games Discord Server]] |