DDS format ObjectLightMaps = performance boost...

For info on the site, community and 'battlefieldy' things
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Apache Thunder »

The rexman scripts have their own SM import and export functions and as I recall they still work in Max 10 (though it's main difference is that it sets up materials using the standard max shader instead of the special RS shader...better or worse?

See if it would be easier to just merge those with the MDT import/export functions as it may save a lot of time. Any major advantage that the MDT SM importer/exporter has over the rexman version other then the shaders and BFV support? Don't use rexman's TM import/exporter though. It never supported tree sprites.

Actually I don't think the MDT gets the treesprites correct in the first place either. I've had issues with treesprites only being visible from a narrow angle before they mysteriously vanish. I do not see this happen with the vanilla trees that uses them so it seems the scripts fubar them somehow? It may also be why I can't get BFH trees with working sprites via the treeMesh system. The sprites, even when set up correctly will cause HUD glitches ingame and even a blue screen if I stay ingame for too long. (Not sure if it will blue screen Windows 7 as I have not tried this in Win 7 yet).

I've been wanting to make the BFH trees work right in BF42 for awhile now. :(

Either way, thanks for your hard work on them. It brings new life to BF42 modding! It will be this site's crowning achievement to have an updated max script set with new things to play with! :D

EDIT: Alright downloaded the max 8 scripts you posted in the last post you made thus far that had a file attachment. Importer seems to work fine. After setting up the paths, even the textures load in correctly. :D

Also checked the animations/skeleton functions...they work too! Looks like Max 10 isn't having issues with the max 8 scripts you posted up and that makes me a happy man! :D
ImageImageImage
I have cameras in your head!
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Senshi »

Yeah, but the 8-version I uploaded is not from me and is based on an old version of the MDT with several updates missing. They still work, but some extra stuff is missing. Glad they work for you in Max 10, in Max 12 there are issues as I reported (no correct materials being applied on import, animation/skel fubar etc.).

I know Rex has his own scripts for most of the MDT stuff, but actually they are the same. DICE simply used Rex's work (even his code comments are still in 1:1) and just based their work on those. And there are various smart updates, especially in the last versions up to the newest MDT there were several perfomance and stability updates that probably took a lot of troubleshooting and refining to achieve, and I kind of don't want to miss out on them.

Doesn't matter which one I use, I have to figure out the proceedings one way or the other. I just finished the Level editing tools-merge and will see when I get to the next part. Weekend is over :( . Plus, it's insanely exhausting, staring for hours at crude lines of code, trying to spot the frigging character out of place, comparing and merging several scripts, samples, references, documentations and google searches to find a possible way through. Just like BF-modding, but with less possibility to just take a break. Way more difficult to re-enter the same thought process one stopped the work with, if you know what I mean.

But yeah, I think this is promising and even though it's absolutely late in the BF42 modding era, it still might prove a nice addition and be helpful for dedicated modders, especially if they want to go for advanced modding or mapping.

Another thing I added to the To-Do-List: More stuff being "remembered", so checkboxes you tick once are being stored for the next time you restart Max and will be ticked already. This is a bit of extra-work, but something I sorely missed in some cases. Level import works 96% now, by the way. Only issue yet to resolve is wrong UVW mapping, but that should be fairly easy to resolve, as it' just caused by new and updated UVW map modifiers in the newer MAX versions (since Max 8) and one especially one new particular setting. After that it's back to SM Import&Export which I took a break from for the Rexman stuff ;) . And that's the moment I'll start looking at treemeshes, as I never used those tools much and can't really say much about them working or not working anyway.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Apache Thunder »

Any progress on the scripts thus far? I may start using them for my Max 9 installation.
ImageImageImage
I have cameras in your head!
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Senshi »

Real Life has struck again and I kind of ceased work on the scripts for the last weeks. Too much university stuff going on atm.

I do have a (mostly) working version now. What doesn't work:
-Vehicle Tab (Importing full vehicles/PCOs), there's a lot of magic and trickery going on in those scripts.
-Terrain import does work, but currently the tiling of the terrain patches textures is off (thanks to the new Max feature "Real World Size" that is bugged in Maxscript, in all versions from 9-12...). You can import and all, but afterwards you have to manually untick "Real World Size" for every terrain patch to get the correct scaling. It's a bit of a pain if you have large maps, and I was working on a workaround to fix that.

If you are interested, I'll go ahead and try to create a "release" build and upload this evening.

What I have added since last preview: Most of the options and checkboxes are now "remembered" and stored in a settings file, so even if Max shuts down or anything, your last used settings always will be there. Settings are stored immediately when you press the button or (un)tick a checkbox, so it's always up to date. This also goes for RGB values like in the water/terrain color chooser and Scale settings for the Level Importer. And probably added some other stuff I don't remember right now...
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Senshi »

You know what? Screw the release stuff, here you get the buggy version ;) .

It should work fine, I hope. One issue I did notice: When importing a heightmap, the first time you try it spits out a script error for me (on some maps...). If that happens, just close the BFMDT, reopen it (no need to restart 3dsMax) and import the level again. Now it should work. Also the interrupt in the first causes the viewport to be disabled (scriptwise, so unnoteable, really). To fix that, open the script listener window and just type
EnableSceneRedraw()
in the upper (reddish) console window and hit Enter. After that the viewport will work again.

All this is caused by me messing up somewhere recently, I know this part of the script worked just fine some steps earlier...But I just don't have the time and the leisure to go digging for it right now to be honest. Probably will be better in a couple of weeks, though.

Any feedback or bug reports are welcome, I'm sure there still will be plenty of them.
Attachments
bfmdt_2_76_bfmods.7z
(292 KiB) Downloaded 994 times
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: DDS format ObjectLightMaps = performance boost...

Post by fo0k »

Whats the secret behind running all this in max?
edit:.. back on lightmaps a moment.

I have the scene complete with all objects yadda yadda.. but if i render all these lightmaps they will have the same names... without game co-ord's! :) so how is that final stage done to name them correctly?
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Apache Thunder »

You need ti have rexman's old scripts. Select all the objects you want rendered out, then use rexman's scripts to "setuplightmapping" to add the correct element names to the output files. You'll find it in the utilities section of the dialog.
ImageImageImage
I have cameras in your head!
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Senshi »

Actually I have that included in my "new" MDT as well. There's an option "Setup Lightmaps" or sth. like that in the "Level" tab that does exactly the same as the old rex script (mostly because it is the same one, just with a new button ;) ).
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: DDS format ObjectLightMaps = performance boost...

Post by fo0k »

ahh so i saw the setup lightmaps button on rexmans script and kinda thought it might have that purpose.. but it didnt seem to work fo rme.. I selected meshes then hit the setuplightmaps button and nothing happened :/

Ill try out your one senshi.. still not played with it.


edit: ok i see whats going on now heheh
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: DDS format ObjectLightMaps = performance boost...

Post by Apache Thunder »

Speaking of which Senshi, have you found a way to make the setup light maps option to specify which resolution the element types will render out too? The old scripts just had them all set to auto and I had to go through ALL of the statics one by one in the render dialog to setup the resolution settings for the output textures. It's a huge pain in the ass and the ability to automate this would be a good feature. Perhaps add additional options that adds 3 common resolutions. Since I output to DDS files, the 3 resolutions I use most often for the 3 size categories I organize the statics in (small, medium, and large) are 256, 512, and 1024. :D

The ability to set this automatically to all the statics would be a great benefit. :D
fo0k wrote:ahh so i saw the setup lightmaps button on rexmans script and kinda thought it might have that purpose.. but it didnt seem to work fo rme.. I selected meshes then hit the setuplightmaps button and nothing happened :/

Ill try out your one senshi.. still not played with it.


edit: ok i see whats going on now heheh
lol. If you have the render dialog open when you use that script function, you won't see any changes until you close and reopen the render dialog. :P
ImageImageImage
I have cameras in your head!
Post Reply