RSC Forums  

Go Back   RSC Forums > Racing Sims > Touring & Sports Cars > rFactor > rFactor modding > Car and Track Addons/advice section > Track and Car editing advice

Welcome back!
If you're experiencing problems with logging in, please use forum.racesimcentral.com not forum.racesimcentral.com.
The problem will be fixed as soon as possible!

Reply
 
Thread Tools
Old 07-12-2005, 19:11   #1
gerzson
Registered
 
Join Date: Dec 2003
Posts: 93
GMT importer v0.94 for 3ds max

Here's a maxscript that imports gmt files into max. (tested only on max 8)
It has some important things missing yet, but I don't think I can fix them in this framework so here goes v0.9.

INSTALLATION(order important):

-install ISI's 3ds max tools
-extract all the files from rFactor's coreshaders.mas into 3dsmax\hardwareshaders
-copy importGMT2.ms into 3dsmax\scripts\startup
-launch max
You can find the importer in Utilities(hammer)\maxscripts\utilities.
You need to have the textures of the gmts in the directory of the gmts, or in the "Additional texture path" in tga or dds format in order to keep the texture names. In the case of animated texture stages(like sky.tga, or *.bik) you can select any tga or dds when prompted, doesn't matter.
IMPORTANT: If you run out of memory go to preferences->MAXScripts, and set the initial heap size to 32mb, and restart max.


KNOWN LIMITATIONS:

-I couldn't import the main material properties like colors, blending modes, however you can see them in the MAXScript Listener(F11), and correct them manually.
-The animation type(like cycle, manual) imports correctly, but during exporting it defaults to 'cycle', so set it manually again.
-Only Triangle lists are supported, strips are a waste of time anyway(on my comp at least)...
-Tested only on Mills and Orchard Lake.
-If something goes wrong usually everything collapses, so be careful
-very slooooooooow because of the stupendous method used for material importing.

This project is open source, so modify it as you wish.


CHANGES since v0.8

-smoothing changes
-fix for blend percent, texture filter
-fix for major bug which caused wrong shader to be selected
-support for triangle strips
-a bit smarter texture searching, bmp support
-only non-default material properties are printed in the Listener
-pivot point, transformation imported
-textures are shown in viewport
Attached Thumbnails
max.JPG  
Attached Files
File Type: rar importGMT2.rar (7.1 KB, 2446 views)

Last edited by gerzson; 03-02-2006 at 15:22. Reason: update to v0.94: a fix in the smoothing algorithm
gerzson is offline  Reply With Quote
Old 07-12-2005, 20:19   #2
Jka
Registered
 
Jka's Avatar
 
Join Date: Jan 2005
Location: 192.168.0.1
Posts: 391
Cool!

Will try it out...

- Jka -
Jka is offline  Reply With Quote
Old 07-12-2005, 23:26   #3
behzaeh
Registered
 
Join Date: Oct 2004
Posts: 140
Thx.
Even if i do not own 3DSMax, the information about gMotor Files is also very usefull .)
behzaeh is offline  Reply With Quote
Old 08-12-2005, 03:11   #4
hi
Registered
 
Join Date: Jun 2001
Posts: 399
sweet! Thanks, been dying to see how they did a couple things in the tracks, mine has a couple issues I can't seem to shake, maybe now I can. Hope it works
hi is offline  Reply With Quote
Old 08-12-2005, 04:01   #5
pholt
Registered
 
Join Date: Aug 2002
Location: Australia
Posts: 354
Thanks so much for this tool, it works great. It makes life so much easier than converting to 3ds and then importing. If I'm just importing parts of a track, the speed is good. I'd imagine it might be a bit slow if I tried to import a whole track but I find it easier to work on a part or 2 at a time.

Peter

Last edited by pholt; 08-12-2005 at 04:03.
pholt is offline  Reply With Quote
Old 08-12-2005, 11:53   #6
Maboroshy
Registered
 
Maboroshy's Avatar
 
Join Date: Aug 2005
Location: Moscow, Russia
Posts: 272
Thank you, gerzson.
Maboroshy is offline  Reply With Quote
Old 08-12-2005, 14:56   #7
elwood
Registered
 
elwood's Avatar
 
Join Date: Feb 2003
Location: South Milano
Posts: 170
Thanks a lot Gerzson, soon we'll use extensively.

U R THE MAN



cheers

el
__________________
MBDevteam old stuff
elwood is offline  Reply With Quote
Old 08-12-2005, 14:58   #8
sethro
Registered
 
sethro's Avatar
 
Join Date: Mar 2001
Location: United Kingdom
Posts: 2,293
ok, i can't get it to worki tried it on max 7&8 and although it installs ok it throws up a script error when I try to import. I made sure I followed the instructions to the letter. Any ideas? p.s. my max 8 is a virgin install no added files.
__________________
no news is good news
sethro is offline  Reply With Quote
Old 08-12-2005, 15:16   #9
sethro
Registered
 
sethro's Avatar
 
Join Date: Mar 2001
Location: United Kingdom
Posts: 2,293
bit more info

this is the line that causes an exeption in max 8

mat=meditMaterials[1].materialList[newMatID]=gMotorMaterial()


and in max 7 it's


mat.shaderSelect=shaderNames[s]
__________________
no news is good news
sethro is offline  Reply With Quote
Old 08-12-2005, 15:30   #10
Tony
Registered
 
Join Date: Mar 2001
Location: Sydney, Australia
Posts: 117
Thanks Gerzon.

I now know where I've been going wrong with applying the materials & textures to cars.

Now I have a field of nice shiny Holdens & Falcons.

It works fine in Max 7.
Tony is offline  Reply With Quote
Old 08-12-2005, 16:10   #11
sethro
Registered
 
sethro's Avatar
 
Join Date: Mar 2001
Location: United Kingdom
Posts: 2,293
ok i fixed it BUT i think your readme is a bit misleading as I had to extract ALL files from the coreshaders mas not just the GFX ones. Anyway many thanx
__________________
no news is good news
sethro is offline  Reply With Quote
Old 08-12-2005, 16:52   #12
gerzson
Registered
 
Join Date: Dec 2003
Posts: 93
I'm pretty sure that only the GFX files are needed, but the main thing is that you got it working

I've updated the importer to v0.81, now the pivot point and the transformation matrix are imported too, so the those cones at Mills are at the right place now. Get it from post nr.1.

p.s. Don't forget to use the listener to get the missing mat. properties.

Just one more thing: the 12th material is used temporarily during importing, its content is wiped out completely, so don't store there anything important.

Last edited by gerzson; 08-12-2005 at 16:58.
gerzson is offline  Reply With Quote
Old 08-12-2005, 18:09   #13
pholt
Registered
 
Join Date: Aug 2002
Location: Australia
Posts: 354
Is it possible to turn the textures on as they are imported? I've found that after importing, I have to go into each material, into one of the texture stages and click 'show map in viewport'. It's not a big problem but it would be nice not to have to do it.

Peter
pholt is offline  Reply With Quote
Old 08-12-2005, 19:50   #14
gerzson
Registered
 
Join Date: Dec 2003
Posts: 93
Yeah that's a good idea.
Fixed it in one line. See post 1 for update. Now the first texture of the dx9 shader is shown in the viewport.
gerzson is offline  Reply With Quote
Old 09-12-2005, 03:14   #15
Stoneytone
Registered
 
Stoneytone's Avatar
 
Join Date: Dec 2004
Location: Isle of Wight, UK
Posts: 175
Great tool thanx al lot for your hard work this will save me hours, small issue same as Sethro I had to extract ALL files from Coreshaders now it works great btw Im using Max7
__________________
Keep it Real
Stoney

http://www.core-team.org/
Stoneytone is offline  Reply With Quote
Old 09-12-2005, 04:33   #16
boblug
Registered
 
boblug's Avatar
 
Join Date: Jan 2003
Posts: 295
Great tool. I get an error though loading cube maps. I just say ok but then cannot select any cube map references.
boblug is offline  Reply With Quote
Old 09-12-2005, 06:24   #17
Tazz013
Registered
 
Join Date: Sep 2005
Posts: 97
All coreshader files need to be extracted, because the GFX files make use of all of the PSH and VSH files.

Does anybody know what MAS file has the cubemaps?

Last edited by Tazz013; 09-12-2005 at 06:44.
Tazz013 is offline  Reply With Quote
Old 09-12-2005, 08:01   #18
pasir
Registered
 
pasir's Avatar
 
Join Date: Apr 2002
Location: Finland
Posts: 167
Quote:
Originally Posted by boblug
Great tool. I get an error though loading cube maps. I just say ok but then cannot select any cube map references.
Yeah, I have the same error. Should there be so many cube maps in objects? I imported one billboard and got the cube map missing error. I don't think this billboard has a cubemap at all (checked with Noonan's tool). So I could not export it back to gmt from 3d max until I removed the cubemap entry from material (This is because I couldn't even put a DDS format cubemap there..why is that?)

But other than that error, this is a great tool
pasir is offline  Reply With Quote
Old 09-12-2005, 08:08   #19
Tony
Registered
 
Join Date: Mar 2001
Location: Sydney, Australia
Posts: 117
Their in the commonmaps.mas in the Locations folder or cmaps.mas in the vehicles folder
Tony is offline  Reply With Quote
Old 09-12-2005, 08:40   #20
pasir
Registered
 
pasir's Avatar
 
Join Date: Apr 2002
Location: Finland
Posts: 167
Quote:
Originally Posted by Tony
Their in the commonmaps.mas in the Locations folder or cmaps.mas in the vehicles folder
Ok, good to know
pasir is offline  Reply With Quote
Old 09-12-2005, 11:05   #21
sethro
Registered
 
sethro's Avatar
 
Join Date: Mar 2001
Location: United Kingdom
Posts: 2,293
hmm the cubemap issue is a bit more complicated than that maybe, i extracted all the other maps to my folder but still get the error. i asked gjon but even he wasnt sure, some trackside objects in dx9 use the cube map to create a better specular highlight i think.
__________________
no news is good news
sethro is offline  Reply With Quote
Old 09-12-2005, 14:40   #22
gerzson
Registered
 
Join Date: Dec 2003
Posts: 93
Guess what, you were right: ALL files need to be extracted from coreshaders.mas, this is official. My script doesn't need that directly, but the gMotorMaterial editor brakes down when only the .gfx files are extracted, the shaders cannot be selected, and in turn this breaks my tool as well...
gerzson is offline  Reply With Quote
Old 09-12-2005, 17:05   #23
hi
Registered
 
Join Date: Jun 2001
Posts: 399
yep, mine wouldnt work without extracting all of them. Now it does, and it rocks! Thanks again

Same deal with the cubemaps, lots of materials asking for em.
hi is offline  Reply With Quote
Old 09-12-2005, 19:38   #24
sethro
Registered
 
sethro's Avatar
 
Join Date: Mar 2001
Location: United Kingdom
Posts: 2,293
so has anybody managed to find the right cubemap yet?
__________________
no news is good news
sethro is offline  Reply With Quote
Old 10-12-2005, 00:26   #25
gerzson
Registered
 
Join Date: Dec 2003
Posts: 93
What's wrong with car_cube.dds or (or any other files in commonmaps.mas that end with _cube)?
OccanXX.gmt from Mills uses these and they load perfectly fine for me.
gerzson is offline  Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT +1. The time now is 14:39.


Copyright ? 2001-2009 RaceSimCentral (RSC) unless otherwise stated. All rights reserved.