Log in to reply
 

Official Map Modding Tutorial (Part 4) : Making a custom .ybn!



  • Background Info:
    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

    Programs we will be using for this tutorial:

    Making a custom .ybn

    Step One:
    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):
    0_1518013595339_upload-190c1fbb-5f7c-4d61-bbef-185a75eb4127
    Now once in the material editor you will want to click the shader type:
    0_1518013688208_upload-6af8a4bf-2ddd-40af-836a-b22254100dfd
    Like so, then select GIMS V Material for example:
    0_1518013729032_upload-22282783-fd90-4c4c-b6a1-fe95743799f2
    Next, you wanna select the group and material type. For this example I want the cube to be like concrete:
    0_1518013922907_upload-69b3fd73-b800-4ca3-8d8c-b45a4226fc24
    Next, you wanna select the collision object and click apply material to selected object like so:
    0_1518014132377_upload-836dd215-5923-49db-80fb-03fa6d55c29e
    Making the collision material is done. Dont forget to drag and drop this material onto your collision model.

    Step Two:
    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:
    0_1521488830512_upload-df0b76f4-fc53-4dd4-b817-d5945fc11329

    Step Three:
    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:
    0_1521489854324_upload-14bf1c7b-5010-4617-857c-9064885c63a7
    0_1521491485768_upload-a2d8765d-6558-4889-8b99-d93de555f195
    REMEMBER TO SELECT THE COLLISION MODEL WHEN DOING THE STEP ABOVE!

    Step Four:
    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:
    0_1521489816414_upload-0e02f086-5da2-4818-bcc3-81fcc2c1b3db

    Step Five:
    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:

    0_1521491744261_upload-5ef8e539-e0cc-497e-a62d-fb2b41323856

    This is the ymap your gonna want to copy the position and rotation into 3ds max for the MODEL not the COMPOSITE! Like this:

    0_1521491950969_upload-96ccea0c-a430-455a-9753-a402b2f3094f
    position
    0_1521491983689_upload-143875fd-bb00-40d1-a14b-6a7b92d190de
    rotation

    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/

    Step Six:
    Export from GIMS EVO then Import into OpenIV next to the model and your all done :smile: !
    0_1521493941845_upload-731ee0fb-c97c-4e88-a4d7-fd414c64d688

    Conclusion:
    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 :smiley: !

    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!!


  • MODERATOR

    @skylumz WOW WOW WOW, great stuff!



  • @skylumz rotation in ymaps are quaternions so in this example rotation will be 116.913 not 0.852
    conversion from quaternion x=0 y=0 z=0.852 w=0.523 to euler x=0 y=0 z=116.913



  • @DarthPungz Thanks :right_facing_fist:
    @Dekurwinator Odd the .ybn seemed to work still... how are you converting it ?



  • @skylumz i have my own excell tables but on web are online converters like this http://quaternions.online/



  • @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 :pray:


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.