vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Making or wanting help making your own asset? Check in here
Post Reply
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: Experimental updated 3dsMax Tools. Newer Max versions support and more.

Post by dnamro »

Yes, that was the problem with getting the bf2 plugins to work with 3ds Max and Win 10. It appears that even if you have BF2 installed, it won't install directX 9 drivers on a Win 10 system. Most likely, BF2 was updated in the 1.6 patch to use more current directX drivers. So by installing the directX end user run times,

I even dug up and old XP laptop with with no games installed and I had to install the same direct end user run time files, to get it to work. I bet if Installed BF2 or BF1942 on this system it would have installed directX 9 files that I needed.


I am just glad that I finally figured out what the problem actually was and a solution for it.
PuckerFactor
Posts: 5
Joined: 2016-12-13 00:09

Re: Experimental updated 3dsMax Tools. Newer Max versions support and more.

Post by PuckerFactor »

After you've installed DirectX 9 on your Windows 8 or Windows 10 computer, you might as well enable Direct Play, as many old games require this deprecated piece of software, which seems to be part of DirectX. Here's how you do that:

Press Windows key and R
Type in appwiz.cpl and press enter
Check if the Programs and features part of the Control Panel has opened
On the left, click on Turn Windows features on or off
Look for Legacy components, double click it or press the plus sign to see all components
Check the Direct Play checkbox and click Ok

Also, read this;

https://windowsreport.com/enable-directplay-windows-10/
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: Experimental updated 3dsMax Tools. Newer Max versions support and more.

Post by dnamro »

PuckerFactor wrote:After you've installed DirectX 9 on your Windows 8 or Windows 10 computer, you might as well enable Direct Play, as many old games require this deprecated piece of software, which seems to be part of DirectX. Here's how you do that:

Press Windows key and R
Type in appwiz.cpl and press enter
Check if the Programs and features part of the Control Panel has opened
On the left, click on Turn Windows features on or off
Look for Legacy components, double click it or press the plus sign to see all components
Check the Direct Play checkbox and click Ok

Also, read this;

https://windowsreport.com/enable-directplay-windows-10/
Good Point. I still can't export to BF2 using a 64 bit version of 3ds Max. I can import just fine. It seems that the sceneparse.exe utility is not running. Sceneparse.exe has to be a 32 bit app, it was created when XP was used as a primarily 32 bit OS. Since any 64 bit version of 3ds Max will be installed into the 64 bit folder (Program FileS) I can't help but wonder if the problem might but wonder if the problem might be that sceneparser is located in the 64 bit folder and if it would work if the max script that calls it could reference it from a 32 bit safe folder (Program files (x86))
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by dnamro »

Great to see PR forums back up!

I have dug into the export process and from using the listener tool in 3ds Max, it shows that it is stopping when trying to run BF2Materials.ex, which is after it runs sceneparse.exe. Sceneparse appears to export the .dat and .mtl files for the model, while BF2materials.mtl actually does a lot some extra processing, before the script finishes up with the final conversions. In testing, I could not run sceneparse or BF2materials. from a command line in the \Program Files\autodesk\3ds max [ver]\scripts\Bf2\bin folder, but I could from the similar location in the 32 bit folder (\Program Files (x86)\... So, perhaps the problem is that 32 bit tools are trying to run in the 64 bit folder (\program files\).

Also running scenparse manually provides a lot of useful info on the model.

So, I was thinking, if the max script could be made to point to the similar location of the tools in the (x86) folder.

I found where the global variable is being set that has the location to the tools folder.



The variable is:

g_bf2ToolsLoc?



It is set in the plugin folder in bf2_mat_staticmesh2.ms:

Code: Select all

if not g_BFisGmax then     g_bf2ToolsLoc = (getDir #scripts) + "\\bf2\\"
Wha?t I am thinking is that g_bf2ToolsLoc could be searched for \Program Files\ and if it exists change it to \Program Files (x86)\

A batch file could be k?icked off to copy the tools over to the \Program files (x86) if they don't already exist. That, I can handle.

I have scripted in other languages, I just don't know enough about max script. The 3ds Max help does not have many examples, so it's not exactly easy to follow. Its also hard finding examples online.
PuckerFactor
Posts: 5
Joined: 2016-12-13 00:09

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by PuckerFactor »

dnamro wrote:Great to see PR forums back up!

I have dug into the export process and from using the listener tool in 3ds Max, it shows that it is stopping when trying to run BF2Materials.ex, which is after it runs sceneparse.exe. Sceneparse appears to export the .dat and .mtl files for the model, while BF2materials.mtl actually does a lot some extra processing, before the script finishes up with the final conversions. In testing, I could not run sceneparse or BF2materials. from a command line in the \Program Files\autodesk\3ds max [ver]\scripts\Bf2\bin folder, but I could from the similar location in the 32 bit folder (\Program Files (x86)\... So, perhaps the problem is that 32 bit tools are trying to run in the 64 bit folder (\program files\).
Have you gone to the 3dsMax Tools for BF2 Github?
https://git.cmp-gaming.com/Harmonikater/BF2-3dsMax-Tools

Read;
Working with multiple 3ds Max installations.

You can run all supported versions of 3DS Max using one BF2-3dsmax-Tools folder from wherever you want. (Except the BF2 startup scripts for Max)
SPYKER
Posts: 12
Joined: 2007-11-07 17:51

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by SPYKER »

Hi all,

I have problem when exporting tracks (in IDF:FFI mod we use A modular approach, hence the tracks exported separately):
Image

There are missing meshes after the export.
The missing meshes are the ones affected by the skin modifier.

Does anyone have any idea how to solve this?
You do not have the required permissions to view the files attached to this post.
User avatar
ALADE3N
PR:BF2 Developer
Posts: 574
Joined: 2016-02-13 17:34
Location: Philippines

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by ALADE3N »

I get this problem everytime I press Render Terrain

Image


EDIT: Fixed it by setting the water height higher than 0 in the editor and reloading the terrain in 3dsmax or clicking the render terrain function after I open 3dsmax
Last edited by ALADE3N on 2019-06-14 10:22, edited 4 times in total.
Image
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by dnamro »

Apparently, I have been overthinking the problem of getting the 64bit versions of 3ds max to export and possibly other functions that use the the 32 bit exe files.

In the folder:

\Program Files\Autodesk\3ds Max [ver]\Scripts\bf2\bin\release

There are 4 files:
bf2Materials.exe
HMParts.exe
mergeTGAColors.exe
SceneParse.exe

Select properties of each file and set compatibility to XP SP3 for each one.

Now they will run correctly as 32 bits app with the 64 bit version of 3ds Max.
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by dnamro »

Started new thread as to not get this one off topic:
https://www.realitymod.com/forum/showth ... p?t=149150
Last edited by dnamro on 2019-10-05 13:39, edited 1 time in total.
BqCai
Posts: 1
Joined: 2020-02-10 18:36

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by BqCai »

Can't export,it just creates the folder,i did it yesterday,i don't know why it's not working now
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by dnamro »

BqCai wrote:Can't export,it just creates the folder,i did it yesterday,i don't know why it's not working now
Are using the mklnk commands customized to your installation:

https://git.cmp-gaming.com/Harmonikater ... sMax-Tools

Without those, your going to be constantly fighting windows security issues. You might get it working one day, and then after a security update, it will stop working because the security gets reset with the update.

It looks like the there are some bat files created in the 3dsmax program files folder during the export process. With the max listener window open, I could see that it was stopped when trying to run ~convert.bat in the C:\Program Files\autodesk\3dsmax (ver)\scripts\bf2 folder.
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by dnamro »

I reinstalled my OS and 3ds Max 2020 with the 3ds Max plugins and I can't export either. The error that I am getting is scripts\bf2\general\misc.ms in the runDosCommand, the error message is:

--Runtime error:Filestream Cannot create: C:\Program Files\Autodesk\3ds Max 2020\scripts\bf2\~convert.bat

The confusing part, is that it is created. If I try to run it manually, I get an error message that BF2Materials.exe is a 16 bit app.

However, I went back to this folder:
C:\Program Files\Autodesk\3ds Max 2020\scripts\bf2\bin\release

to make sure that all the exe files were set with compatibility settings for XP SP3 and I am no longer getting an error message, but still no export. The only thing that exports is the .dat and .mat files for the object.

Event Viewer has errors that both BF2materials and Sceneparse could not run in a 64 bit environment.

This is with windows 10, max 2020. I tried the mklink suggestion, but with the same result.

Any ideas?
Last edited by dnamro on 2020-03-11 15:56, edited 1 time in total.
Reason: update info
dnamro
Posts: 29
Joined: 2014-07-27 00:47

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by dnamro »

I finally figured it out how to get 64 bit versions of 3ds Max to export in win 10. I am writing up some detailed instructions, but the simple thing is that scripts\bf2\bin\release tools need compatibility settings for XP since they are 32 bit apps running in a 64bit environment. Also the ones downloaded from Harmonikater's link don't download properly. I copied they from an older version of the tools.

Expanded explanation:
https://classic-battlefield-modding.fan ... ls_to_work
Last edited by dnamro on 2020-03-15 00:17, edited 1 time in total.
Reason: update
chelp
Posts: 1
Joined: 2020-03-27 19:04

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by chelp »

Hello :) ,

I'm new here and I'm struggling using "Import StaticObjects.con". After the importing process is completed I only see empty helpers.

(Importing a Heightmap works fine as well as single meshes extracted from ...EA Games\Battlefield 2\mods\bf2\Objects_client.zip)

I tried it on 3 different computers using 3 different versions of 3ds max (2009, 2016, 2019) but it always ends up importing helpers only.


here is what I did:

I extracted "server.zip" & "client.zip" from ...EA Games\Battlefield 2\mods\bf2\Sharqi_Peninsula into the same folder.

I guess I'm using the latest version of the script (downloaded from https://git.cmp-gaming.com/Harmonikater ... sMax-Tools)

I don't know what "git" is but I installed git & git lfs and ran cmd as admin executing the following commands:
"git lfs install"
"git clone https://git.cmp-gaming.com/Harmonikater ... -Tools.git"
At one machine I did the linking stuff with"mklink... " at the others I placed the content of the downloaded .zip directly inside the 3ds Max folder.

Does anyone know what I'm doing wrong ? :?

I also tried to create a folder called "objects" inside the Sharqi level folder. In which I extracted the content from ...EA Games\Battlefield 2\mods\bf2\Objects_client.zip.
When I do so, the "Import StaticObjects.con" doesn't produces anything (also no more helpers).
I thought the script is just missing the original object files and therefore places empty helpers.

update 02.04.2020 : It works, but only with 3ds max 2009
Last edited by chelp on 2020-04-02 14:44, edited 1 time in total.
Reason: update
ismaelassassin
Chilean Forces 1978 Faction Lead
Posts: 193
Joined: 2017-11-20 18:40

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by ismaelassassin »

Im new here. Managed to install the files but when using the exporter it creates a new folder and there is only .dat and a .material of 1 and 2 bytes. Using 3dsmax 2019 on win 10. Already changed BF2Materials, HMParts, mergeTgaColors, SceneParse to open as admin and compatibility set to windows XP SP 3. https://imgur.com/a/OViUHxW
User avatar
Mineral
Retired PR Developer
Posts: 8533
Joined: 2012-01-02 12:37
Location: Belgium

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by Mineral »

Can you send your 3dsmax scene? I can give it a try.
Image
ismaelassassin
Chilean Forces 1978 Faction Lead
Posts: 193
Joined: 2017-11-20 18:40

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by ismaelassassin »

Already sent
MariusMaximus
Posts: 3
Joined: 2020-11-27 17:04

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by MariusMaximus »

Is this thread still active, or at least the people that used to post here? Every time I import staticobjects, everything displays as helpers. I have tried with 3DS Max 2009, 2012 and 2018 and the results are always the same.

Am I missing something perhaps? Any help will be appreciated!
Outlawz7
Retired PR Developer
Posts: 17261
Joined: 2007-02-17 14:59

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by Outlawz7 »

Sure you don't have the 'import helpers' ticked? Otherwise objects needs to be extracted from zips for Max to import them.
Image
MariusMaximus
Posts: 3
Joined: 2020-11-27 17:04

Re: vBF2/PR 3dsMax Tools - Import/Export/Lightmaps/Animation - Max 9 and newer!

Post by MariusMaximus »

Outlawz7 wrote:Sure you don't have the 'import helpers' ticked? Otherwise objects needs to be extracted from zips for Max to import them.
Hey Outlawz

Thanks for the reply! I extracted all of the game's content to the "\mods\bf2\objects" folder. The map is also located in the BF2 mods directory. Am I supposed to drop the files inside the 3DS Max installation directory? I must be doing something wrong since I seem to be the only one having the issue, and it's with all the versions I am trying this with.

Oh and to answer your other question, no, I don't have the "import helpers" box ticked. I made pretty sure of that. :)
Post Reply

Return to “PR:BF2 Community Modding”