IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

This section is for obtaining help on creating and releasing tools

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (2) [1] 2   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 DFF Exporter (3ds Max plugin)

 
seggaeman  
Posted: Saturday, Apr 21 2012, 15:03
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



Here's a DFF exporter I wrote myself. Supports GTA III, GTA VC and GTA SA models (PC only). The binaries were developed with the 3ds max C++ SDK and can be accessed through File > Export.

DOWNLOAD LINK

(This is temporary. Files haven't yet been approved on gtagarage whatsthat.gif Updated on 13 May 2012 to fix light export problem pointed out by blaster_nl).

Sample screenshot:

user posted image

(The vehicle in the screenshot has already been released & is available at gtainside. )

This tool doesn't offer major breakthroughs. Kam's scripts and Zmodeler2 have been around for a while and most of the stuff they can't do has since been made possible through tools like DexX's SAGFX, Deniska's Maxscripts or Steve M's CollEditor 2. Well MOST but not everything.

So here's some of the new stuff you can do with this tool:
(a) Export non-zero vertex alpha. Applies for both normal and night vertex colors.
(b) Store face data as Tristrip. Two algorithms supplied.
© No need to waste time manually detaching smooth groups to ensure that hard edges aren't lost in the model. The tool does all the dirty work while leaving the original objects in your scene intact. You can also leave the modifier stack uncollapsed.
(d) Possible to export more than 1 hierarchy at the same time (in case you want to generate a multiclump file).
(e) All four car colors.

And there's support for both UV maps, UV anim export, lights and night vertex colors. Nothing new there but could be handy to have everything in the same interface. In general, I hope this is a more robust tool that gives fewer buggy models.

See the readme for more information.

Credit is due to guys who evaluated this tool and also those who uncovered the file format (didn't do any investigation myself). Thanks to fastman92, DexX, The Hero, RESpawn, Kam, Deniska, Steve-M and everybody else who contributed to format information on gtamodding.com

This post has been edited by seggaeman on Sunday, May 13 2012, 18:26

O This mod is hosted at GTAGarage.com

Screenshots:
GTAGarage screenshot

Downloads:
Download Plugins (13 May 2012) - 0.277MB, uploaded on May 13 2012, downloaded 3090 times

Click here to view the mod at GTAGarage

PM
  Top
 

 
Chris_lolwut  
Posted: Saturday, Apr 21 2012, 15:07
Quote Post


RIMSRIMSGUNSGUNS
Group Icon
Group: Members
Joined: Jul 5, 2008

nl.gif

XXXXX



the smoothing group feature really is a blessing from above for a lot of people biggrin.gif
Users WebsitePMMSN
  Top
 

 
seggaeman  
Posted: Saturday, Apr 21 2012, 15:17
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



Yep I sure used to find that pretty annoying smile.gif . Btw let's say you got a model where some of the faces have been assigned smooth groups 1 and 2, and the rest have been assigned group 1 only. In the viewport it will look like a single smooth group but the tool will see 2 separate ones !

Let me know if this kind of behaviour poses problems.
PM
  Top
 

 
XEPOMAHT007  
Posted: Sunday, Apr 22 2012, 09:58
Quote Post


Stupid Idiot
Group Icon
Group: Members
Joined: Nov 18, 2009

ru.gif

XXXXX



added support for a export bump mapping effect in dff gta3?

user posted image
PM
  Top
 

 
seggaeman  
Posted: Sunday, Apr 22 2012, 14:24
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



No bump map support right now. Actually I don't know much about this feature. Send me a sample GTA III model using bump map and I'll investigate.

UPDATE:

Improved the smooth group splitting feature. Now faces with smoothing bits in common are treated as belonging to the same smoothing group.
That's exactly how it is in the 3ds max viewports.

Also clearing all smoothing bits for a set of faces gives a tesselated appearance in the exported model. (what you see is what you get).
PM
  Top
 

 
XEPOMAHT007  
Posted: Sunday, Apr 22 2012, 15:59
Quote Post


Stupid Idiot
Group Icon
Group: Members
Joined: Nov 18, 2009

ru.gif

XXXXX



QUOTE (seggaeman @ Sunday, Apr 22 2012, 14:24)
No bump map support right now. Actually I don't know much about this feature. Send me a sample GTA III model using bump map and I'll investigate.

Number section = 288. Used in material on some generic objects in GTA3.

user posted image

I do not know that until now did not support it in KAM scripts or ZModeler.
PM
  Top
 

 
DexX  
Posted: Friday, Apr 27 2012, 15:14
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




QUOTE (XEPOMAHT007 @ Sunday, Apr 22 2012, 07:59)
QUOTE (seggaeman @ Sunday, Apr 22 2012, 14:24)
No bump map support right now. Actually I don't know much about this feature. Send me a sample GTA III model using bump map and I'll investigate.

Number section = 288. Used in material on some generic objects in GTA3.

user posted image

I do not know that until now did not support it in KAM scripts or ZModeler.

What models in gta3 use it?

I can provide some samples for rwg 3.6/7, but i seem to recall there being slight differences between versions. A bump mapped material exported in rw 3.6 wouldn't load properly in rw 3.4 (VC), something to do with the length of the texture name string.

I'll have to install a newer version of max than 2008 to test it, but if it does everything you claim, that's awesome. Especially the smoothing groups icon14.gif

QUOTE
- Version specific ambient, diffuse and specular figures apply to GTA III and GTA VC (RW 3.3.0.2). These values aren't used in GTA VC (3.4.0.3) and GTA San Andreas.

Renderware spec isn't used in SA, but i know ambient and diffuse are. Both values are blended with the material color when RwD3D9SetMaterial is called, mostly noticeable on vehicles or other dynamically lit objects. They likely work in GTA3/VC as well. And in gta3, the specular part of the material is used as the "reflection multiplier" for the reflective material on the default vehicles.
PM
  Top
 

 
King Shady  
Posted: Friday, Apr 27 2012, 18:20
Quote Post


Group:G-Modding Group:Bulletproof
Group Icon
Group: Members
Joined: Oct 10, 2010

anarchist.gif

XXXXX



Nice , best new feature is that with the smooth groups , what about player ?
PM
  Top
 

 
seggaeman  
Posted: Friday, Apr 27 2012, 18:52
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



Thanks DexX and XEPOMAHT007 for your info on those bump maps. smile.gif

@DexX: Alright I'll try to investigate those sample files if you find them (I don't have GTA III unfortunately). Btw that ambient, diffuse and specular data
I mentioned occurs in the geometry struct. (hope your cough isn't too bad. tounge.gif )

See here.
http://www.gtamodding.com/index.php?title=...28RW_Section%29
("For all versions below 3.4 also some lighting color values are stored").

Material specific ambient, diffuse and specular figures can be set in the material editor. Yeah could be the specular is not used in SA (even if it occurs in the file)
but I never tried to verify this.

@KingShady. Nope no ped support yet. : / Not finding time to add it right now.
PM
  Top
 

 
lpgunit  
Posted: Saturday, Apr 28 2012, 12:19
Quote Post


It's L, as in Lpgunit, not I.
Group Icon
Group: Members
Joined: May 24, 2008

ph.gif

XXXXX



A little overdue, but at least it's nice to know that there's a plugin-based IO tool for DFFs. Does this have full vehicle support, too?
Users WebsitePMYahooXbox Live
  Top
 

 
seggaeman  
Posted: Saturday, Apr 28 2012, 20:47
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



I'd say not full because stuff like coronastar has not been implemented. But there certainly is comprehensive support for the rest. That is as far as vehicles go, I don't think there is something Kam's scripts
or Zmodeler2 can do and which this tool can't.
PM
  Top
 

 
Blaster_nl  
Posted: Sunday, Apr 29 2012, 12:43
Quote Post


GTAV
Group Icon
Group: Members
Joined: Oct 16, 2005

nl.gif

Member Award




Useful scripts, for the ones interested:

Batch loader - 'Mass DFF importer'
http://www.scriptspot.com/3ds-max/scripts/batch-loader

Batch exporter - 'Mass DFF exporter'
http://www.scriptspot.com/3ds-max/scripts/...-batch-exporter


@seggaeman, How accurate are the omni import settings for map objects? Each omni has the following settings: multiplier: 1,0, FAE: 200,0
Also the colors look odd, i've seen many black lights on buildings from SFe.


This post has been edited by Blaster_nl on Sunday, Apr 29 2012, 12:52
Users WebsitePMMSNXbox LivePlayStation Network
  Top
 

 
razor1995  
Posted: Thursday, May 3 2012, 15:14
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 2, 2012

XXXXX



I use 3dsmax 2011.use your Script.But Import file Type no have grand theft auto *.dff.I want know?

PM
  Top
 

 
THE HERO  
Posted: Thursday, May 3 2012, 17:21
Quote Post


/* no comment */
Group Icon
Group: Members
Joined: Jan 25, 2005

gr.gif

XXXXX



About the bump, you could look at my source code (see sig), which should be about correct. I used the rw 3.7 exporter to generate some files with mat fx and also looked at the files in gta that have mat fx, perhaps this helps you.
PMICQ
  Top
 

 
razor1995  
Posted: Friday, May 4 2012, 02:50
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 2, 2012

XXXXX



QUOTE (THE HERO @ Thursday, May 3 2012, 17:21)
About the bump, you could look at my source code (see sig), which should be about correct. I used the rw 3.7 exporter to generate some files with mat fx and also looked at the files in gta that have mat fx, perhaps this helps you.

Thank. tounge.gif
PM
  Top
 

 
seggaeman  
Posted: Friday, May 4 2012, 15:13
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



@blaster_nl

Thanks for informing about those black lights yes there's certainly a problem there. monocle.gif

This is how I've interpreted the light information:


{
float attenuation;
float RGBcolor[3];
float FallSize;
short unknown; //always 3
short lightType; //0x80 if omnilight, 0x81 otherwise
};

FallSize seems to be the culprit. Kam forces this value to 0 (it is zero in several R* files). So I guess I'll do the same.

@The Hero: Great job figuring out the bump maps smile.gif . I'll check your source for info on that (as well as on lights).

PM
  Top
 

 
DexX  
Posted: Wednesday, May 30 2012, 00:40
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




Some sample files for material effects, and a tool to generate them;

http://www.gtagarage.com/mods/show.php?id=20834

The renderware exporter won't work with the newer versions of 3ds max that i have installed, hence the hack-job tool tounge.gif

Seggae, am i missing it, or did you not code an export "Scale" option? It would be handy instead of manually scaling each object in a hierarchy, resetting the xform an re-linking to the bone/dummy/helper objects, etc.

QUOTE
Btw that ambient, diffuse and specular data
I mentioned occurs in the geometry struct. (hope your cough isn't too bad. tounge.gif )

Ahh yes. I haven't looked at pre-3.6 models in a loooooooooooooooooooong time tounge.gif
PM
  Top
 

 
seggaeman  
Posted: Saturday, Jun 2 2012, 16:29
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



DexX thanks for the material effects tool I'll have a look at it once your site hoster is up and running again. smile.gif

Nope there is no scale option right now. I can add it in the next release of the tool (which will also add ped and mass file export through Maxscript).
But actually it does take node and object offset transform into account. So if you scale geometry up/down and don't reset XForm you don't need to worry about it being a different size in the file.
PM
  Top
 

 
Swoorup  
Posted: Friday, Sep 14 2012, 16:34
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Hi, could you update this for 3ds max 2013?
Also, are you planning to open source it?
PMMSNYahoo
  Top
 

 
seggaeman  
Posted: Sunday, Sep 23 2012, 17:33
Quote Post


Ace
Group Icon
Group: Members
Joined: Mar 29, 2010

mr.gif

XXXXX



Alright I will. It would have been done much earlier if the process was straightforward (it isn't because 3ds max 2013 has made the transition to unicode). I'll supply source code in the next release.
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (2) [1] 2 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG