Quantcast

Jump to content

» «
Photo

3D studio max SA DFF import / export script topic

  • This topic is locked This topic is locked
581 replies to this topic
silver007
  • silver007

    Homie

  • Members
  • Joined: 15 May 2003

#511

Posted 31 July 2005 - 08:00 AM Edited by silver007, 31 July 2005 - 10:44 AM.

Hey Kam, well ive been trying to convert over my cars for awhile, ive tried using Zmodeler 2, though it keeps screwing up and you script seems better, so im going to try using it

however, theres a slight problem, although this isnt big or anything
it seems yor Script cant read .dff files exported from zmodeler2, it gives the error
user posted image

what i have to do in order to get my SA cars from zmodeler 2 into 3DS max is the following

Export it as an old .z3d file, however doing this removes all the dummies since Zm2 handels dummies differantly and has a "speical" object/setting for them, this zmodeler 1 cant read so it removes them, so i open up the file in zmodeler 1,
now i need dummies, so i open up your script in 3DS max, import a SA vehicle, and export it as VC format
then import the car into zmodeler 1, and delete everything except the dummys, so i have them, then i have to mirror my car because zmodeler is screwed up and needs the model backwards to what Zmodeler 1 has it, then i have to move the dummes and copy all the axis to make them right, then fix the heirarchy, then finaly i export it as VC format, then import it into 3DS max......

alot of extra steps just to get it from zmodeler 2 into 3DS max, it would make my life easier if your script could read SA .dffs exported with zmodeler 2, perhaps you can look into it?

Kam
  • Kam

    JINX

  • Members
  • Joined: 17 Dec 2004

#512

Posted 31 July 2005 - 12:09 PM

silver007, if you don't mind, send me two dff one export from my script and one from zmod2. I see if I can make them compatible!

Karcus
  • Karcus

    Square Civilian

  • Members
  • Joined: 05 Jul 2005

#513

Posted 31 July 2005 - 02:12 PM

Woot Ashdexx those are some helpful tips. Keep giving us those healty tips. Its really useful for people that really wanna learn max.
Just when I learned how to use the material ID properly too.

Karcus
  • Karcus

    Square Civilian

  • Members
  • Joined: 05 Jul 2005

#514

Posted 31 July 2005 - 03:02 PM

Ah dammit. Hey Kam I still get the Blue screen of death restart crash. I fixed my materials, my heirarchy, even made sure every stack was collapsed before exporting.

Oh and I want to get it clear, can I leave my mesh as an edit poly or must I convert it to an edit mesh before I export? I do convert my to edit mesh before export just to be safe but I see no resolve for my current problem. Actually the solution is to import the dff into zmod and export from there. Like I said in the pm the dff exported from zmod is about 40kb smaller than it is exported from your script. Maybe you wanna look at both my dff?

Im going to try other possibilties like linking and using fewer objects to see if it is heirarchy problem( though I doubt it). Oh I'll try reimporting exporting dff back into max see if its diff than zmods. Still my options are growing thin. Wish me luck.

91RS
  • 91RS

    Gimme All Your Lovin'

  • Members
  • Joined: 26 Jun 2005

#515

Posted 31 July 2005 - 06:58 PM

Now it takes twice as long to do the basic reflection, it's getting very annoying. Before nothing had a reflection unless I wanted it to, and now everything has a reflection unless I don't want it to!

Kam
  • Kam

    JINX

  • Members
  • Joined: 17 Dec 2004

#516

Posted 31 July 2005 - 09:34 PM

QUOTE (91RS @ Jul 31 2005, 18:58)
Now it takes twice as long to do the basic reflection, it's getting very annoying.  Before nothing had a reflection unless I wanted it to, and now everything has a reflection unless I don't want it to!

What so annoying??? This script is not only for converting vehicles!

If you creating a new car, apply a new GTA Material, there will be no reflection by default. But you have to change the material anyway!? And there is a 'SA Vehicle default' button(bottom Left). By pressing it you got all default SA reflection/specular at once!!!


QUOTE (Karcus @ Jul 31 2005, 15:02)
Ah dammit. Hey Kam I still get the Blue screen of death restart crash. I fixed my materials, my heirarchy, even made sure every stack was collapsed before exporting.

Oh and I want to get it clear, can I leave my mesh as an edit poly or must I convert it to an edit mesh before I export? I do convert my to edit mesh before export just to be safe but I see no resolve for my current problem. Actually the solution is to import the dff into zmod and export from there. Like I said in the pm the dff exported from zmod is about 40kb smaller than it is exported from your script. Maybe you wanna look at both my dff?

The file you send me got lot of un-used material! I think this is the main problem crashing ingame!!! To fix it. 'Clean up' the un-used material as we talk above.
But I would suggest condense your materials & IDs.

1. In Material editor, select your object's material. And instance the first one(ID 1) to a new material slot(eg: slot 2)
2. add a edit-mesh modifier to your object. Or convert it to editable-mesh.
3. In face/element submode, use 'select by ID' to select ID 1.
4. Detach it to a separate object(object01).
5. Apply the instanced material(Slot 2) to the detached object(object01).
6. Now attach this detached object(object01) back to your object.
7. A 'Attach Options' menu popup, check the 'Condense Materail and IDs' checkbox at the bottom.
8. Done! Now you have nice and clear materials with correct ID as well!

And it should be fine to use edit-ploy, when my script exporting it. It try to convert to what it needed. If not success, there will be an error in listener. So you can check there if it converted successfully!

91RS
  • 91RS

    Gimme All Your Lovin'

  • Members
  • Joined: 26 Jun 2005

#517

Posted 31 July 2005 - 11:04 PM

Ok, could you just give me the link for the full July 14 release? The 2nd UV map isn't worth all this IMO. I'll figure it out later when I have time.

dyce
  • dyce

    Player Hater

  • Members
  • Joined: 30 Jun 2005

#518

Posted 01 August 2005 - 03:46 AM

does this import dffs from the player.img now? i really want to see how they modeled cj and some other stuff

wildmotzi
  • wildmotzi

    m00 :o

  • Members
  • Joined: 25 Jun 2003

#519

Posted 01 August 2005 - 03:55 AM

QUOTE (silver007 @ Jul 31 2005, 08:00)
Hey Kam, well ive been trying to convert over my cars for awhile, ive tried using Zmodeler 2, though it keeps screwing up and you script seems better, so im going to try using it

however, theres a slight problem, although this isnt big or anything
it seems yor Script cant read .dff files exported from zmodeler2, it gives the error
user posted image

what i have to do in order to get my SA cars from zmodeler 2 into 3DS max is the following

Export it as an old .z3d file, however doing this removes all the dummies since Zm2 handels dummies differantly and has a "speical" object/setting for them, this zmodeler 1 cant read so it removes them, so i open up the file in zmodeler 1,
now i need dummies, so i open up your script in 3DS max, import a SA vehicle, and export it as VC format
then import the car into zmodeler 1, and delete everything except the dummys, so i have them, then i have to mirror my car because zmodeler is screwed up and needs the model backwards to what Zmodeler 1 has it, then i have to move the dummes and copy all the axis to make them right, then fix the heirarchy, then finaly i export it as VC format, then import it into 3DS max......

alot of extra steps just to get it from zmodeler 2 into 3DS max, it would make my life easier if your script could read SA .dffs exported with zmodeler 2, perhaps you can look into it?

thatīs because dff files from zmod2 have locks. it's completely normal that you can't import it.
if you had the registred version of zmod2, you'll able to chose "lock" or "not lock".
in free version, all dff's are locked.

-motzi

Karcus
  • Karcus

    Square Civilian

  • Members
  • Joined: 05 Jul 2005

#520

Posted 02 August 2005 - 03:05 AM

OK Kam i did what you said it now it dont crash but it doesnt load the dff. I tried making materials from scratch by asigning all material to a defualt material then I cleanse all materialls and save file. reset to new and merge the save into max. that should make all object have only 1 material ID. So I make new materials and assign them to objects. when i export I get the same result of not crashing ingame just no loading dff. I know the problem lies with my materials. When I import the bad dff to zmod it subtracts some materials.

Question1. Can I have material with a texture for difuse color and another one with same texture but with reflections. zmod always removes one of these textures when i import it there.
I use these materials for my wheel. the rim has the reflection and the tires doesnt.

Question2. Smoothing groups. Is it supported or is cause of my crash ingame. I know detaching faces to element does the same thing though.

Thanks again.

Kam
  • Kam

    JINX

  • Members
  • Joined: 17 Dec 2004

#521

Posted 02 August 2005 - 08:01 AM

QUOTE (Karcus @ Aug 2 2005, 03:05)
OK Kam i did what you said it now it dont crash but it doesnt load the dff.  I tried making materials from scratch by asigning all material to a defualt material then I cleanse all materialls and save file.  reset to new and merge the save into max.  that should make all object have only 1 material ID.  So I make new materials and assign them to objects.  when i export I get the same result of not crashing ingame just no loading dff.  I know the problem lies with my materials.  When I import the bad dff to zmod it subtracts some materials.

No, the material ID stalled in your object will not change while using the method you said!
When you apply a new sub-material, the material ID still need to change!


QUOTE (Karcus @ Aug 2 2005, 03:05)
Question1.  Can I have material with a texture for difuse color and another one with same texture but with reflections.  zmod always removes one of these textures when i import it there. 
I use these materials for my wheel.  the rim has the reflection and the tires doesnt. 

Yes, as long as they are two different material and assigned to different ID.

QUOTE (Karcus @ Aug 2 2005, 03:05)
Question2.  Smoothing groups.  Is it supported or is cause of my crash ingame.  I know detaching faces to element does the same thing though.

Thanks again.

Smooth groups is not accessiable by maxscript, So I can't do anything with it. But it won't casuing crash!

silver007
  • silver007

    Homie

  • Members
  • Joined: 15 May 2003

#522

Posted 03 August 2005 - 07:19 PM

Hey Kam, another bug i found...

you already stated that the SA spectical has to be White, not black, in order for it to work right?

they why does your script default to black?, why cant you default it so the materials all have white speculars?

also, when i import a model, i do have to go though every object and material contained therein, and press the SA default button, then check off the reflections box for those materials i dont want a relfection for

however, although it works fine, saving the file, (.max) then reopening up the save file causes all the check-boxes to be re-ticked, and you have to go though each material again, and uncheck the box, and if you dont at least look at the materal (leave it as is) for some reason that object wont show up ingame then, weird...

is there any way to save if a material has a reflection or not in the .max file? so we dont have to go though each material all over again, and perhaps if the specual defaults to white and 0.05, upon import, it would be tons easier because were wasting time going though every material

Rollies77
  • Rollies77

    Joy Rider

  • Members
  • Joined: 02 Jul 2005

#523

Posted 03 August 2005 - 10:08 PM

Speaking of materials, I was tweeking those wheel arch angels' bumpers and found some annoying trouble exporting them back to the game. The meshes are fine, difuse maps are fine, but the reflections are just not there. I was making a Skyline to replace Elegy and the custom bumpers just don't match with the model. So I made a few changes and used my skyline's material to the custom bumpers. But when it got to the game, they're all dark and with no reflections at all. I also tried to apply its original material back and export it again, but still no reflections. Colors are also alot darker when there were no direct light beaming at them. In game, when at night, if there's another car behind you with the lights on, it helps lit the color, but with no reflections. I also noticed that the original dff was about 50kb, and the exported one was around 45kb. A little smaller, when my bumpers were supposed to have more mesh. I wonder if the custom bumpers' dff have somekind of values regarding its reflections that is different than the cars' dff that the exporter fails to include? The car itself has no problems, though.
Here are some pics:
user posted imageuser posted imageuser posted imageuser posted image
...and with lights pointing at them:
user posted imageuser posted image

Puddingpanzer
  • Puddingpanzer

    Not A Noob

  • Members
  • Joined: 25 Jan 2004

#524

Posted 04 August 2005 - 03:11 AM

Sorry for interrupting, but Iīve a new problem, too:

Is there any way to save the 2nd UV/Planar Map when exporting and re-importing? because everytime I have to add the 2nd UV Map to my cars if I do little changes... is there a possibilty to edit th 2nd UV Map when importing instead of creating anew one?

silver007
  • silver007

    Homie

  • Members
  • Joined: 15 May 2003

#525

Posted 04 August 2005 - 05:30 AM

QUOTE (Rollies77 @ Aug 3 2005, 17:08)
Speaking of materials, I was tweeking those wheel arch angels' bumpers and found some annoying trouble exporting them back to the game. The meshes are fine, difuse maps are fine, but the reflections are just not there. I was making a Skyline to replace Elegy and the custom bumpers just don't match with the model. So I made a few changes and used my skyline's material to the custom bumpers. But when it got to the game, they're all dark and with no reflections at all. I also tried to apply its original material back and export it again, but still no reflections. Colors are also alot darker when there were no direct light beaming at them. In game, when at night, if there's another car behind you with the lights on, it helps lit the color, but with no reflections. I also noticed that the original dff was about 50kb, and the exported one was around 45kb. A little smaller, when my bumpers were supposed to have more mesh. I wonder if the custom bumpers' dff have somekind of values regarding its reflections that is different than the cars' dff that the exporter fails to include? The car itself has no problems, though.
Here are some pics:

I can help this problem, its not really a problem with kams script at all.

you said you re-textured the Bumper to the skyline texture right?

well rememeber how VC worked, One.dff model, with a .txd that it loaded textures from that was defined in the default.ide?
those custom bumpers are actualy like cars, they have a .dff model, plus a .txd that is assigned too, check out the following file,
"data\maps\veh_mods\veh_mods.ide"

for exmaple purposes, lets say your bumper is "fbmp_c_u.dff"

now lets look into the veh_mods.ide, we see the line
"1165, fbmp_c_u, uranus, 100, 2101248"

the first number you can ignore, the second part, is the .dff name, the third, is the .txd the model loads textures from
therefore "fbmp_c_u.dff" is loading its textures from "uranus.txd"

what you need to do, is look at the line of .dff file you replaced, and see what TXD it loads from, if its not loading from the right TXD, then it wont show the texture, cause its not there,
again for an example, if you are replacing the sultan with your skyline, therefore the skyline texture is inside the sultan.txd and if the line in the veh_mods.ide is
"1165, fbmp_c_u, uranus, 100, 2101248"

then its looking for the texture inside uranus.txd, not sultan.txd which is were the texture is, so you need to change the line of the part you are replacing!!!

however, if you arent using a one of the 2 default relfections from san andreas (xvehicleenv128, vehicleenvmap128) the game auto looks for them first in the vehicle.txd, if you arent using one of those 2 (your using a custom one), then again, its not pointing to the right TXD that its in, thats all you go to do,
however, if you are using the default reflections, and its still not showing, then i dont know whats happening, perhaps maybe a kam's script bug

dertyjerzian
  • dertyjerzian

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

  • BUSTED!
  • Joined: 08 Jun 2005

#526

Posted 04 August 2005 - 05:39 AM

In addition to the top post, be sure you have assigned the particular texture to your model prior t export wink.gif

Kam
  • Kam

    JINX

  • Members
  • Joined: 17 Dec 2004

#527

Posted 04 August 2005 - 02:35 PM

GTA Material updated 04Aug05

fixed the problem when reopen Max file reset all checkbox!

Remember in SA, you need to change 'Specular Color' in 'SA Specular' to non-black to enable Specular/Reflection.
AFAIK, you need UV Map as well for reflection. (Either 1st or 2nd UV) This is the way SA Work!?


I am tired and sick for the complains of the default 'black' color in Specular.
Now I show you how to change the default in GTA Material.

CODE
Search this line in GTA Material:
 specular   type:#color default:black  ui:pscol

change the word 'black' to 'white'

Also this line for Spec/Ref blend:
 blend     type:#float default:1.0  ui:srblend

change '1.0' to whatever value you want!

For 2nd UV Map, there is no way to import both UV1 and UV2 into Max!
But now GTA Material is fixed. You can edit your MAX scene file rather than import it again!?

silver007
  • silver007

    Homie

  • Members
  • Joined: 15 May 2003

#528

Posted 04 August 2005 - 09:26 PM

Thanks alot kam, though i do apologise, i didnt know everyone was complaining about the black specual, but thanks to showing how to change it! fantasic job

demonj0e
  • demonj0e

    Sa Coder In Training

  • Members
  • Joined: 05 Apr 2005

#529

Posted 05 August 2005 - 10:19 AM Edited by demonj0e, 05 August 2005 - 10:25 AM.

can anyone help me with my car wheels
like above post in day the model looks sh*t but at night with lightning on it it looks good

heres 2 pics

Day

user posted image

Night

user posted image

yes the textures are in the correct place

Rollies77
  • Rollies77

    Joy Rider

  • Members
  • Joined: 02 Jul 2005

#530

Posted 05 August 2005 - 10:21 AM

I really think it's the problem with the exporter, Kam. It exports vehicles really great, but just with those modded items in wheel arch angels that causing problems. I'm pretty sure it's not the textures cos I always use the default vehicleenvmap128 and xvehicleenv128. I also tried to inject those textures into elegy.txd because the bumpers uses elegy's textures.

I tried to import one of the bumpers, fbmp_a_l.dff, and imediatly export it again. In game, still no reflections (either with or without custom paintjobs).
user posted image

I exported it with the "Skip COL" checked because 3dsMax crashed when I tried to export it with fbmp_a_l.dff as the SA Collision Base. I figured the bumpers don't use collision file and have the elegy.dff do the job.

Here are the the dff files if you need to look at it.
original and exported fbmp_a_l.dff
As you can see, the exported one is slightly smaller than the original in size. I hope I'm not causing you too much trouble as your script turned out really great. smile.gif

demonj0e
  • demonj0e

    Sa Coder In Training

  • Members
  • Joined: 05 Apr 2005

#531

Posted 05 August 2005 - 10:30 AM

ye thats another thing 3ds max crashes if u try export with col sumtimes
i think i tried exporting a car with a vc col and 3ds max crashed on me

ascendence
  • ascendence

    Rat

  • BUSTED!
  • Joined: 20 Jul 2005

#532

Posted 06 August 2005 - 02:10 AM

What are the best settings for the Material's script, so that the car textures don't look too bright and 'cartoony' and also have a decent reflectivity without having a white glare on certain spots of the vehicles?

dertyjerzian
  • dertyjerzian

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

  • BUSTED!
  • Joined: 08 Jun 2005

#533

Posted 06 August 2005 - 04:57 AM

What is the difference between August 4 release's "info disabled" and the dated one for 31 of july, which I'm assuming has info. Which is most functional, what was reason for the disable? Some info would be greatly appreciated, thanks everyone.

Kam
  • Kam

    JINX

  • Members
  • Joined: 17 Dec 2004

#534

Posted 06 August 2005 - 09:21 AM

QUOTE (dertyjerzian @ Aug 6 2005, 04:57)
What is the difference between August 4 release's "info disabled" and the dated one for 31 of july, which I'm assuming has info. Which is most functional, what was reason for the disable?  Some info would be greatly appreciated, thanks everyone.

04Aug05 release only updated/fixed GTA Material.
'GTA_DFF_IO_(Info Disabled).ms' is for anyone who having error of 'sdtl'! If you didn't have this problem, you don't need it!
As usual. Goto to 'About' rollout and check the 'Show detail info.' to enable it.

Karcus
  • Karcus

    Square Civilian

  • Members
  • Joined: 05 Jul 2005

#535

Posted 06 August 2005 - 02:18 PM

QUOTE (Kam @ Aug 2 2005, 08:01)
QUOTE (Karcus @ Aug 2 2005, 03:05)
OK Kam i did what you said it now it dont crash but it doesnt load the dff.  I tried making materials from scratch by asigning all material to a defualt material then I cleanse all materialls and save file.  reset to new and merge the save into max.  that should make all object have only 1 material ID.  So I make new materials and assign them to objects.  when i export I get the same result of not crashing ingame just no loading dff.  I know the problem lies with my materials.  When I import the bad dff to zmod it subtracts some materials.

No, the material ID stalled in your object will not change while using the method you said!
When you apply a new sub-material, the material ID still need to change!


Oops what I meant to say is, I asigned all objects to a defualt material then I... yada yada yada....

I check object and I can't change material ID. So if that method doesnt work how can I check if it still have material ID left over?

Thanks for the ID condensing technique. I haven't really sucssefully exported a car that was all done in max with your plugin yet, but I'm determined to do so. I will figure it out. All those unused materials I had made the game B.S.O.D. And my display adapter paid the price for it. I still have ideas of why my car is not loading ingame. At least the worst can't happen no more because no more crashing. But I will feel accomplished when I find the actually problem of my delima.

Well wish me luck.

demonj0e
  • demonj0e

    Sa Coder In Training

  • Members
  • Joined: 05 Apr 2005

#536

Posted 06 August 2005 - 08:13 PM

any found out how to fix that wierd texture problem for custom car mods

dertyjerzian
  • dertyjerzian

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

  • BUSTED!
  • Joined: 08 Jun 2005

#537

Posted 06 August 2005 - 09:10 PM Edited by dertyjerzian, 06 August 2005 - 09:22 PM.

Excellent biggrin.gif I thought that was an error avoidance, and I did indeed getting that error, but only on ped models. I hadn't asked about it because I figured that like player models, ped models were not supported yet. Thanks Kam, you have made so much progress.

QUOTE
Anyone found out how to fix that wierd texture problem for custom car mods?


Do you mean the high reflections? Maybe I missed a post by you from earlier that asked more in-depthly? Are you using Kam's GTAMaterial? I'm sure one of the car folks can get you squared away, but if you are talking about that shine, yes that's handled and covered well...probbablyyyy... about mid topic by now? Kam also has a tutorial here in the forum. Not sure if it was moved to the tutorial forum or not, but a quick search for posts by kam with key words about converting car might turn it up for you.

edit: I think you might be talking about the bodyFX being dark with no reflection or something like that now that I think about it, I'll leave that up there in case not.

tom14141414
  • tom14141414

    Crackhead

  • Members
  • Joined: 14 Jul 2005

#538

Posted 07 August 2005 - 12:50 AM

Hi. I was wondering if anyone could help me. I have downloaded Kams script and now I would like to convert an old vc car (for personel use only) but when i try to export the finished dff i get an error that says

--Runtime error: Feature not available: "fopen write mode"

I am using Gmax to convert the files but I have no idea what is causing this.
Thanks in advance.

silver007
  • silver007

    Homie

  • Members
  • Joined: 15 May 2003

#539

Posted 07 August 2005 - 02:13 AM

QUOTE (tom14141414 @ Aug 6 2005, 19:50)
Hi. I was wondering if anyone could help me. I have downloaded Kams script and now I would like to convert an old vc car (for personel use only) but when i try to export the finished dff i get an error that says

--Runtime error: Feature not available: "fopen write mode"

I am using Gmax to convert the files but I have no idea what is causing this.
Thanks in advance.

Kams San Andreas Scripts are for 3DS max only, not for Gmax, you will have to get the 30 day trial of 3DS max to use his script, only his older gta3/vc scripts work for Gmax, though i believe they're are seperate scripts for each program

Monitor57
  • Monitor57

    LC - II Designer

  • Members
  • Joined: 31 Aug 2002

#540

Posted 07 August 2005 - 06:34 AM

i would actually like to use the new .dff xporter (latest release) but everytime i tell it to export something it just stalls 3ds max and doesnt export properly sad.gif

any ideas?


- M57




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users