LOD Distance issue when exporting vehicles with template

GTA:V Modding with ZModeler3 discussion.
Post Reply
User avatar
Nikwitz
Posts: 9
Joined: Mon Dec 27, 2021 10:21 am
Location: Denmark

LOD Distance issue when exporting vehicles with template

Post by Nikwitz »

Hi there.

I've been trying to figure out a problem with my LOD Distance on the vehicles when I make a template for a Standard Lore friendly GTA V vehicle for a while now, but I ran into some issues with it. When I go through my .yft files in OpenIV only the _hi one shows the template correctly and that makes the car look terrible in the game when playing.

Here is some example pictures:

rhinehart_hi.yft -- The one that is working perfectly.
Image

rhinehart.yft -- The one that is not working optimal.
Image

Is there any sort of explanation why the template I'm creating not matching on the rhinehart.yft when I use the export settings: All but highest on the rhinehart.yft and Highest only on rhinehart_hi.yft?

Best Regards,
Nikwitz
Seb5a
Posts: 33
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: LOD Distance issue when exporting vehicles with template

Post by Seb5a »

How it looks in zmodeler on different LODs than 0?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: LOD Distance issue when exporting vehicles with template

Post by Oleg »

Also, mind the highest LOD will take a high-resolution textures from vehicle+hi.ytd or something like that. This assumes the texture package file has the same texture names as vehicle.ytd, but their resolution is higher. Textures (layout) should be the same.

Further, the model.yft file is assumed to use the same materials and textures as model_hi.yft file and of cause you are supposed to create the same UV layout for the geometry object as model_hi.

As it was stated in previous comment, you can switch LOD geometries in ZModeler with L0, L1, L2 buttons - the correct scene setup should show you correct LODs on every level. This is the scene setup you export from with "Export LODs" being set to "Autodetect". When switching L0, L1, L2 in ZModeler, there should be correct UV mapping shown right in ZModeler.
User avatar
Nikwitz
Posts: 9
Joined: Mon Dec 27, 2021 10:21 am
Location: Denmark

Re: LOD Distance issue when exporting vehicles with template

Post by Nikwitz »

Seb5a wrote: Sun Jan 29, 2023 4:34 am How it looks in zmodeler on different LODs than 0?
It looks like the vehicle in OpenIV with incorrect UV Mapping..
User avatar
Nikwitz
Posts: 9
Joined: Mon Dec 27, 2021 10:21 am
Location: Denmark

Re: LOD Distance issue when exporting vehicles with template

Post by Nikwitz »

Oleg wrote: Sun Jan 29, 2023 4:40 am Also, mind the highest LOD will take a high-resolution textures from vehicle+hi.ytd or something like that. This assumes the texture package file has the same texture names as vehicle.ytd, but their resolution is higher. Textures (layout) should be the same.

Further, the model.yft file is assumed to use the same materials and textures as model_hi.yft file and of cause you are supposed to create the same UV layout for the geometry object as model_hi.

As it was stated in previous comment, you can switch LOD geometries in ZModeler with L0, L1, L2 buttons - the correct scene setup should show you correct LODs on every level. This is the scene setup you export from with "Export LODs" being set to "Autodetect". When switching L0, L1, L2 in ZModeler, there should be correct UV mapping shown right in ZModeler.
So it's not enough to unwrap the vehicle in L0 in zModeler3 and generate the UV Mapping from that?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: LOD Distance issue when exporting vehicles with template

Post by Oleg »

when you unwrap L0 and generate UV mapping for it, you edit L0 geometry only. L1 is a different geometry object that is edited the same way as L0. You assign materials, you create UV layout and so on. The game just switches geometry objects on distances. So, in short, L0 has nothing to share with L1, these are independent objects.
User avatar
Nikwitz
Posts: 9
Joined: Mon Dec 27, 2021 10:21 am
Location: Denmark

Re: LOD Distance issue when exporting vehicles with template

Post by Nikwitz »

Oleg wrote: Sun Jan 29, 2023 6:38 am when you unwrap L0 and generate UV mapping for it, you edit L0 geometry only. L1 is a different geometry object that is edited the same way as L0. You assign materials, you create UV layout and so on. The game just switches geometry objects on distances. So, in short, L0 has nothing to share with L1, these are independent objects.
How can I then create a template that both works for L0, L1 etc. ?

I've created templates for 28 vehicles so far and this one is the only one I did not fuck up the interior because of only using the .yft file when importing the vehicle.
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: LOD Distance issue when exporting vehicles with template

Post by Oleg »

both geometry objects (L1 and L0) should be UV-mapped onto the same texture, so they reuse the same texture areas for the same shape areas. For example, the hood of the L0 should be mapped onto the same area of texture as the hood for L1. Given that, the template texture will appear identical on L0 and L1 when the game switches LODs.

Hope we are talking about the same matter, as I'm not quite sure what exactly you mean when use phrase like "create a template". There is no "template" in game, there is a texture on material the game will use and geometry object with it's own UV-mapping. The texture will appear on an object with respect to UV mapping of this object. UV mapping of the object is it's vertices properties, it is not bound to any texture, so textures could be switched whilst mapping is retained. Thus, different skins can appear on the same geometry object.
User avatar
Nikwitz
Posts: 9
Joined: Mon Dec 27, 2021 10:21 am
Location: Denmark

Re: LOD Distance issue when exporting vehicles with template

Post by Nikwitz »

Hi again.

Sorry for the late answer, has been some rough months. So I need to create the UV Mapping for both L0 and L1? What about L2, L3 and L4? Is there any easy solution to do this, or is it the same way as usual with the L0?
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: LOD Distance issue when exporting vehicles with template

Post by Oleg »

yes, L1, L2 etc. all should be UV-mapped. You might have a lower-quality (lower resolution) textures for L1, L2 if needed. Mind, when you move away from the vehicle, game resource manager unloads from video memory the "hi" model file and if you rely on embedded textures, the L1 model might miss some textures (that were unloaded together with _hi model). Also, the game can use textures from vehicle's .ytd file and, if it has enough video resources, it can load vehicle+hi.ytd textures package and feed the rendered with higher-resolution textures from this package.

All the above is generally about resource management by the game. For this to work properly, your L0 and L1 models should be properly UV-mapped.
Post Reply