Quantcast

Jump to content

» «
Photo

[REL|WIP] Export Lights, Particles for SA

76 replies to this topic
DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#1

Posted 24 November 2006 - 07:28 PM

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.co...ool_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.c...=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;
CODE
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.

-/TNT\-
  • -/TNT\-

    not like any other rainbow.

  • Members
  • Joined: 06 Aug 2006

#2

Posted 24 November 2006 - 08:02 PM Edited by -/TNT\-, 24 November 2006 - 08:10 PM.

This sounds great, but I can't locate dexx_sa_tools.ms in the rar sad.gif

jarjar
  • jarjar

    Boss

  • BUSTED!
  • Joined: 07 Aug 2005

#3

Posted 24 November 2006 - 11:29 PM

Very nice, will be very useful to many modelers. Well done DexX icon14.gif

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#4

Posted 25 November 2006 - 12:15 AM

QUOTE (-/TNT\- @ Nov 24 2006, 15:02)
This sounds great, but I can't locate dexx_sa_tools.ms in the rar sad.gif

yea sorry. its there now. i updated the ini too, with a few more light types, and fixed some of the existing ones.

dertyjerzian
  • dertyjerzian

    I have a custom member title. I call it "Solid Snake"

  • BUSTED!
  • Joined: 08 Jun 2005

#5

Posted 25 November 2006 - 12:20 AM

you're my girlfriend now inlove.gif lol. Glad to see it out smile.gif

ParoXum
  • ParoXum

    Proud PC Gamer

  • Feroci Racing
  • Joined: 28 Jul 2005
  • None
  • Best Texture/Model 2013 "SRt3 2012 Mipmap Edition"

#6

Posted 25 November 2006 - 10:52 AM

Excellent ! I can now convert VC 2DFX from Ocean Beach wink.gif Nice work again, as for 2DFX Doc Topic wink.gif

-/TNT\-
  • -/TNT\-

    not like any other rainbow.

  • Members
  • Joined: 06 Aug 2006

#7

Posted 26 November 2006 - 06:17 PM

Big thanks DexX! The road is open now to 2dfx editing without using RW? Long live DexX or what?!?! This will save me a great deal of time on the map I am making... inlove.gif

xrk
  • xrk

    ..

  • Members
  • Joined: 04 Feb 2004

#8

Posted 05 December 2006 - 01:07 PM

QUOTE
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

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#9

Posted 05 December 2006 - 05:17 PM

QUOTE (xrk @ Dec 5 2006, 08:07)
QUOTE
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.

xrk
  • xrk

    ..

  • Members
  • Joined: 04 Feb 2004

#10

Posted 05 December 2006 - 07:11 PM

Yeah, Lights work perfectly so far

Here is the particle.sae

pic with particle added
user posted image

same model with light added in place of particle
user posted image


another pic of lights made using your script
user posted image

locO G
  • locO G

    LocO by name... But keeping an even keel.

  • Members
  • Joined: 28 Oct 2005

#11

Posted 06 December 2006 - 09:34 PM Edited by locO G, 06 December 2006 - 10:51 PM.

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.

JostVice
  • JostVice

    realtime, not prerendered

  • Feroci Racing
  • Joined: 30 Oct 2005
  • None

#12

Posted 07 December 2006 - 05:55 PM Edited by Jost_Vice, 07 December 2006 - 08:36 PM.

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

leviatan
  • leviatan

    Build your own world

  • Members
  • Joined: 26 Sep 2006

#13

Posted 09 December 2006 - 08:04 PM Edited by leviatan, 09 December 2006 - 08:36 PM.

Wow, man, its an incredible work. You are a new idol for me. Thank you so so much.

user posted image user posted image user posted image user posted image

Could you explain the propieties of each kind of light?

user posted image

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#14

Posted 09 December 2006 - 10:34 PM

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.

Mark
  • Mark

  • Zaibatsu
  • Joined: 15 Aug 2002
  • United-Kingdom

#15

Posted 09 December 2006 - 11:51 PM

Awesome! Given me ideas for making a landing glide slope guide for small airstrips, works like a visual ILS smile.gif Tis great!

What would be even more awesome in the future is a stand alone program that allows the same option to any .dff you feel like.

Hosta
  • Hosta

    Player Hater

  • Members
  • Joined: 12 Dec 2005

#16

Posted 16 December 2006 - 01:06 PM

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

JKM
  • JKM

    [BM] Projectleader

  • Members
  • Joined: 16 Jul 2005

#17

Posted 16 December 2006 - 05:34 PM

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.images...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

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#18

Posted 17 December 2006 - 10:22 AM

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.

JostVice
  • JostVice

    realtime, not prerendered

  • Feroci Racing
  • Joined: 30 Oct 2005
  • None

#19

Posted 17 December 2006 - 11:36 AM

user posted image

IT works, with a very tiny draw distance but well smile.gif

JKM
  • JKM

    [BM] Projectleader

  • Members
  • Joined: 16 Jul 2005

#20

Posted 23 December 2006 - 05:46 PM

QUOTE (DexX @ Dec 17 2006, 10:22)
@ 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.gtabe.../Lampe_SB_1.dff

greetz JKM

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#21

Posted 24 December 2006 - 01:50 AM

nothing immediately jumps out as wrong.
QUOTE
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.

oCain
  • oCain

    Crackhead

  • Members
  • Joined: 02 Oct 2005

#22

Posted 16 January 2007 - 10:25 PM Edited by oCain, 16 January 2007 - 11:38 PM.

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)

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#23

Posted 17 January 2007 - 01:33 PM

QUOTE
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.

oCain
  • oCain

    Crackhead

  • Members
  • Joined: 02 Oct 2005

#24

Posted 18 January 2007 - 12:24 AM

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!

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#25

Posted 18 January 2007 - 07:48 AM

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.

leviatan
  • leviatan

    Build your own world

  • Members
  • Joined: 26 Sep 2006

#26

Posted 12 March 2007 - 09:48 AM Edited by leviatan, 12 March 2007 - 03:06 PM.

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?

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#27

Posted 19 March 2007 - 03:44 AM

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 ?

gybrus
  • gybrus

    G-style

  • Members
  • Joined: 10 May 2006

#28

Posted 07 April 2007 - 08:21 PM

Boing..
Nice work dude. inlove.gif
I hate to say this but your link is dead =O
Does sombody can upload it again or something.
Thank you

Grats

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#29

Posted 11 April 2007 - 11:51 AM

The link should work now.

Aschratt
  • Aschratt

    Three Headed Monkey

  • Members
  • Joined: 12 Apr 2006

#30

Posted 05 May 2007 - 02:46 PM Edited by Aschratt, 05 May 2007 - 04:17 PM.

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.aschrat...ing_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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users