Hearts of Iron IV

Hearts of Iron IV

Evaluări insuficiente
How to do map items (3d models of buildings on the map)
De către Tra_Totally_Not
Remember - THIS IS NOT A BLENDER GUIDE, THERE WILL BE A MINIMUM OF INFORMATION ABOUT USING BLENDER, ONLY THE IO_PDX_MESH PLUGIN!!!!!!!!!!

I will try to explain as concisely as possible how to insert a 3d model on a hoi4 map.
2
   
Premiază
Adaugă la preferate
Preferat
Elimină din preferate
Software
Blender + io_pdx_mesh plugin[github.com]

How to install?

Download zip archive









Edit











Preferences










Add-ons -> Install. Select the ZIP archive with the plugin.











DON'T FORGET TO ACTIVATE!











Paint NET[www.getpaint.net]
Creation of a 3d model.
Remove light and camera














Open the PDX Blender tools panel and click Create.


















Create material with any name with PDX Mesh Advanced.










Apply the material to the cube.











Also don't forget to enable Viewport Shading.











Create diffuse. This is the texture that will be displayed on our model. Note: it must be in dds format (B8G8R8A8, Linear A8R8G8B8), and the resolution must be 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, etc... You can create a file of any width or height.

Save this texture as test_diffuse.dds

You can save this texture directly to gfx/model











We go into shading... OH GOD, WHAT THE FU-... It's okay. We need to poke a couple of buttons and get out of here.













Load test_diffuse.dds into the topmost node.

















Go to the UV editor (turn on Viewport Shading). Cube looks... bad.










We go into edit mode, select mod, select face select. Press A, now the unwrap is visible on the texture. Dragging the unwrap to the right places.












Here's what I got. But... the face is kind of strange, right? Just turn the unwrap. Also press A and Ctrl T, so you triangulate faces. (There is no triangulation in the screenshot.)











Great. Now we need to return to shading. But first, let's prepare the textures: open test_diffuse in paint net and in Effects -> Stylize -> Emboss. It should be something like this.








Open layer properties and set Opacity to 130. Save as test_normal.dds










Make a new layer which paint in green, open the properties of the layer and set it as in the screenshot. Merge layers, set opacity to 130 and save as test_specular.dds









Set the textures. AND COLOR SPACE MUST BE SET TO NON-COLOR FOR SPECULAR AND NORMALS!

































Save...
Adding a model to the map
Create a mod in paradox launcher.

I will call the mod folder test_mod.

Create a gfx folder in the mod folder, and in it the models and entities folders.


Put test.mesh, teat_diffuse, test_normal, test_specular in the models folder.








Now in entities we need to create gfx and asset files (you can take them from a vanilla game and clean them up)





IN GFX FILE

objectTypes = {
pdxmesh = {
name = "test_mesh" # mesh creation
file = "gfx/models/test.mesh"
}

}

IN ASSET FILE

entity = {
name = "test" # creating a entity from a mesh.
pdxmesh = "test_mesh"
}

INSTALLING THE MODEL ON THE MAP IN THE GAME

In test_mod create a map folder, and copy the ambient_object.txt file from the original game. DO NOT DELETE THE CONTENT OF THE FOLDER!

Insert our model into the file:

type={
type="test"
use_animation=no
scale=1
object={
name="test"
position={
000.000 0.000 000.000 # X Y Z
}
rotation={
000.000 000.000 000.000
}
}
}

How to find out the coordinates?

Easy.

Come into the game and turn on through the console (`) debug mode.

I want this beautiful face to hang over Ohio decorating this place.

Move the mouse to the place where we want to install the model, hold down the keys ctrl alt.

look at it:

These are X and Z, respectively. I want the cube to float in the air: I will increase Y. (I also applied rotation)









Result:

















mod: https://steamcommunity.com/sharedfiles/filedetails/?id=3004584918
5 comentarii
_yyamix_ 17 apr. la 10:23 
Thanks, I'll try
Tra_Totally_Not  [autor] 17 apr. la 10:19 
@_yyamix_ The guide is a bit silly, can't find the time to rewrite it. In specular you can leave the transparency instead of the punkt from the guide or find a texture in vanilla files and copy a color from there, which you can fill the whole space with.
_yyamix_ 17 apr. la 0:56 
"Make a new layer which paint in green, open the properties of the layer and set it as in the screenshot.
Merge layers, set opacity to 130 and save as test_specular.dds"
-> you mean set opacity 130 to the green layer and then merge?
czarny kot 19 dec. 2024 la 11:14 
I always wanted to put my lol face in the game. Thanks bro
abdullah 21 mai 2024 la 18:01 
nice guide thank you