[WIP] GTAV: Lights

GTA:V Modding with ZModeler3 discussion.
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

[WIP] GTAV: Lights

Post by Oleg »

GTAV: Lights (work in progress)

A support for exporting lights into GTA models have been added. To the moment the only model files confirmed to support exported lights are .yft files. Original game models have lights in .ydr too, but these have not yet been confirmed to get exported properly.
gta_lights_01.jpg
You can import any model with lights and copy pre-configured light into your scene. Lights come up with some parameters in used-defined options window and are equipped with default parameters if these are missing (light created in ZModeler with no extra parameters).

As this is a "work in progress" update, I would like to get reports on what effect different parameters produce to your observation. I've tested some of them to the moment, so can't give a full list with explanation. Here's a screenshot of parameters box in current release. These are a subject to test and probably refine for better usability.
gta_lights_02.jpg
Power = the strength of light (two values control the strength on light, it's up to you to test light behavior with different values). Probably range-specific or an attenuation-specific at low/far range.
Flags = a set of bit-flags to switch on/off various features. ranging from 1 to 32 inclusive. To the moment known are:
#8 = blurred shadow (in combination with #9 only)
#9 = enable shadow;
TOD = time of day activation. E.g. 0, 2-5, 18-23 (0 = from 00:00 to 01:00; 2-5 = from 02:00 to 06:00, and from 18:00 to 24:00)
ShadowBlur = blur of shadows (any value from 0 = no blur, up to 255 = fully blurred shadows)
Subtype = unknown, probably insignificant; may be corona-specific;
Color3 = unknown, seems to have no effect;
Params1 = unknown set of parameters;
Corona = corona settings; seems to be [power, size, unknwon, hdr multiplier]; suggest your meaning for these values if you find something;
Shadow = offset to shadow-rendering point. allows to move light into some object and shift shadow rendering point out of this object to prevent artifacts. For example, streelight bulbs light-source is behind bulb glass cover, and this shift value allows to render shadow without bulb glass cover being dropping shadow (just like there is no such on the way of light emitted from bulb).


Feel free to mess with original game files import/export and report your observations (whether some features stop working or something get missing or messed). For example, i haven't tested flashing lights in any way.

Note, the filter update is marked "Beta", so you need to enable "Install beta updates" in Settings->General->Network to get this version downloaded. I'll keep it in beta stage for a while as there are some important things unresolved yet.
_Vlad_
Beginner
Posts: 170
Joined: Thu Aug 06, 2015 11:30 pm

Re: [WIP] GTAV: Lights

Post by _Vlad_ »

Awesome! I will try now!
_Vlad_
Beginner
Posts: 170
Joined: Thu Aug 06, 2015 11:30 pm

Re: [WIP] GTAV: Lights

Post by _Vlad_ »

should be used user denefined option on the material or mesh? because i imported buffalo2, as on you screen, (beta updates enabled,and downloaded and installed, zm restarted) and i cannot find these parameters at lightmessive material
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

these are not materials, these are light object. Create\Light. then Properties.

Light is linked to hierarchy under associated part, configured and exported. You can take preconfigured lights from street-light illumination objects x64h.rpf\levels\gta5\props\roadside\v_traffic_lights.rpf

the image with buffalo is an example of attaching light to the vehicle. It does not work as headlights (e.g. turning on/off or breaking headlights will not give light on/off). Also, these attached lights turns on always, even when engine is off. I suspect some specific settings could be related to turning lights on/off - probably by exploring a police helicopter with light onboard (is there such a model?)

I've explored just few light sources, so my view of light info is very inaccurate to the moment.

Also, I've noticed some upgrade parts (hei_mph_carstair_lamps4.ydr) with build-in lights, so it could be possible to make similar upgrades. Unfortunately, I can't test these upgrades in game as of low game progress - these features are not available or not reachable on map.

Tried to attach some light to the weapon model with no result. the only result I've got is a weapon model completely missing. need some original .ydr files (preferable, weapon) to explore for some inspiration. it could be nice to create glowing alien weapons mod or something like that.
TomcattersVF31
Beginner
Posts: 106
Joined: Fri May 18, 2012 10:13 pm

Re: [WIP] GTAV: Lights

Post by TomcattersVF31 »

Oleg wrote:these are not materials, these are light object. Create\Light. then Properties.

Light is linked to hierarchy under associated part, configured and exported. You can take preconfigured lights from street-light illumination objects x64h.rpf\levels\gta5\props\roadside\v_traffic_lights.rpf

the image with buffalo is an example of attaching light to the vehicle. It does not work as headlights (e.g. turning on/off or breaking headlights will not give light on/off). Also, these attached lights turns on always, even when engine is off. I suspect some specific settings could be related to turning lights on/off - probably by exploring a police helicopter with light onboard (is there such a model?)

I've explored just few light sources, so my view of light info is very inaccurate to the moment.

Also, I've noticed some upgrade parts (hei_mph_carstair_lamps4.ydr) with build-in lights, so it could be possible to make similar upgrades. Unfortunately, I can't test these upgrades in game as of low game progress - these features are not available or not reachable on map.

Tried to attach some light to the weapon model with no result. the only result I've got is a weapon model completely missing. need some original .ydr files (preferable, weapon) to explore for some inspiration. it could be nice to create glowing alien weapons mod or something like that.

I know that the Annihilator and Buzzard have a red light in the rear cabin which is not linked to any dummy... Not sure if that is something you're looking for. Anyway, I'll try this out ASAP, this could come in really handy.


Edit
Not sure what I am doing wrong here, but I only get these settings upon import:
lights.jpg
_cp_
Beginner
Posts: 210
Joined: Tue Aug 11, 2015 11:19 am

Re: [WIP] GTAV: Lights

Post by _cp_ »

@Oleg
It's my 100% save game, put it to Documents\Rockstar Games\GTA V\Profiles\*profilenumber*
https://dl.dropboxusercontent.com/u/868 ... /SGTA50001
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

TomcattersVF31 wrote:I know that the Annihilator and Buzzard have a red light in the rear cabin which is not linked to any dummy...
unfortunately, these are not light objects. may be some light is mounted there via vehicle meta script.
_Vlad_
Beginner
Posts: 170
Joined: Thu Aug 06, 2015 11:30 pm

Re: [WIP] GTAV: Lights

Post by _Vlad_ »

im found ydr with light in it , it's located in x64l.rpf\levels\gta5\_cityw\airport_01\ap1_02.rpf\ap1_02_text1.ydr
Image
it's an airport sign
Image
Image
_Vlad_
Beginner
Posts: 170
Joined: Thu Aug 06, 2015 11:30 pm

Re: [WIP] GTAV: Lights

Post by _Vlad_ »

Ater editing in zm ( i removed santos), light worked in game.
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

I'm trying to attach a light to a weapon YDR model, but none of attempts succeed.
_cp_
Beginner
Posts: 210
Joined: Tue Aug 11, 2015 11:19 am

Re: [WIP] GTAV: Lights

Post by _cp_ »

[s]Did you check a flashlight attachment?[/s]
Flashlight do not have any lights parameters.
Last edited by _cp_ on Wed Jul 13, 2016 1:35 am, edited 1 time in total.
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

nope, where is it? I've tried "molotov" and "flare" weapons, but these are not equipped with light sources.
_cp_
Beginner
Posts: 210
Joined: Tue Aug 11, 2015 11:19 am

Re: [WIP] GTAV: Lights

Post by _cp_ »

Looks like a search light is added externally, maybe in definiton file.
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

too bad. I've expected blaster and plasma weapons mod already. )
TomcattersVF31
Beginner
Posts: 106
Joined: Fri May 18, 2012 10:13 pm

Re: [WIP] GTAV: Lights

Post by TomcattersVF31 »

Okay, so I have managed to succesfully implement lights on an aircraft mod... But for gods sake, it does not work on a boat. I have been copying the lights of my plane mod, imported default lights... None worked on the boat. Can anybody else perhaps test this? Standard boat with a single light or something?
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

feels like the model should toggle "lights compatible" option somewhere in a script, as original models that had lights work fine with modded lights and those that had no lights in it does not seem to enable lights from an exported model.
TomcattersVF31
Beginner
Posts: 106
Joined: Fri May 18, 2012 10:13 pm

Re: [WIP] GTAV: Lights

Post by TomcattersVF31 »

It's me once again. I can't seem to figure out how to reduce the size of the spotlights... Perhaps someoe has a solution or idea

I have tried:

a)Properties: Scale XYZ

b) Lights Configuration: Range (Perhaps that's the value, but it would always reset to it's previous value after clicking OK and apply)

c)Power and Corona settings in User defined options


The problem is that the lights should stay inside of the interior and not shine through the fuselage as shown below on the wings. (They do not shine through the windows but through the fuselage really)

Image
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

switch light to manipulators level ('5' hotkey) and change range/target manipulator position relative to light source center point.
lunchxbles
Posts: 13
Joined: Mon Aug 17, 2015 2:26 pm

Re: [WIP] GTAV: Lights

Post by lunchxbles »

Was able to export lights onto ydr files using Zmodeler. Added the streetlamp light from gta v to my vice city streetlamp model Image
dkmods
Posts: 13
Joined: Fri May 13, 2016 2:09 pm

Re: [WIP] GTAV: Lights

Post by dkmods »

Is it possible to apply vehicle light IDs [4,11,etc] to these lights in vertices level so it can be toggled on or off like vehicle lights ??
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

unfortunately, seems like it's not possible.
User avatar
tall70
Amateur
Posts: 675
Joined: Tue Aug 11, 2015 3:13 pm

Re: [WIP] GTAV: Lights

Post by tall70 »

Molotov has light source, I remember I was adjusting light sphere size and strength for it somewhere in projectile settings and it worked, it made larger area lit by it while flying close to ground.

I never noticed this was added can't wait to try this for boats and buses, even for interior lighting possibly as I have used street lights on gta4 boat.
User avatar
tall70
Amateur
Posts: 675
Joined: Tue Aug 11, 2015 3:13 pm

Re: [WIP] GTAV: Lights

Post by tall70 »

Please, do you have any idea how to adjust sphere size for Omni light type? Power first number is strength, second number is attenuation and I was hoping to reduce distance with it for interior light inside of the bus, because Shadows flag 9 or both 9 and 8 are flickering on and off from certain angles of view. Sometimes Shadows disappear for quite a while and then they come back again, with shadows off light goes through everything all the way on the road. I know it's in development stage, I was just hoping for any update.

I also tested All Flags 0 - 32 hoping some of them are going to be affecting vehicles. Few Flags turned light off, not affected by any vehicle light while driving.

flag 13 is volumetric fog,

But unfortunately I couldn't find any relation to vehicle functions using any flag. I'm planning to test subtype subtype and parameters numbers in future
User avatar
Oleg
Site Admin
Posts: 14044
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: [WIP] GTAV: Lights

Post by Oleg »

sphere size of omni light is affected by its "Range" value. you can either set it manually in properties or drag the range manipulator point of the object after switching it to manipulators level.
User avatar
tall70
Amateur
Posts: 675
Joined: Tue Aug 11, 2015 3:13 pm

Re: [WIP] GTAV: Lights

Post by tall70 »

Do you mean Properties/Configuration/Range? Because that i tried the first thing and it changed sphere size in ZM, if that's what circle around dummy when selected represents, but not in game... I'll try manipulators

Also what are tho correct names for each lights in ZM hierarchy? I didn't see it in directions above and i just assumed light 0, light 1, etc, same as for gta4. It works this way, but now i see in some YDR files that devs named them Light #1, Light #2. Since i have Shadow issues i wanna be sure about all recommended details. Thank you

Another thing i forgot to mention TOD works nicely, except i had to set 0-5, 21-24 to make it come ON at 9pm and OFF at "6am", for some reason it's hour offset in morning.

EDIT: no luck
i tried manipulators as well with same result...all 3 lights are about 0.5 range

here it's in ZM

Image

and here is with and without attenuation

Image

I didn't use shadows so it's easy to see how far light goes
Post Reply