Sign in to follow this  
Tut

Model-integrated Lights and Particles

Recommended Posts

Introduction

Particles and lights are found many places in the game. Cars has corona lights for their tail, brake and headlights, exhaust fumes and tire smoke. These are effects and can help boost the atmosphere. 
Adding these effects can be done with ease, however, those who wish to use specific tools may have to incorporate more tools to transfer the data between files. 
This guide aims to introduce GTA modders to 2d billboard effects (lights, splashes) and particles through use of 3ds Max and relevant tools.

To get started, user must obtain a selection of programs and 3D scripts available from this topic:
Kam's 2018 scripts, The Hero's RW importer/exporter (optional if using for object export; harder), Dexx's 2dfx export script, RWanalyze and tools for setting up texture files.


TOC

  • Working with lights using Kam's 2018 script
  • Working with lights and particles using RW script (and Kam's 2018 for data exporting)
  • Common uses of 2dfx

Working with lights using Kam's 2018 script

The upgraded Kam's script has an in-built 2dfx tool for quickly adding lights to models. Below is presented a step-step guide on adding a blinking light to a cone ID 1238.

  1. Import trafficcone.dff from gta3.img using the Kam's 2018 script importer.
  2. Navigate to Create Panel > Lights > Standard > Omni Light. Spawn one at the top of the cone. Link the Omni to the model, so it is a child of the model.
  3. As seen on the image below, expand '2DFX' on the script GUI.
  4. With the Omni selected, click 'Get'. Now the light parameters can be set to the user's likings. Below is a detailed explanation of config.
  5. Once done, select model and  the child light and click Export to DFF. 
  6. Time to test!

mta-screen_2019-08-03_17-31-12.png

The following config and export settings are ideal but may be adjusted to individual user's preferences:

Skrmbillede_5495.png

Each setting explained
Presets: presets for easy setup of lights
Set to selected lights: needs be clicked each time changes has been made to a light.
Get: copies the selected light's information, allowing one to paste that onto other lights.
Color: the color of the light.
Corona size: the size of the physical corona light.
Draw distance: distance in which the light can be seen from (in SA units).
Light range: distance in which the light illuminates peds and vehicles.
Corona name: light texture e.g traffic light, blood splatter, corona star.
Show mode: enable for flashing and other effects.
Reflection: gives the effect of the sun shining into a lens when looking at the light source.
Shadow size: the size of the round transparent shadow.
Shadow distance: the distance in which the shadow can be seen (e.g if object is 100 meters above surface, the shadow can be seen if set to 105 units)
Shadow multiplier: intensity of the shadow.
Shadow name: defines which texture is used for the shadow.
Flags: defines light properties.
 


Working with lights and particles using RW script (and Kam's 2018 for data exporting)

Lights method

The steps presented in Kams method needs be followed with export included. On 3ds Max with the RW version of the model (with Omni Light) ready, export the model with its child Omni Light using RW script. The RW version does not need any specific light data, it just needs a regular Omni Light as placeholder. The reason for having Kam's DFF version available is that it contains data that can be extracted from the Kam's file and imported into the RW file.

With Kam's DFF and RW DFF in a folder, open RWanalyze. Open the Kam's DFF and spot the section named "2dfx [xxx bytes @ xxxxx] - [0x253F2F8]".

Skrmbillede_5496.png

To proceed, right click the highlighted section > Export Section Data (ctrl + e) > select project folder and name as 'cone'. 

Now, open the RW version and find the same section located approximately in same order in the hierarchy containing a Bin Mesh PLG.

Skrmbillede_5497.png

To proceed, right click the highlighted section > Add section > [0x253F2F8] 2dfx > Right click the new section > Import section data > Find and select 'cone' > save file.

 

Particles method

For adding particles to the model, Dexx's 2dfx tool is introduced to the user. This method is not tool specific and works with both KAM and RW exporters. In this case RW exporter is used.

With the RW model in 3ds Max, go to Create Tab > Helpers > Dummy > create one at the top of the cone. Link it to the model so that it's the child of the model.
Start Dexx tool. Click 'Add Particle Info (Dummy)'. Expand 'Setup / Edit Particles'. In 'Particle System' select 'Fire'. Click 'Apply to Dummy(s)'. Expand 'Export Effect Info'. Click 'Export Info' with only the dummy selected, not the model. Export to project folder and name file as 'fire'. Export the model with the dummy included.

Now with RWanalyze, open the DFF that was exported and find the following section.

Skrmbillede_5498.png

To proceed, right click the highlighted section, click 'Add section' and find [0x253F2F8] 2dfx. Right click the newly generated section and click 'Import section data'. Find the file 'fire' and on RWanalyze click save. The model now contains a fire from the top of the cone.

mta-screen_2019-08-03_18-43-04.png

 


 

Common uses of 2dfx

In GTA SA, lights and particles can be integrated into models regardless if they're world objects or vehicles. Thus it opens up a whole level and opportunities for modelers to improve visuals of their models. A few uses are compiled below.

  • Street lamps
  • Fireplaces
  • Cars
  • Sirens
  • Fire simulations
  • Structure lighting
  • Aircraft blinking lights
  • Traffic lights
  • Fountains
  • Cement mixers
  • Farming utilities

The possibilities are endless, although the rendering limits of corona images is 32. This explains why the Pyramid in Las Venturas has 8 lights on each 4 corners.

  • Like 5
  • Thanks 2

Share this post


Link to post
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.