login

Author Topic: model-edit - v0.1.1  (Read 389 times)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
model-edit - v0.1.1
« on: August 04, 2017, 04:16:05 AM »
This here is a tool for editing detail information in a .model files produced by modemunge. It'll work (or it should) on any PC SWBF1/SWBFII .model file.

For usage instructions, information on how it works and more see the readme on GitHub.
https://github.com/SleepKiller/model-edit#model-edit

For a copy of the tool see the release page on GitHub.
https://github.com/SleepKiller/model-edit/releases

To learn about the workings on the tool see the source code on GitHub.
https://github.com/SleepKiller/model-edit

I made this over the course of this evening, it's not super advanced but it gets the job done. I wrote it in C# because  I wanted to play around with another language after writing swbf-unmunge in C++.

This also has to be the laziest release topic I've ever posted on this site.
« Last Edit: August 04, 2017, 07:57:40 PM by SleepKiller »

Sereja

  • Master Modder
  • This Man Has No Life
  • ***
  • Posts: 1258
  • Waiting for medal.
  • Awards Award for extensive modding contributions and/or donations to TWD Battlefront Recognizes an exceptional artist on this site. Halloween Modding Contest 2012 To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: model-edit - v0.1.0
« Reply #1 on: August 04, 2017, 04:36:42 AM »
It say it can't work with Win32.
Beauty is, the way to perfection.

Hail to the Ukraine!  :mf:

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: model-edit - v0.1.0
« Reply #2 on: August 04, 2017, 04:54:43 AM »
It say it can't work with Win32.
See if installing the .NET Framework 4.5.2 runtime fixes it. I would have expected it to work out of the box when .NET is installed. Let me know if instaling it fixes it for you or not.

Sereja

  • Master Modder
  • This Man Has No Life
  • ***
  • Posts: 1258
  • Waiting for medal.
  • Awards Award for extensive modding contributions and/or donations to TWD Battlefront Recognizes an exceptional artist on this site. Halloween Modding Contest 2012 To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: model-edit - v0.1.0
« Reply #3 on: August 04, 2017, 05:53:53 AM »
Nope. This thing just can't be installed at my Windows version (I have Windows XP).
Beauty is, the way to perfection.

Hail to the Ukraine!  :mf:

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: model-edit - v0.1.0
« Reply #4 on: August 04, 2017, 06:19:31 AM »
Normally I would say "Tough luck. Upgrade your OS." but I certainly understand not everyone can (or has the money to) do that. And it is trivial thing for me to change here I have made the tool target .NET 4.0 which as I understand works on Windows XP SP3, you can make sure you have it here https://www.microsoft.com/en-nz/download/details.aspx?id=17851 and I have posted a new version of the tool targetting .NET 4.0 on GitHub.

Feel free to let me know if you're still having issues.

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1747
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #5 on: August 04, 2017, 07:40:24 AM »
So at present this is useful for tricking the game into accepting higher-resolution models for all but unit models. Hopefully we can overcome that last hurdle sometime.
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #6 on: August 04, 2017, 08:19:13 AM »
So at present this is useful for tricking the game into accepting higher-resolution models for all but unit models. Hopefully we can overcome that last hurdle sometime.
Yes and no. The tests I posted had the detail tri count set to 8, being more conservative you can get detailed models ingame, fully animated, no flickering. With the higher (fake) tri counts the game still switched out to low res models, but was still rendering far more high res ones that it would even with stock models. (The algorithm controlling it seems to be weighted to render about 3-4 high res models on screen at once, I observed at least twice than that.) Given the fact that units are rarely so clustered ingame as they are on my blank test map you can probably get very good results going, especially if you were to say create some "low" resolution versions of your models for the game to switch out to. (You could probably even get away with them being quite detailed as well, although I'll leave that for someone else to test.)

It's all about the factor argument you can pass to the tool. Essentially it is (detail count / factor) so higher factor's will lie to the game more and more aggressively stop low res switching. By default it is set to a conservative factor four, but you'll almost certainly want to fiddle with it and see what gives best results for your sides.  Too high for player models and the animation system will give up, too low and you'll get ugly stock model (as in it would be as if you were just using stock models) levels of lowres switching. And set it to 1 and you'll see the model constantly flickering because that stops any edit from taking place.

(Set it to 0 and you'll cause division by zero and the computer will yell at you. But that is too much information.)

Edit: I've updated the readme with information on the process done by the tool and clearer instructions, check it out if that interests you.
« Last Edit: August 04, 2017, 07:58:39 PM by SleepKiller »

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1747
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #7 on: August 10, 2017, 01:39:53 AM »
I get it now. So, given my unit models tend to range between 1500-3000 tris, I should be able to get this to work with my mod just fine.
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1747
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #8 on: August 12, 2017, 06:24:39 AM »
I'm just thinking if we can insert this into the munge process somewhere, so that it already does this when we munge our mods.
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #9 on: August 12, 2017, 08:40:31 PM »
I'm just thinking if we can insert this into the munge process somewhere, so that it already does this when we munge our mods.
I'm beginning to think you haven't been reading my posts very well :P

Yes (as explained in the readme) it was designed to make that a trivial thing to do, hence why it operates off directories instead of individual files.

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1747
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #10 on: August 13, 2017, 01:27:21 AM »
I haven't followed everything, no. :P I'll re-read everything though when I get a bit more time. This will definitely come in very, very handy for Legacy Phase 2, as I have a few models that go over the 2,000 poly rule for units.
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1747
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #11 on: October 13, 2017, 08:53:27 AM »
Can somebody tell me where to place this within my munge_side.bat file?
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

SleepKiller

  • Co-Admin
  • Internet Addict
  • ****
  • Posts: 2072
  • Awards To recognize Modders that make a most excellent contribution within the Month Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #12 on: October 13, 2017, 08:03:40 PM »
Sure!

First (in order to smoothly and easily integrate it into the munge process) drop the tool into ToolsFL/Bin of your modtools, regardless of game or version.

In all of the below cases remember to replace <factor> with your desired factor.

Spoiler: SWBF1 munge_side.bat (click to show/hide)

Spoiler: SWBF1 munge_world.bat (click to show/hide)

Spoiler: SWBF2 munge_side.bat (click to show/hide)

Spoiler: SWBF2 munge_world.bat (click to show/hide)

Again in all cases remember to replace <factor>!
« Last Edit: October 13, 2017, 09:31:06 PM by SleepKiller »

Gistech

  • Imperial Shock Trooper
  • Moderators
  • This Man Has No Life
  • ****
  • Posts: 1747
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: model-edit - v0.1.1
« Reply #13 on: October 14, 2017, 01:19:04 AM »
Much appreciated, thanks :)

EDIT: Note: seems to crash when dealing with "tat_inf_jawa_low1.msh". I created a separate "munge_sides.bat" to deal with the Jawa side file that doesn't load modelmunge in the interim. Factor 8 makes the units "slide" so it's a matter of finding the right setting. Hopefully someday we will find a way of tricking the animation system too.
« Last Edit: October 14, 2017, 04:39:58 AM by Gistech »
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)