Quantcast

Jump to content

» «
Photo

DFF importer and exporter for 3ds max

121 replies to this topic
The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#31

Posted 25 January 2016 - 05:56 PM Edited by The Hero, 25 January 2016 - 05:56 PM.

Haha, hidden nazi propaganda, eh? Probably due to the mess that is unicode on windows. (f*ck YOU UTF-16 f*ck YOU, DIE, DIE, DIE). Haven't actually tested the unicode versions myself...gah. Will fix it later, for now this is what it should say (lazy copy and paste from my code):

	{ "GTA III PS2 (3.1)", 0x31000 },
	{ "GTA III PC (3.3)",  0x33002 },
	{ "GTA VC PS2 (3.3)",  0x33002 },
	{ "GTA VC PC (3.4)",   0x34003 },
	{ "GTA III/VC Mobile (3.4)",   0x34005 },
	{ "GTA III/VC XBOX (3.5)",   0x35000 },
	{ "GTA SA (3.6)",   0x36003 },
  • Tomasak and dkluin like this

MrMateczko
  • MrMateczko

    I can be lazy only for so long...

  • Members
  • Joined: 10 Dec 2011
  • Poland
  • Helpfulness Award [Chain Game]

#32

Posted 25 January 2016 - 06:05 PM

Is this the third DFF exporter ever made for 3ds Max in the world?

Is so, try to make it as best as possible!
  • lpgunit likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#33

Posted 25 January 2016 - 06:39 PM

That's the idea. I will continue to improve it in the next time until it does everything i want it to. What I released today was one week of work.

  • Tomasak, MrMateczko, dkluin and 1 other like this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#34

Posted 25 January 2016 - 06:58 PM Edited by The Hero, 25 January 2016 - 07:52 PM.

Jinx and I just noticed a MAJOR bug: the exporter doesn't actually write files, lol.

I will fix this immediately.

EDIT: Should be fixed now. For some reason the plugin doesn't load properly in 2014 and upwards for me. Not sure what the reason is. Is it just me perhaps? You can load it manually in any case but there is some f*ckup happening...

  • lpgunit, Tomasak and Jinx. like this

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Feroci
  • Joined: 24 May 2008
  • Philippines

#35

Posted 25 January 2016 - 11:23 PM Edited by lpgunit, 26 January 2016 - 03:27 AM.

I have some problems with version selection BslUuAJ.png

The YTMND community will thank you for this xD:


Seriously though, did you use snippets from the Renderware SDK when you made this, or is this all made from scratch?

EDIT: Tried exporting a project file I made using 3DS Max, and it doesn't appear to be scaled well on import compared to the one I did using Kam's scripts.

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#36

Posted 26 January 2016 - 07:35 AM Edited by The Hero, 26 January 2016 - 07:36 AM.

From the old 3.1 exporter (for which we have the source code) I actually stole some code (two small functions I think) but I mostly used it for reference. I also used the 3.7 exporter (for which I have no source) to experiment with and create test files.

Scaling (and object offsets, i.e. moving the pivot around) are indeed things that aren't implemented yet. For now you have to bake the transform manually into the geometry (on the command panel: hierarchy tab -> adjust transform -> reset)

  • lpgunit and dkluin like this

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Feroci
  • Joined: 24 May 2008
  • Philippines

#37

Posted 26 January 2016 - 09:09 AM

From the old 3.1 exporter (for which we have the source code) I actually stole some code (two small functions I think) but I mostly used it for reference. I also used the 3.7 exporter (for which I have no source) to experiment with and create test files.
Scaling (and object offsets, i.e. moving the pivot around) are indeed things that aren't implemented yet. For now you have to bake the transform manually into the geometry (on the command panel: hierarchy tab -> adjust transform -> reset)


It certainly isn't ready for prime time yet, but I'm looking forward to the next release. ;)

zmudziak32
  • zmudziak32

    Homeboy

  • Members
  • Joined: 14 Dec 2007
  • Poland

#38

Posted 26 January 2016 - 05:55 PM

Hey, it is possible to import/export peds and characters models from PS2/XBOX?


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#39

Posted 26 January 2016 - 06:03 PM

Yes.

  • lpgunit and Mr. Jago like this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#40

Posted 27 January 2016 - 10:56 PM Edited by The Hero, 27 January 2016 - 11:07 PM.

Updated to 2.1:

- scaled and translated geometry should be handled correctly now.

- nodes are now sorted by ID (important for anm animations later on)

- lights and cameras are exported correctly oriented (not very interesting for GTA, but who cares)

- fixed the bug in the unicode versions (2014 and upwards) where strings were missing

  • lpgunit, Blackbird88, Vadim M. and 3 others like this

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Feroci
  • Joined: 24 May 2008
  • Philippines

#41

Posted 28 January 2016 - 01:34 AM

Updated to 2.1:
- scaled and translated geometry should be handled correctly now.
- nodes are now sorted by ID (important for anm animations later on)
- lights and cameras are exported correctly oriented (not very interesting for GTA, but who cares)
- fixed the bug in the unicode versions (2014 and upwards) where strings were missing


There, just tried it on a scooter mod I made, and it scales correctly now.
  • Jinx. likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#42

Posted 29 January 2016 - 11:16 PM

Little update:

- fixed a crash that happened with geometries having more than 8 materials (stupid typo, argh)

- fixed reflection material shininess (stupid brain, argh)

 

Sorry that these are so small incremental updates but this is pretty basic functionality and I find it embarrassing I'm still finding bugs.

  • lpgunit, Blackbird88, Tomasak and 4 others like this

ermaccer
  • ermaccer

    I can mod everything.

  • Facade Corporation
  • Joined: 24 Jun 2015
  • Poland

#43

Posted 30 January 2016 - 09:20 PM

Shouldn't be hard to port into gmax?

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#44

Posted 30 January 2016 - 09:24 PM Edited by The Hero, 31 January 2016 - 07:36 AM.

Urgh...unlikely. Supporting all these versions is a pain in the ass and nobody even uses gmax anymore.

  • lpgunit and Sweet Bellic like this

lpgunit
  • lpgunit

    It's L, as in Lpgunit, not I.

  • Feroci
  • Joined: 24 May 2008
  • Philippines

#45

Posted 31 January 2016 - 05:13 AM

Urgh...unlikely. I supporting all these versions is a pain in the ass and nobody even uses gmax anymore.

Despite being freeware and not requiring the user to jump hoops or appropriate the stuff illicitly, if I might add.

ColtA
  • ColtA

    Player Hater

  • Members
  • Joined: 27 Jun 2013

#46

Posted 12 February 2016 - 01:48 AM

I can't seem to properly export a vehicle using this plugin. I could barely export them using Seggae's plugin, lol. All I'm getting is failure to loads and CTDs.

When I re-import them into Max they look fine, and it's not an archiving problem, so I've got no idea what's wrong.

Not sure whether my 3DS Max is at fault, or whether I'm just an idiot.


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#47

Posted 15 February 2016 - 03:08 PM

What about UVmap2 suport?

  • lpgunit likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#48

Posted 15 February 2016 - 04:34 PM

Should be working already.

  • dkluin likes this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#49

Posted 16 February 2016 - 01:20 PM

Should be working already.

Cool, but any chace to get suport for earlier max versions?


Jinx.
  • Jinx.

    amigo

  • Facade Corporation
  • Joined: 15 Dec 2010
  • United-States
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#50

Posted 16 February 2016 - 01:29 PM

Should be working already.

Cool, but any chace to get suport for earlier max versions?
He answered about this a few posts ago.

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#51

Posted 16 February 2016 - 01:32 PM

 

 

Should be working already.

Cool, but any chace to get suport for earlier max versions?
He answered about this a few posts ago.

 

I was not tallking about gmax. I meaned earlier versions of 3ds Max than 2009.


Jinx.
  • Jinx.

    amigo

  • Facade Corporation
  • Joined: 15 Dec 2010
  • United-States
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#52

Posted 16 February 2016 - 01:34 PM

 

 

Should be working already.

Cool, but any chace to get suport for earlier max versions?
He answered about this a few posts ago.
 
I was not tallking about gmax. I meaned earlier versions of 3ds Max than 2009.
Doesn't matter, because he already stated that supporting all these versions is a pain in the ass.

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#53

Posted 16 February 2016 - 02:14 PM

 

 

 

 

Should be working already.

Cool, but any chace to get suport for earlier max versions?
He answered about this a few posts ago.
 
I was not tallking about gmax. I meaned earlier versions of 3ds Max than 2009.
Doesn't matter, because he already stated that supporting all these versions is a pain in the ass.

 

That why I prefer max scripts over SDK, they worck with all max versions.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#54

Posted 16 February 2016 - 04:17 PM Edited by The Hero, 16 February 2016 - 04:20 PM.

You don't want to write a sophisticated library for working in RW files in maxscript though. Maxscript is nice but the thought of importing ps2 dffs with maxscript......no thanks, it's hard enough with c++.

This posts sounds like written by fastman.

  • Jestic, lpgunit, Blackbird88 and 3 others like this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#55

Posted 17 February 2016 - 03:24 PM

You don't want to write a sophisticated library for working in RW files in maxscript though. Maxscript is nice but the thought of importing ps2 dffs with maxscript......no thanks, it's hard enough with c++.

This posts sounds like written by fastman.

I understand. Any chance that PS2 mdl from LCS and VCS will be suported in the future? I have already gained many information about that formats, so if interested can share.

  • Sweet Bellic likes this

Cherbet97
  • Cherbet97

    Badass nigga

  • Members
  • Joined: 03 Jun 2013
  • Russia

#56

Posted 21 February 2016 - 05:50 PM Edited by Cherbet97, 21 February 2016 - 05:50 PM.

Omg, i imported blistac.dff(SA PC), fixed taillight, exported, and game will crash if i load it. Any idea?


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#57

Posted 21 February 2016 - 09:12 PM

I understand. Any chance that PS2 mdl from LCS and VCS will be suported in the future? I have already gained many information about that formats, so if interested can share.

No, reading the files properly requires pointers no larger than 32 bits. Since recent max versions only come as 64 bit versions and I don't support 32 bit versions anyway this will never work. I thought about supporting LCS dffs though.

Omg, i imported blistac.dff(SA PC), fixed taillight, exported, and game will crash if i load it. Any idea?

No. Note that the "current" version is already old. I've made changes that aren't official yet and there's a chance it will work with later versions...I'm just not ready for another release yet.

Cherbet97
  • Cherbet97

    Badass nigga

  • Members
  • Joined: 03 Jun 2013
  • Russia

#58

Posted 23 February 2016 - 09:52 AM Edited by Cherbet97, 23 February 2016 - 09:52 AM.

Spoiler
Look at rear window, this after import and export on 3ds max using your plugin, how to fix? And Kam's are exporting like that too.


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#59

Posted 23 February 2016 - 01:34 PM

 

I understand. Any chance that PS2 mdl from LCS and VCS will be suported in the future? I have already gained many information about that formats, so if interested can share.

No, reading the files properly requires pointers no larger than 32 bits. Since recent max versions only come as 64 bit versions and I don't support 32 bit versions anyway this will never work. I thought about supporting LCS dffs though.

What do you mean by pointers? If I understood yo right, you mean fileoffsets that are using int32, but it´s really not a problem to cast in32 to int64.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#60

Posted 23 February 2016 - 02:39 PM Edited by The Hero, 23 February 2016 - 02:40 PM.

Look at rear window, this after import and export on 3ds max using your plugin, how to fix? And Kam's are exporting like that too.

Broken normals. You have to set smoothing groups to make it smooth, and the vertices have to be welded for that.
 

What do you mean by pointers? If I understood yo right, you mean fileoffsets that are using int32, but it´s really not a problem to cast in32 to int64.

Well, the files contain offsets that are 4 bytes in size. When you read the file into memory you use the relocation table to fix up these offsets from file-relative to pointers to absolute memory locations. This can only work however if the address of the file in memory fits into 4 bytes and hence it will never work with 64 bit pointers. Of course you can read the file the hard way on any system by reading everything manually and putting it into appropriate structs or by copying the atomic/clump/texDict (*ahem*...i mean element/elementGroup/texList of course :D) and handling pointer references in a special way. But both these ways are pretty cumbersome and I won't implement anything like that.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users