Jump to content

[REL|WIP] Export Lights, Particles for SA


Recommended Posts

This is a maxscript that will export light info from 3dsmax to SA. You have to export the light info to a separate file, and import that file into your dff with Rw Analyze, but it can be done.

 

http://www.3dhole.com/gtafiles/dextool_release.rar

 

Features:

-basic light types, and parameters can be exported

-particle system information can be exported

-information is saved to each object in the max scene

-main actions are documented in maxscript listener

-multiple objects can be edited at once (apply attributes to all selected objects) for quick editing

-key data is stored in a separate .ini file, for easy editing, and extendability

-the maxscript is un-encrypted, so you can steal my work (please don't), or mock my ability to code!

 

Open the .rar file with WinRar, and follow the instructions in "readme_dextools.txt" for script installation instructions. Read the "readme-2dfx.txt" in the dexx_gta folder, for specific light and particle instructions. I'll edit this post with a link to a tutorial once i get it sorted out.

Edit:Forgot the Link to RW Analyze in the initial readme, here's a direct link for those who don't know where it is:

http://www.steve-m.com/?lang=EN&page=2&ID=21&act=details

 

This script was written and tested only on max 7. If people want to verify it on other versions of max, be my guest.

 

Still to do:

-Finish Sign 2d text

-Finish escalator code

-Determine last data types, and include support for them

-General tweaks here and there, some optimization

 

Oh yea, last comment; there are lots of grayed out features, because they are intentionally disabled. They will be active at one point, or else taken out, but they are supposed to be gray, thats not a bug or anything.

 

Edit:

if you do not see section type 0x253F2F8 listed in your copy of RWA, it needs to be added for this to work. You can add it via the following steps;

Find and open the folder where you installed RWA

Find and open the file RW_Secs.ini with Notepad (or the text editor of your choice). Make a backup copy of this file first.

Scroll to the section named "# Miscellaneous: ----------------------", the first entry should be the zmodeler lock

 

Add the following line, where it belongs numerically;

 

0253F2F8=2d Effect

 

"2d Effect" is just a label, you can call it whatever you want.

Save the file, changes will take effect next time you start rwa.

Link to comment
https://gtaforums.com/topic/261624-relwip-export-lights-particles-for-sa/
Share on other sites

  • 2 weeks later...

 

This script was written and tested only on max 7.

 

I used it in max 9 with no problems with lights, particles seem to make the model invisible but you did say in the read me most dont work properly.

 

This is definatly better then the otherway of creating 2dfx lights biggrin.gif

 

This script was written and tested only on max 7.

 

I used it in max 9 with no problems with lights, particles seem to make the model invisible but you did say in the read me most dont work properly.

 

This is definatly better then the otherway of creating 2dfx lights biggrin.gif

the only issues i had with particles, is them either showing up or not, but the model always worked. could you upload the .sae file that makes your model invisible? Does the model work before you add particle data to it? have you gotten lights to work ingame without problems?

 

@ everyone else - either you guys arent using the script (!), or i wrote excellent code + instructions my first time around.

 

Please, leave complaints, comments, or if it works, a screenshot of the lights in action. ANY feedback is better than none.

I've just downloaded your tool.

 

Up until now, I've been doing all the 2DFX stuff by hand (01 00 00 c1 3f).

I can't wait to try it out. Thanks.

 

Edit: Adding a single light works fine.

Particles may not be right yet. I'll take a look at the generated code.

 

Edit 2: Your 'script generated water fountain' particle code is 14 bytes longer than mine. Remove the last 14 bytes and it works.

Edited by locO G

I tried adding a simply light to a model but it doesn't work... light type: lampost_coast, for the ingame test I put a lampost coast near to my model, to see if at the same hour they switch on, but my model doesn't worked, need to have any custom flag or something?

 

Also, the SubTrees must looks like this:

 

Omni

building

 

or

 

building

omni

 

?

 

Nice script and tutorial.

 

Edit: all fixed, it work great ingame:

 

Image

Edited by Jost_Vice

Yea, sorry. i made a note of the effects, but never got around to explaining them publicly blush.gif

 

Distance: how far away you can be while still seeing the effect. larger distances means you can see the light from further away.

Size: Size of the image (coronastar) you see on screen

Inner range: Size of the image (shad_exp) projected on the ground

Outer range: Size of the actual lighting effect. This is the most important value, if you want it to actually illuminate dynamic objects like vehicles and peds. I recommend setting it slightly higher than what you think will look good, if you want more noticeable lighting effects.

 

Corona Image: Image that is displayed when you look at the light source. Typically "coronastar"

Shad Image: Image that is projected onto the ground, from the light. Typically "shad_exp"

Those are the default images, but you can use anything that appears in the dropdown lists. Changing the Shad image image, can produce different effects on the ground, and by swapping the image you could produce really crappy gobo-lights (crappy, because you have no control over which direction the image is projected - its always straight down) tounge.gif

 

For you car ricers and "tuners", you can even add "neons" to the bottom of your car. I'll explain that one if someone asks, but really, its pretty self explanatory.

 

Light Type: This is a bit dodgy, but it works. I basically took the parameters of lights that already exist, and put their values into the ini file for the script. The names correspond to what lights i took the parameters from. So for example, "lampost_coast", is creating a new lamppost light, with all the variables (position, color, size, etc) set to whatever you want.

 

I get christmas break in a week, I'll update the script then to hopefully finish off issue with the particle effects, and a few other things.

Hi, one can create video tutorial this lights system, i need this very sigh.gif

i read readme_2dfx.txd file, but no unintelligible all steps, please create anyone, step by step video tutorial this lights system. xmas.gif I want this lights christmas tree on set.

 

sorry me english is bad confused.gif

I've got some troubles, too.

I am using Max 7 and created an omni and linked it to my object.

For the 2dfx settings I used the normal stuff. So I used these setting like leviatan: http://img206.imageshack.us/my.php?image=v...icacabrnhv6.jpg

 

After adding the 2dfx scetion in the rw-analyze, importing the ligt.sae and importing the new dff in the .img I started the MapEditor and put 2dfx-lighting on. My new 2dfx light is working finde there. It is the right position (x,y,z) and has the perfect attitudes for me. But if im in the game there is nothing to see in the night.

 

So what did i wrong? confused.gif

not quite a proper update, but the particles should be fixed now. every test i did with them was successful smile.gif

download link is the same.

 

@ JKM - i'm not sure what to tell you. i never tried previewing 2dfx in the mapper. try again, make sure you follow all steps 100%. if the problem persists, upload the dff.

@ JKM - i'm not sure what to tell you. i never tried previewing 2dfx in the mapper. try again, make sure you follow all steps 100%. if the problem persists, upload the dff.

Well I tried it for the second time but my problem isn't solved.

 

Here my .dff:

http://www.jkm.gtaberlin.de/Lampe_SB_1.dff

 

greetz JKM

nothing immediately jumps out as wrong.

 

So I used these setting like leviatan

like those settings, or exactly the same, as those settings? the settings in that screen shot do work (producing a very large light). if you changed something, or everything, let me know your exact export settings so i can recreate the light. also be sure your using the latest version of the script.

  • 4 weeks later...

Hello...

...First of all, Thanx for that nice working script/solution.

But I was looking for a light that always shines...night and day.

Which should I use? dontgetit.gif

 

Greetz!

 

//Edit:

hmm...I thought that I've tried them all now (from the List) and I've also tried to add a new one from the "mansion-light05b.dff"*, but it's the same thing...shines only at night.

The only Light that works was the "bb_pickup", but it's ...ehm... blinky. confused.gif

 

*(type17_param1=671088640

type17_param2=64

type17_param3=17)

Edited by oCain

 

But I was looking for a light that always shines...night and day.

Which should I use?

none, i don't support that yet. i can only replicate light types i find in the game already. however there are far too many lights to check each one individually, by hand. if you, or anyone, can point out a light in the game, any light, thats not in an interior (most interior lights are done differently), that is on all day, tell me where it is, and i'll add support for it.

Got one! smile.gif

In the "bulkheadlight.dff", but it's not really intensity...just a kind of soft glow (at Day).

param1=671088640

param2=96

param3=262177

After that I've used the "mlampost" parameters and change the 2nd one to "96"...it works, too.

user posted image

(Ignore the red box blush.gif)

 

Greetz!

ahh, excellent. thanks for the help smile.gif

 

Users can now download this updated ini that has the new light type in it. just put it over your /scripts/saparticle.ini file, and reload the script. best to do it before you start max though.

 

The .ini in the rar file has been updated as well.

  • 1 month later...

Thak you for all, DexX, you have a place in the Codders Heaven biggrin.gif

I am using max 9 and i had the same problem that somebody told. The particle script doesnt work and it makes your model transparent. I will try with max 7. Is this problem common?

 

One more thing. When i see the large particle and light list, i have a headache, because i have no idea about what kind of effect is each one.

Is it possible to build a list with images showing what is each effect? dozingoff.gif

I know its a hard work...

rolleyes.gif Thank you

 

EDIT:

 

I have tried with max 6 and 7, but no results confused.gif What i am doing wrong?

Edited by leviatan

my guess about the invisible model stuff is either the light type you chose is invalid (possible, but unlikely, since i remember checking nearly every type manually) or there is confusion from my written instructions, on adding the data to the dff file. other people have done it successfully though, so i'm not sure on that either.

 

max 9 shouldn't be a problem. what are the exact light settings you used ?

  • 3 weeks later...
  • 4 weeks later...

It seems that the 2dfx section isnt a pure 3dfx Section. It`s better to say its a Special effect section, cause I found a section which seems to have the effect that PEDs are buying Tickets there. But the object got no dummy or such thing. However I exportet it...

 

http://files.aschratt.com/peds_buying_tickets.sae

 

would be nice if anyone could test it sigh.gif //DONE XD

Well it works. I think there are more such things, and it would be nice if you can add them to your Tools wink.gif

Edited by Aschratt

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.