[help] Trying to import a simple obj and place it on a car.

GTA San Andreas and GTA Vice City discussion.

Moderator: Oleg

Zendo12
Posts: 2
Joined: Sun May 05, 2019 6:04 pm

[help] Trying to import a simple obj and place it on a car.

Post by Zendo12 »

How would I import a simple .OBJ then attach it to an existing GTAV car and then export it as a .ydr?

I want to be able to import my .obj into zmoddler and attach it to a GTAV car and then export that some how so it shows up during GTAV game play.

I have already imported my obj and attached it to my car but but when I look at the model in open IV my .obj is not their. What do I have have to do in order for the .obj to show up?

Google did not help me, but from what I have gathered I believe i have make the .obj a drawable but I don't know how to do this.


I know people import stuff in Zmoddler and then convert it to gta's format because I have seen videos of people doing that with forza car models. So what is the step I need to do to make my .obj to make it appear and work in GTAV?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [help] Trying to import a simple obj and place it on a c

Post by Oleg »

Hi.

In general, a new object will appear on a vehicle in game if this object
1. has proper material assigned (configured for gta5)
2. object is either attached to an existing part or given a standard name (like misc_a, misc_b, misc_c...) to be a separate part.

Second, the game in general uses a YFT file named "vehicleName.yft". In addition to it, it loads geometry parts from "vehicleName_hi.yft" file to replace original geometry on high render settings and close-up view. Thus, you should alter both vehicleName.yft file and vehicleName_hi.,yft file with your new part.

As the very quick guide to bring a part into the game attached to the vehicle, the following steps would probably be enough:
1. import your obj file. rename an object to "obj" (for simplicity of steps below)
2. import your obj file again and rename object to "obj_hi". This one is identical to "obj",
3. import original vehcile_hi.yft file with "Slice to parts" option toggled on inside "Import" window
4. import original vehicle.yft file with "Combine with existing model" option toggled on.
5. select obj and obj_hi. You can use Alt+click on [v] icon (visibility icon) in hierarchy view to perform selection. [v] icon toggles to square icon on selected objects
6. open Materials Browser window. Pick material with "paint" (or variations) in "Adapt" field. You can pick any material here, not a big deal.
7. drag&drop this material onto the left side of Materials Browser where it states "Scene Selection". You will assign a given material onto selected objects obj and obj_hi. This is solely for test purpose, as you give these objects a well-configured material. Close materials browser
8. pick Modify\Attach tool in main toolbox.
9. Press [L0] button on Structure panel (above Hierarchy view). You will see the high-detailed version of the vehicle
10. hover (highlight in blue color) your obj_hi (or obj, doesn't matter really) and click, then hover/highlight a chassis or vehicle body (doesn't really matter) and click again. An object should get attached and hovering an Obj in viewport should highlight it and chassis/bodyshell together
11. Toggle [L1] button (medium-detailed LOD) and attach second "Obj" to chassis/bodyshell again. Here you do identical steps to #9 and #10 for the identical version of your Obj and a medium-detailed geometry of the vehicle.

12. export to a different folder into a vehicleName.yft file and set LODs mode to Autodetect in Export window. Then export to a "vehicleName_hi.yft" again, so you have two files.

13. test these files in game by putting them into a mod/update rpf file into a proper location. Some vehicles have a suppressing versions in "update/patchday***" folders, so your changes might not get reflected in game as the game will load a model from a different location than you expect. I personally make a search on a model name before replacing it in game, so I can check whether, say, x64e.rpf/levels/gta5/vehicles/adder.yft is the latest version or it was updated in some update/x64/dlcpacks/patchday7ng/... or something like this.

P.S. before replacing a model and testing in game, you can reset scene in ZM and import your yft file(s) to see whether changes actually retained there. If they are, they should be retained in OpenIV and (when proper target file get modded/updated) in game.
Zendo12
Posts: 2
Joined: Sun May 05, 2019 6:04 pm

Re: [help] Trying to import a simple obj and place it on a c

Post by Zendo12 »

THANK YOU OLEG!!

Is there a wiki or anything you can send me to that has more information like this? Its hard to find info that is similar to what you just gave me.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [help] Trying to import a simple obj and place it on a c

Post by Oleg »

Unfortunately, no one has ever written any guides on this. May be there videos on very similar tasks on youtube, but I can't be sure whether they are correct or accurate.
Post Reply