Official Map Modding Tutorial (Part 4) : Making a custom .ybn!
Skylumz back again with another map modding tutorial. In this tutorial I will be teaching you how to make custom static collision aka .ybn! This is different then embedded collision like I showed in part 2. Static collision loads a lot different and is overall better to use. Its pretty simple so lets get started!
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
- Part two: https://forums.gta5-mods.com/topic/17815/official-map-modding-tutorial-part-2-making-a-custom-ydr
- Part three: https://forums.gta5-mods.com/topic/18057/official-map-modding-tutorial-part-3-making-a-custom-ymap
Programs we will be using for this tutorial:
- 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 .ybn
So for this tutorial I will be using a building I converted that doesn't have embedded collision and making custom .ybn for it. Now making custom .ybn is just as simple as making embedded collision you just have to set it as the parent instead of the actual model. This will make since later on. Alright first to start import the model you are working with into GIMS EVO. Now you want to make the collision material to do this just click the material editor (this part is the same as step five in making embedded collision for a .ydr):
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. Dont forget to drag and drop this material onto your collision model.
Now you want to make a model composite this is fairly simple all you have to do is go into GIMS EVO and click Create Object > Collisions > Composite, then click the scene view and you will want to name this composite to the name of the .ybn you want it to be. Like so:
Now select the collision model and go into GIMS EVO and click Create Object > Collisions > Mesh : Modifier, this will apply a mesh modifier to your model you will want to set up all the flags to the model like this:
REMEMBER TO SELECT THE COLLISION MODEL WHEN DOING THE STEP ABOVE!
Next step is to go into the schematic view and parent all the stuff using the link button you will always want it to be set up like this:
This is the most important step your gonna want to go to your .ymap that contains this mesh's location and select the collision model and then move it to the location that the ymap says, like so:
This is the ymap your gonna want to copy the position and rotation into 3ds max for the MODEL not the COMPOSITE! Like this:
REMEMBER DONT MOVE THE COLLISION COMPOSITE JUST THE MODEL/MODELS FOR THE STEP ABOVE
ALSO YOU NEED TO MAKE ROTATION CALCULATIONS FROM QUATERIONS USING THIS WEBSITE = http://quaternions.online/
Export from GIMS EVO then Import into OpenIV next to the model and your all done !
I hope you enjoyed the tutorial and it made since. Remember Ybn's dont need any external file to be loaded only thing needed is the correct location and rotation when making it. Also needs to be in a .rpf that the game will read.
Extra Notes: If you want a single .ybn to contain multiple models you just enter each models position and rotation then child that to the parent child composite just like in step four. I also would use metric units because that is what GTA V uses. I hope this helped and have a good day !
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!!
@skylumz WOW WOW WOW, great stuff!
@Dekurwinator Odd the .ybn seemed to work still... how are you converting it ?
@Dekurwinator I wonder why it still worked I will update the thread to let people know to use that... so odd. Also do you have any idea why gta V uses quaternions instead of vector 3's?
@Dekurwinator Updated it thank you
I still don't quite understand what are the main benefits of the static/not embeded collision?
Could someone explain, please? @skylumz
@MoravianLion the embedded collision is recommended for props or small objects and the static collision is recommended for terrain, and everything related to the map.