BFMDT 2.76 www.bfmods.com Development Thread
Re: BFMDT 2.76 www.bfmods.com Development Thread
I have noticed some kinda bug..
When the rs is written it will 'sometimes'... give the wrong material number at top (subshader xxxxxxxxxx)
I will try and give you something a bit more specific.. but I noticed that a model was not showing its texture.. and was driving me crazy until I noticed that it said material1 instead of material0 (only one material on the model.)
If I import the model to max 7(2.75) and export then it 'fixes' it... (but this same approach with 2.76 (in max13) does not)
I appreciate that this is not a very detailed bug report.. I will try and do better when I get a min to recreate it all more
When the rs is written it will 'sometimes'... give the wrong material number at top (subshader xxxxxxxxxx)
I will try and give you something a bit more specific.. but I noticed that a model was not showing its texture.. and was driving me crazy until I noticed that it said material1 instead of material0 (only one material on the model.)
If I import the model to max 7(2.75) and export then it 'fixes' it... (but this same approach with 2.76 (in max13) does not)
I appreciate that this is not a very detailed bug report.. I will try and do better when I get a min to recreate it all more
Re: BFMDT 2.76 www.bfmods.com Development Thread
I was talking to Senshi about the tools the other day, and actually the "only" thing that needs to be fixed for max version 8 is the mesh import/export function, everything else works just as intended with the original 2.75 tools in max8. The 2.75 tools in max8 open EMPTY rs files with the model, so every single texture assignment is lost. Importing mods, vehicles, etc. works, as well as animations for tracks for example.
But the fixed files for opening/exporting meshes WITH the proper rs settings does NOT work when only using the import/export scripts repaired by Senshi along with the original 2.75 tools.
Ok, more simple:
The original, untouched 2.75 tools along with a fixed mesh importing/exporting script for max8 would solve all my problems, since max7 won't work anymore after i had to re-install Windows 7 on my PC.
But the fixed files for opening/exporting meshes WITH the proper rs settings does NOT work when only using the import/export scripts repaired by Senshi along with the original 2.75 tools.
Ok, more simple:
The original, untouched 2.75 tools along with a fixed mesh importing/exporting script for max8 would solve all my problems, since max7 won't work anymore after i had to re-install Windows 7 on my PC.
Re: BFMDT 2.76 www.bfmods.com Development Thread
@fook: Apache described that issue some months ago already. Considering I stopped working on BF42, it is highly unlikely I'll pick up working on this scriptset. When talking with S31FR I reopened those files for the first time since the last tiny update and I simply forgot more than half the stuff I had to learn back then to get it to work in the first place. And I have zero motivation to try and figure it out again. It's actually not very hard to fiddle with all the scripts, it just takes lots and lot of time to figure out the whole intended workflow. Debugging the scripts with 3ds Max is quite efficient, even if the debug messages sometimes can be cryptic due to the horrible coding of the MDT.
I really have difficulties recalling the issues I faced, but I do seem to recall that I had a Max8 version of the MDT, but it didn't really work either (at least not on Max10 and 12 which I used back then). I also disliked it because it was based on 2.5something and not 2.75, and not working from the latest DICE version would be just stupid. I had to figure out all the stuff that changed in Maxscript between 7 and 8 (which is A LOT) to update it, and it took forever. Maybe S31FR has a different Max8+ scriptset which might be easier to get to run. If so, good luck to whoever picks up the work. If I had such a "good" Max8 version as S31FR describes it back then as a starting point, MDT 2.76 would be a lot better today, a pity I din't get it back then.
I'm aware that 2.762 in its current state still has bugs, some of them more or less severe, but I never cared about the mesh stuff that much. It worked just fine for me back then with Max 10 and 12 with my mods (BG42 and a personal mod) and I solely wanted mesh import/export and especially level editing. Of course it'd be nice to have a fully working version, but it will not be done by me. My BF42 times are over .
I really have difficulties recalling the issues I faced, but I do seem to recall that I had a Max8 version of the MDT, but it didn't really work either (at least not on Max10 and 12 which I used back then). I also disliked it because it was based on 2.5something and not 2.75, and not working from the latest DICE version would be just stupid. I had to figure out all the stuff that changed in Maxscript between 7 and 8 (which is A LOT) to update it, and it took forever. Maybe S31FR has a different Max8+ scriptset which might be easier to get to run. If so, good luck to whoever picks up the work. If I had such a "good" Max8 version as S31FR describes it back then as a starting point, MDT 2.76 would be a lot better today, a pity I din't get it back then.
I'm aware that 2.762 in its current state still has bugs, some of them more or less severe, but I never cared about the mesh stuff that much. It worked just fine for me back then with Max 10 and 12 with my mods (BG42 and a personal mod) and I solely wanted mesh import/export and especially level editing. Of course it'd be nice to have a fully working version, but it will not be done by me. My BF42 times are over .
Re: BFMDT 2.76 www.bfmods.com Development Thread
As a matter of fact, the files i have are exactly the original ones from the normal 2.75 tools, no changes were made to them. They always worked except this stupid screwed up sm/rs import/export function
Re: BFMDT 2.76 www.bfmods.com Development Thread
Is there any way around this, excluding exporting of the model back to version 7? I have spent hours on completing my work, just to stumble upon this...- Objects with many materials (probably 10+) get their IDs messed up.
Re: BFMDT 2.76 www.bfmods.com Development Thread
Well, you should be able to fix the .rs file manually later on, no problem there. IIRC the issue only happens when importing an existing file into 3ds max, not on exporting?
Nevertheless, you always can open the .rs file with your everyday text editor (Notepad++) and get things back to order.
Nevertheless, you always can open the .rs file with your everyday text editor (Notepad++) and get things back to order.
- Apache Thunder
- Posts: 1210
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: BFMDT 2.76 www.bfmods.com Development Thread
I think I used Max 10 to export some "Dystopia City" meshes I am working on for a mapping project for the Interstate mod. Some of them have over 20 materials. Haven't had issues with the material numbering. I recall I did have to change the "name" of the materials after export on any meshes I imported in and exported with a new name (pretty much all the objects in Interstate don't have lightmap channels, so I had exported the ones I used in my map with new names so that I can lightmap them). But that's minor and just a quick text replace job in Wordpad can fix.
I'm curious as to why the file name has to be part of the material names at all. Most of the RS files found in Rallisport Challenge don't incorperate the filenames at all. They are just "Material0" and so on. I modified the older rexman scripts to exclude "Material" from the material names and only output the filename + material number. Thus if I export the SM file with "Material" as it's name, I can get just the "Matarial0" and so on encoded into the SM files. I haven't found away to override it's behavior of using the file name as the material name though (I think this part is hard-coded into the EXE files that the script files call up to out put the SM files).
But I tested the result ingame with the car I ported from Rallisport Challenge and BF1942 has no issues with it. Weird that EA decided to code them like that. Rexman should have just based it more on what Rallisport did. It would have been less of a headache to fix in hindsight if we didn't have to worry about file names in the material names.
I'm curious as to why the file name has to be part of the material names at all. Most of the RS files found in Rallisport Challenge don't incorperate the filenames at all. They are just "Material0" and so on. I modified the older rexman scripts to exclude "Material" from the material names and only output the filename + material number. Thus if I export the SM file with "Material" as it's name, I can get just the "Matarial0" and so on encoded into the SM files. I haven't found away to override it's behavior of using the file name as the material name though (I think this part is hard-coded into the EXE files that the script files call up to out put the SM files).
But I tested the result ingame with the car I ported from Rallisport Challenge and BF1942 has no issues with it. Weird that EA decided to code them like that. Rexman should have just based it more on what Rallisport did. It would have been less of a headache to fix in hindsight if we didn't have to worry about file names in the material names.
I have cameras in your head!
- Apache Thunder
- Posts: 1210
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: BFMDT 2.76 www.bfmods.com Development Thread
For what it's worth, I would like to report that the scripts appear to work with 3DS Max 2015. It still gets material names in the RS file wrong. It's using the Material names stored in the max scene instead of using the ones generated in the SM file. Looks to be the same issue Max 13 had, but other then that it appears to export/import correctly. Just keep to the same procedures with checking the material names as one has had to do with Max 13.
As with Max 13, importing existing BF1942 objects and exporting them (assuming you had not renamed the resulting SM file on export), will still yield valid material names in the RS file. It's only when you export a new object or change the name of an existing one.
As with Max 13, importing existing BF1942 objects and exporting them (assuming you had not renamed the resulting SM file on export), will still yield valid material names in the RS file. It's only when you export a new object or change the name of an existing one.
I have cameras in your head!
-
- Posts: 3
- Joined: Fri Sep 26, 2014 11:26 pm
Re: BFMDT 2.76 www.bfmods.com Development Thread
Hi guys ive got an issue when trying to import certain meshes like trees and buildings .Idk if i did something wrong but yeah im useing 3ds max 9
Some objects import fine like boxes and grass barrels some gives me this message im trying to use it on battlefield vietnam .sm files it use to work fine when i was useing 3ds max7 on xp any ideas?
Some objects import fine like boxes and grass barrels some gives me this message im trying to use it on battlefield vietnam .sm files it use to work fine when i was useing 3ds max7 on xp any ideas?
-
- Posts: 3
- Joined: Fri Sep 26, 2014 11:26 pm
Re: BFMDT 2.76 www.bfmods.com Development Thread
Hi once again i solved the problem i been haveing
hmmm my previous post isnt showing so basicly what was happening was whenever i tried to import trees and buildings and stuff (the small stuff like bushes and boxes worked fine) from Battlefield vietnam i would get this message as seen in the attachment
I found the problem in the rsParser.ms file
Its working fine now and the importer doesnt crash
Hope this helps
Carnage
hmmm my previous post isnt showing so basicly what was happening was whenever i tried to import trees and buildings and stuff (the small stuff like bushes and boxes worked fine) from Battlefield vietnam i would get this message as seen in the attachment
I found the problem in the rsParser.ms file
Code: Select all
----------------------------------------
-- Convert bfRsMaterial struct -> BfRsShader material
fn rs_struct2bfRS tmpName tmpMat=
(
local rsMat = BfRsShader name:tmpMat.name
if tmpmat.lighting != undefined then rsMat.lighting = tmpmat.lighting
if tmpmat.materialspecular != undefined then rsMat.materialspecular = tmpmat.materialspecular
if tmpmat.materialspecularpower != undefined then rsMat.materialspecularpower = tmpmat.materialspecularpower
if tmpmat.materialDiffuse != undefined then rsMat.materialDiffuse = tmpmat.materialDiffuse
if tmpmat.transparent != undefined then rsMat.transparent = tmpmat.transparent
if tmpmat.twosided != undefined then rsMat.twosided = tmpmat.twosided
if tmpmat.envmap != undefined then rsMat.envmap = tmpmat.envmap
if tmpmat.depthwrite != undefined then rsMat.depthwrite = tmpmat.depthwrite
if tmpmat.alphatestref != undefined then rsMat.alphatestref = tmpmat.alphatestref
if tmpmat.texturefade != undefined then rsMat.texturefade = tmpmat.texturefade
if tmpmat.blendsrc != undefined then rsMat.blendsrc = tmpmat.blendsrc
if tmpmat.blenddest!= undefined then rsMat.blenddest = tmpmat.blenddest
if tmpmat.texture != undefined then rsMat.texture = tmpmat.texture
if tmpMat.texture != undefined then
(
local tmp = getFileNameFile rsMat.texture
rsMat.texture = tmp
rsMat.delegate.maps[2] = BitmapTex filename:( tmp + ".dds")
showTextureMap rsMat on
--format "%\n" ( tmp + ".dds")
)
if tmpMat.texture2 != undefined then
(
rsMat.texture2 = tmp2 <----- changed it to rsMat.texture2 = tmpmat.texture2
)
try
(
if classof tmpMat.p == Array then
(
for i=1 to tmpMat.p.count do
(
rsMat.p[i] = tmpMat.p[i]
)
)
)
catch
(
format "Error! Catch() in rs_struct2bfRS()\n"
)
return rsMat
)
Hope this helps
Carnage