Haydee 2
No hay suficientes valoraciones
Create new Mesh and Union with Blender
Por Limitlessman
As explain in title, this guide will guide you to create totaly new Mesh (One material) and Union (Many materials) with Blender.

update 2021-03-15 :
- I made a mistake when I was saying you must align the cube to the Z axis for that working. In reality, the center of grid will be the center of the mesh in Edith. See point 4 of CREATE THE UV GRID AND APPLY TO THE OBJECT for example.
   
Premio
Favoritos
Favorito
Quitar
Summary
  1. Mesh
    A mesh is a group of 2D polygons used to create a 3D object. In Haydee 2, a mesh has only one texture. If you apply a texture to a mesh, all his faces will by fill with this texture. You can find original game mesh in Props, Items and Actors directory with the editor. If you want access them by file, you have to unzip the ZIP file located in Packs directory. To add a texture to a mesh, you have to modify his Material property or use the brush in Paint mode of Edith.

  2. Union
    Because the mesh can only have one material, the programmer of Haydee 2 create Union witch with you can add many Texture. Union doesn’t have material property and you can only modify his texture with the brush in Paint mode of Edith.

  3. Object in Blender
    Off course, the first step is to create the shape in Blender. I don’t want to explain how to create stuff in Blender, I just find a way to create Mesh/Union and I will give you my recipe.
    When you open Blender and create a new file, you begin with a cube. This cube is an object, and for create a mesh, you must have only one object. More for the Union but I will be back on it.

  4. Addons to have in Blender
    In order we will :
    • Create an object with Blender
    • Export a *.Dmesh with Blender
    • Create the *.Mesh and *.Union with Edith

    To export the *.Dmesh, you will need the Haydee 2 addons created by johnzero7. You can find it in this post : https://steamcommunity.com/app/1444650/discussions/2/2966146418266732111/

  5. Important thing about Edith
    A fact to know about Edith is all is pre-loaded in memory. So, il you export mesh, union, compound, etc... for the second time, you must do an update to see the change. In our case, Reload Geometry in the Tool menu. I add image in the sections Create your mesh and Create your union.
    Create a new object (Blender)
    For your first mesh, we will create a cube of 16x16x16 to fit with 8x8 textures. As mentioned above, the new cube is 2x2x2 and you need a 16x16x16. So we will need to scale it by 8.

    1. Create a new *.blend file in Blender.


    2. Select the cube and scale it by 8 :
      • Select the cube.
      • Press s.
      • Type 8 and press enter to scale it.

    3. At this point, you must have a 16x16x16 cube. You can check this out by two ways :
      • Select the cube and check his dimensions


      • Press 7 on key pad to go in Top view

    4. Now, you need to apply the scale modifier added at point 2. If you don’t do that you will have problem at the unraping step :
      • Select the cube.
      • Press Ctrl+A to open the Apply menu.
      • Click Scale to apply. All scale property is now 1.000 as in the picture below. (Press N to show/hide the context menu)
    Unrap (Blender)
    1. It’s time to unrap the cube. But before, you must mark witch edges Blender must cut :
      • Press Tab to enter in Edit mode.
      • Press 2 to the edge selection mode.
      • Select the edge you want Blender to cut.


      • Press Ctrl+E and click Mark Seam.
      • The the edges must become red to confirm they have been marked.

    2. For unrap your object open the UV editor. At the top of the screen, press on UV Editing workspace.


      Then you have the object editor in the Right windows and the UV Editor in the left windows.


    3. In the object editor, press 3 to active the face mode then press A to select all face of your cube.


    4. In the UV editor, right click and click Unrap.


      The result is the same, but if you had changed the shape of your cube to something else, it would have been different.
    Create the UV Grid and apply to the object (Blender)
    Now, it’s time to create the UV Grid witch with the game will know how to apply the texture to the mesh.
    1. In the UV editor, click on +New and create the new material.


    2. Add this new material to the cube base color :
      • Change the type of base color for Image Texture.


      • Then apply the new material with the small button beside the +New button.


      • Now, you are in solid preview so you don’t see the material. Active the material preview in to right side of object editor.

    3. For this cube, the UV Grid is perfect for a 16x16 texture in Edith but we want a 8x8 texture. In the object editor, press A to select all face. Then, in the UV Editor, press 3 to select the face mode, Select all faces, press S for scale, type 0.5 and enter. Each square in UV Grid is equivalent to two unit in Edith.


    4. The center of grid will be the center of of mesh in Edith. Exemple if you align the bottom face of the cube to the X axis in blender, the translation axis in edith will at the bottom. Same thing for the rotation.




    5. Some time, your texture will appear with offset in Edith. In that case, juste move the texture in UV editor by selecting all faces, press G to go in translation mode and move it by holding the Ctrl key to snap in the grid.
    Export to Dmesh (Blender)
    For the exportation, you don’t need to select the faces or the object. You can be in edit mode or in normal mode.
    1. Go to the Haydee Export menu.


    2. Check the option like the picture below and export your Dmesh.
    Create your Mesh and try it (Edith)
    There we are, time to create our Mesh file.

    1. In the Haydee 2 editor, add a Model actor anywhere and chose the new Dmesh. (Model is only for create other stuff and must never be use to map creation)


    2. Then press Export Mesh.


    3. Now, just add a StaticMesh in your map and try your brand new mesh by adding an 8x8 texture.

    4. Very important fact, if you export a mesh for the seconde time and more, you must do a reload Geometry to see the change.


    5. For the compound, you must also use the Model :
      • Add a physic component to the Model.


      • Create your compound.


      • Finaly, export compound.
    Prepare Dmesh file to create union (Blender)
    For the Union it’s a little more complicate because we must have two materials. The way I found to do that is by deleting one face in the cube then creates a second object with just one face to replace it.
    1. In the object editor in normal mode, select your cube and copy it. Move the copy near the original.


    2. Select the copy and go in edit mode, select all face but the bottom then delete it by pressing de X key.


    3. Return to normal mode, select the first cube, go to edit mode then delete the bottom face.


    4. In normal mode, move the face under the cube be pressing the Ctrl to snap to the grid and be sure to place it correctly.


    5. Normaly, the UV Grid of the two object, when selecting there face in edit mode, must be as in the pictures below.



    6. If you Export the Dmesh now, the face will appear flipped in Edith. You must flip all them before the exportation. For the two objects, go in edit mode, select all face and flip them as in the picture below. Don’t forget the bottom face.


    7. Then Export to Dmesh. (See Export to Dmesh)
    Create your Union and try it (Edith)
    There we are, time to create our Union file.
    1. In the Haydee 2 editor, add a Model actor anywhere and chose the new Dmesh. (Model is only for create other stuff and must never be use in map)


    2. Then press Export Union.


    3. Now, add an actor in your map and add a StaticUnion to this actor. Then, in paint mode, apply two different texture to your union. You can delete the actor and just keep the union after that but it will not do any difference.


    4. Very important fact, if you export a union for the seconde time and more, you must do a reload Geometry to see the change.
    3 comentarios
    Limitlessman  [autor] 23 MAY 2022 a las 5:43 a. m. 
    I don't know.
    Maybe edith find a bug in the file and hide it to prevent a crash.

    Try to create the simpler shape possible, a cube to see if the problem goes away.
    If yes, it's your mesh then try other texture, try to redo all step to see if you wrong doing one step.
    蛤蟆战士 22 MAY 2022 a las 1:24 p. m. 
    I exported a dmesh, but when I want to open it with edith, it flashes under the directory, and then i cant find it in edith .Why?
    MrPoporucha 21 MAR 2022 a las 8:57 a. m. 
    Thansk for the guide, man, we certainly need more stuff that explains the new features of the editor.

    By the way, there's even an easier way to separate the meshes with different materials before exporting union meshes:

    -Model the mesh and assign the materials as you would normaly.

    -In Edit mode, right click and pick Separate---> By Materials

    I tried that and it worked just fine.