Official Map Modding Tutorial (Part 2) : Making a custom ydr!
Whats up modders back at you with my second tutorial for gta V map modding. In this one we will be making a custom .ydr. The next tutorial will show you how to add it in gta V.
REMEMBER TO CHECK OUT MY PREVIOUS TUTORIALS BEFORE DOING THIS ONE
- Part one: https://forums.gta5-mods.com/topic/17754/official-map-modding-tutorial-part-1-setting-up-a-dlc-pack
Programs we will be using for this tutorial:
- Blender (or your preferred modeling program) https://www.blender.org/download/
- Gims EVO https://www.gta5-mods.com/tools/gims-evo-with-gta-v-support
- 3DS Max https://www.autodesk.com/education/free-software/3ds-max
- Open IV https://www.gta5-mods.com/tools/openiv
Making a custom .ydr
For this tutorial we will be converting a cube model into .ydr because I want to start out with something simple. For more complex objects its more or less of the same. I will be showing you how to make it from blender, you can use your preferred modeling software. Anyways lets get started.
Step One: I will be making a cube in blender, I wont be explaining how to make the cube, but I will be going over a couple things when converting from blender. First thing is whatever you want to be textured make sure it has a specific material assigned. For example, for this cube I have assigned a material named "Cube Texture" now I will be making this a solid color, but for more complex objects you will need to uv map, texture, etc. Like this:
I would also usually use a ped or vehicle to judge the scale but for this simple object I am just gonna make the size 0.01. Now I will export as .fbx and have it where I can access it.
Step Two: Open up 3ds max you must have installed and setup gims evo for this step. The first thing to do is import the .fbx you made earlier. Now once viewing the .fbx make sure the scale factor is set to 1.0 for example:
Step Three: Once inside gims evo you will want to click the object hierarchy on the right side and reset the transform and scale for example:
Step Four: Now what you wanna do is right click the object and clone it make sure to clone it as a copy and not a instance. This cloned object will be for your embedded collision so I would name it the "Objects name" + _col for example:
Step Five: Now you want to make the collision material to do this just click the material editor:
Now once in the material editor you will want to click the shader type:
Like so, then select GIMS V Material for example:
Next, you wanna select the group and material type. For this example I want the cube to be like concrete:
Next, you wanna select the collision object and click apply material to selected object like so:
Making the collision material is done.
Step Six: To start, click "Create Object > Collisions > Composite" then click the scene view like this:
You will see the modifier pop and all you need to do is change the name to col for collision for example:
Next, you wanna select the collision object and add a mesh:modifier to the collision object "Create Object > Collisions > Composite > Mesh:modified", like this:
You will see a new modifier be added to the collision object and this is how you need to set it up:
Last thing to do is set the object collision under the collision composite. To do this you want to click the schematic view button:
Next, you want to grab the purple block that has the "objects name" + _col and click the link button then link it to the green col composite. Like this:
If you have done this exactly as shown you will have done embedded collision correctly. Remember a object with more than 32k polys can not have embedded collision unless split into multiple objects.
Step Seven: Making the model and game mesh modifier. To do this go to "Create Object > Models > Model " then click on the scene view. Next name that object to the name that you want the actual model to be. For this cube I will name it "CubeExample". For example:
Next, you need to click on the object mesh and go to " Create Object > Models > Game mesh : Modifier" and then leave it as is, for example:
Now that's over you are almost done. You need to go back to the schematic view and make the object mesh and the col composite a child of the model in this case "CubeExample". Like so:
Step Eight: Setting embedded texture. For this all I am gonna do is take a small .dds image that is the color I want the cube to be green in my case and you select the object mesh then click material editor. Like this:
Now all you have to do is click the material and click options a dialog will pop up asking to convert to gtaV material click yes. For example:
Now a new dialog will pop up with all the material options for a simple embedded texture all we need to do as of now is click the embedded checkbox to true and select the diffuse texture and find the texture we want to apply to this material. Like this:
That is all you have to do for embedded textures.
Step Nine: Now everything is complete last steps are to export the .odr. When exporting the hierarchy, absolutely has to be setup like this:
Conclusion: If you followed all the steps then you have successfully created your first custom .ydr with embedded collision and textures. Last thing for you to do is go to the models.rpf that's in your dlc pack from the last tutorial and import the .odr into openIV. Now when you double click it you should end up with something like this:
You can also view the edges and vertices by enabling the options to true:
To view the embedded collision just click "bounds" at the top:
You can also view the embedded textures by clicking "view embedded textures" at the bottom right corner:
Extra Notes: More complex objects will require more work and there is a lot about shader's, vertex painting, etc that I didn't cover. Don't expect to make rockstar quality models by using this method. This was just to show you a very basic example. I have alot more to teach you which one day I might get into, but for now this should do...
IF YOU NEED HELP BEST WAY TO CONTACT ME IS THROUGH DISCORD YOU CAN JOIN MY MAP MODDING SERVER HERE : https://discord.gg/7xbYQaN Your always welcome dont be afraid to join!!
So I have swapped out models in gims and had the new ported model lose its collision. Is there anyway to just add the collision of the old model onto the ported model?
@NaijaMango im confused?