[All Games] Marvel Mods Modeling Tutorial

Started by BaconWizard17, January 20, 2020, 03:58PM

Previous topic - Next topic
February 15, 2021, 09:28AM #30 Last Edit: March 02, 2024, 06:12AM by BaconWizard17
MARVEL  MODS  MODELING  TUTORIAL
SUPPLEMENT 9: ALCHEMY 5 TOOLS

By BaconWizard17



Introduction
      The alchemy tools are a series of tools that can perform various functions on exported .igb files. The most important among them are Finalizer and Insight Viewer, but there are a series of other community tools that go with them.
      There are currently 2 different versions of Alchemy tools that have been discovered by the community: Alchemy 2.5 and Alchemy 5. This section will cover Alchemy 5, but it's important to understand the distinctions between the versions.
      The 3ds Max exporter provided in the virtual machine uses Alchemy 2.5. All files exported with that software will be in the format for Alchemy 2.5. The games themselves, however, use later versions of Alchemy.
  • X-Men Legends (all versions), X-Men Legends II (PC, PS2, XBOX, and GameCube), and Ultimate Alliance (PS2, XBOX) use Alchemy 3.2
  • X-Men Legends II (PSP), Ultimate Alliance (PSP and Wii), and Ultimate Alliance 2 (PS2, PSP, and Wii) use Alchemy 3.5
  • Ultimate Alliance (PC, XBOX 360, PS3, and Steam) use Alchemy 4.0
      Since Alchemy 2.5 is before all these versions, the Alchemy 2.5 tools will only work on files that have been exported with the Alchemy 2.5 exporter. These tools can't open any game files.
      Since Alchemy 5 is later than any of the game versions, it can open and edit many default game files as well as any Alchemy 2.5 files. However, files edited with Alchemy 5 can only be made to work with Alchemy 4.0 and some versions of Alchemy 3.5. So using Alchemy 5 can limit cross-compatibility. The two versions also have different functions from one another.

      Long story short: if you're making cross-compatible models, then you should use Alchemy 2.5 for any post-processing. If you're making models for Alchemy 4 only, then you can use Alchemy 5 for post-processing. Post-processing generally isn't necessary for most models, but it can be helpful.



Installing Alchemy 5
      You can find a full tutorial for installing and using Alchemy 5 in the Alchemy 5 Tutorial



Fixing MUA1 PC Skins Turning Black
      With Alchemy 5 (specifically Finalizer), there are a few important processes that can (or must) be performed on certain models in order to improve how they work on MUA1 PC and next-gen versions. The first process is a cosmetic change for MUA1 PC and next-gen. You'll notice that any custom models, when attacked, will briefly turn black. The default models don't do this. This only happens on MUA1 PC and next-gen, and isn't an issue on the older consoles or XML1/XML2.
     Note: If you're using igbFinisher, this process will be done for you automatically.
      To fix this, open your model in Finalizer 5. In the optimizer palette on the bottom left, choose the "Generate Global Color" optimization. Then, click "Run Optimization" to run this optimization. Now the black issue won't occur! You can now save your model.
      Ak2yny created a batch-executed version of this process, which can be found here. Place your skin (or multiple skins) in the same folder as genGColorFix.bat and genGColorFix.ini, and then double click genGColorFixPS2.bat to run the process! You can also drag you igb files and drop them on the bat file to only perform the operation on certain igb files.



Fixing Skin Compatibility with Next-Gen MUA1
      Models exported with Alchemy 2.5 won't automatically be compatible with MUA1 on Steam, XBOX 360, or PS3. There is a way to fix this, however. This method has only been tested with the Steam version, but it should theoretically work with XBOX 360 and PS3. This method is not necessary for MUA1 PC, but it will work with it.
     Note: If you're using igbFinisher, this process will be done for you automatically.
      To fix the compatibility, open the skin in Finalizer 5. In the optimizer palette on the bottom left, choose the "Convert igGeometryAttr to igGeometryAttr2" optimization. Double-click the optimization to edit its properties, and change "Access mode for igVertexStream" to "IG_VERTEX_ACCESS_WRITE_ONCE". Click OK, and then click "Run Optimization" to run this optimization. Save your file, and now you can use it in next-gen versions of MUA1!





Conclusion
      The Alchemy 5 tools can perform many functions on files that have been exported with the Alchemy 2.5 exporter (which is used by the virtual machine), as well as many default files. The default Alchemy 5 tools have been listed here, and you can learn about other processes in later supplements.

February 15, 2021, 09:33AM #31 Last Edit: March 02, 2024, 06:12AM by BaconWizard17
MARVEL  MODS  MODELING  TUTORIAL
SUPPLEMENT 10: POST-PROCESSING FOR TRANSPARENCY

By BaconWizard17



Introduction
      For textures that have full transparency (see Chapter 7 for more information on the meaning of this), there are some necessary processing steps that need to be taken after the model is exported to ensure that it appears correctly in-game.



Creating Transparency with Alchemy 2.5
      With Alchemy 2.5, you have to do some slight trickery to get transparent textures to work correctly. Be sure that you do this right after export, because it won't work if you do any processing on the model with Alchemy 5 tools.
      Once you've exported your model, open it with a hex editor (like HxD or xvi32). Search for "igBlendStateAttr" and change it to say "igAlphaStateAttr". Then, search for "igBlendFunctionAttr" and change it to say "igAlphaFunctionAttr." After this, open the model in Alchemy 2.5 Finalizer.
      Expand the skinList in Finalizer, and then continue to expand until you get to the list of attributes with "igAlphaStateAttr" and "igAlphaFunctionAttr". You'll then need to mess with the settings of "igAlphaFunctionAttr". You can right click the name and select "Edit Object Fields." If the value for "_func" is 6, the value of "_refValue" should be around 0.5, and if the value for "_func" is 4, the value of "_refValue" should be around 128. You can adjust these values as needed to see how the game reacts to them. When you're done editing the model, you can save it and it's ready to go!




Creating Transparency with Alchemy 5
      With Alchemy 5, it is possible to create transparency in exactly the same way as with Alchemy 2.5. However, there is also a more eloquent way to do it through finalizer. This method only works on skins that have been exported using the MUA1 PC method, and will not for XML2/console/cross-compatible skins.
      Once you've exported your model, open it in Alchemy 5 Finalizer. In the schematic view, expand the categories all the way down to the igAttrSet, where you'll see things like igBlendStateAttr and igBlendFunctionAttr, among other things. Right click the igAttrSet and choose "create new attribute for item." Create igAlphaFunctionAttr and igAlphaStateAttr attributes for the igAttrSet. To properly navigate the dropdown menu, you may need to press and hold it. Right click the new attributes to edit their fields. For igAlphaFunctionAttr, set "_func" to 4 or 6, and set "_refValue" to 0.5 (can be adjusted). For igAlphaStateAttr, make sure "_enabled" is set to "Yes". Once you've done this, you can save your model and use it in-game! For the Steam version, the only value for "_func" that it will accept is 6. This is likely the case for Xbox 360 and PS3. Once you add the igAlphaFunctionAttr and igAlphaStateAttr attributes, delete the igBlendFunctionAttr and igBlendStateAttr attributes by right clicking on them and choosing the option to delete. Then, save your model again.


      UltraMegaMagnus has created a video tutorial that explains this process as well.



Conclusion
      Transparency in models can be created in several different ways. In Alchemy 2.5, it must be done with some clever trickery using hex editing, but in Alchemy 5 it can be created naturally in the schematic view. Either option works well, and it depends purely on which console/game you're using it with.

February 15, 2021, 09:35AM #32 Last Edit: March 15, 2024, 03:33PM by BaconWizard17
MARVEL  MODS  MODELING  TUTORIAL
SUPPLEMENT 11: IGBFINISHER

By BaconWizard17



Introduction
     igbFinisher is a program that I created to run finishing operations on igb files after exporting them from 3ds Max. It helps juggle all of the different console formats and various optimization steps. It takes in an exported igb file, hex edits it (if applicable), performs Alchemy optimizations (if applicable), and copies the file with a proper name to folders based on the compatible console.



What igbFinisher Does
     Before getting started, here's a high-level overview of what igbFinisher does, so that you can understand if it's right for you:

Expand to see overview
     igbFinisher will take an igb file, and then it will ask you several questions about it, including the texture format. Other questions are asset-specific. Then, based on your answers to the questions, as well as the settings that you input, it will make copies of the files, rename them appropriately, hex edit them if needed, run Alchemy operations if needed, and send the files to a destination folder of your choosing. With the way that the textures and operations are set up, it's possible to get up to 10 console-specific versions of an asset across all 4 games (XML1-MUA2) with just a single exported file. XML1 and XML2 releases will be grouped together if applicable, and MUA1 and MUA2 releases will be grouped together if applicable. Consoles that share the same format will also be grouped together.
     igbFinisher can be used to create assets for all consoles or just the PC versions.



Necessary Model Setup
     In order for your model to work properly with igbFinisher, there are some important things that need to be done. Here's what to do:

Expand to see steps
  • General:
    • When exporting textures, the PSP format should always be PNG8 and not PNG4.
    • DXT3 and DXT5 textures are also not supported.
    • RGB-BGR swapped .dds textures do not need to be added to the material editor window, since they can be created through alchemy optimizations.
    • Texture folders for 3D assets need to match. Transparent textures are supported, and so are environment maps that are set up in 3ds Max. Only one folder for each texture type (opaque diffuse texture, transparent diffuse texture, environment map) may be used. For a list of acceptable texture folders, see the tables below.
    • All assets should be freshly exported from the Alchemy 2.5 exporter script in 3ds Max.
    • Models should not be processed through Alchemy 5 prior to using this program, as this will break compatibility.
    • If applicable, Alchemy 2.5 transparency optimizations (covered in Supplement 10) must be done before using igbFinisher. This is the only type of operation that can be done prior to running igbFinisher.
    • If applicable, adding advanced textures (covered in Supplement 12) must be done after using igbFinisher.
  • Skins:
    • Skins must be exported in the console-compatible/cross-compatible method.
    • The original file name, igActor01_Animation01DB.igb, should be used. Don't change it.
    • All numbered internal model portions should use character number 123, regardless of the character's actual number. For the example models used in this tutorial:
      • Captain America's body model would be called "12301" (and the outline would be "12301_outline" if the model had cel shading), but his shield should still be called "shield_segment" (and the outline would be "shield_segment_outline" if the model had cel shading).
      • Scarlet Witch's body model would be called "12301" (and the outline would be "12301_outline" if the model had cel shading), and her face model would be called "12301_face" (and the outline would be "12301_face_outline" if the model had cel shading).
  • Mannequins:
    • The model should be exported with the name 123XX (Mannequin).igb. If you want to have a custom pose name for your mannequin (for example, "OCP Pose"), you can export it with the name 123XX (Mannequin - OCP Pose).igb, and the resulting file will have that pose name in its name.
    • All numbered internal model portions should use character number 123, regardless of the character's actual number. For the example models used in this tutorial:
      • Captain America's body model would be called "12301", but his shield should still be called "shield_segment".
      • Scarlet Witch's body model would be called "12301", and her face model would be called "12301_face".
  • 3D Heads:
    • The model should be exported with the name 123XX (3D Head).igb
    • All numbered internal model portions should use character number 123, regardless of the character's actual number. For the example models used in this tutorial:
      • Captain America's body model would be called "12301", but his shield should still be called "shield_segment" (although the shield model would be deleted for the 3D head, but I just want to reinforce the point).
      • Scarlet Witch's body model would be called "12301", and her face model would be called "12301_face".
  • Boltons and Other Models:
    • The file name doesn't matter.
    • Internal naming doesn't matter.
  • Conversation Portraits:
    • The model should be exported with the name hud_head_123XX.igb
    • The internal naming of the model in 3ds Max should be "12301_conversation.png"
  • Conversation Portraits:
    • The model should be exported with the name 123XX (Character Select Portrait).igb
    • The internal naming of the model doesn't matter.

     Below are tables to help with picking the right texture folders if the model uses a mix of opaque diffuse textures, transparent diffuse textures, and/or environment maps.
PC ONLY
Environment Map FolderOpaque Diffuse Map FolderTransparent Diffuse Map Folder
PCPCPC and MUA1 Steam
XML2 PCXML2 PCPC and MUA1 Steam
MUA1 PC and SteamMUA1 PC and SteamPC and MUA1 Steam

ALL CONSOLES
Environment Map FolderOpaque Diffuse Map FolderTransparent Diffuse Map Folder
XML2 PCXML2 PC, Xbox, and WiiPC, PS2, Wii, Xbox, MUA1 Steam, PS3, and 360 OR PC, Wii, Xbox, MUA1 Steam, PS3, and 360
PC and MUA1 360PC, PS2, Xbox, and MUA1 360 OR PC, Xbox, and MUA1 360PC, PS2, Xbox, Wii, MUA1 Steam, PS3, and 360 OR PC, Wii, Xbox, MUA1 Steam, PS3, and 360
MUA1 PC, Steam, 360, and PS3MUA1 PC, Steam, 360, and PS3PC, Wii, Xbox, MUA1 Steam, PS3, and 360
XboxPC, PS2, Xbox, and MUA1 360 OR PC, Xbox, and MUA1 360PC, PS2, Xbox, Wii, MUA1 Steam, PS3, and 360 OR PC, Wii, Xbox, MUA1 Steam, PS3, and 360
WiiWiiPC, PS2, Wii, Xbox, MUA1 Steam, PS3, and 360 OR PC, Wii, Xbox, MUA1 Steam, PS3, and 36
Xbox and WiiXML2 PC, Xbox, and Wii OR WiiPC, PS2, Wii, Xbox, MUA1 Steam, PS3, and 360 OR PC, Wii, Xbox, MUA1 Steam, PS3, and 360
Xbox, Wii, and XML2 PCXML2 PC, Xbox, and WiiPC, PS2, Wii, Xbox, MUA1 Steam, PS3, and 360 OR PC, Wii, Xbox, MUA1 Steam, PS3, and 360
PS2PC, PS2, Xbox, and MUA1 360 OR PS2PC, PS2, Xbox, Wii, MUA1 Steam, PS3, and 360 OR PS2
GameCube, PSP, and MUA2 PS2GameCube, PSP, and MUA2 PS2GameCube, PSP, and MUA2 PS2



Installing and Setting Up igbFinisher
     Here's how to install and set up igbFinisher:
     
Expand to see steps
     You can download igbFinisher here. Follow the installation instructions on that page to properly install it.
     Once you've installed the program and the other necessary prerequisites, you need to set up the settings to run the program. To do this, open settings.ini in a text editor. You'll see several settings. Here's how to fill out each one:
  • xml1num: Can be None to skip exporting for XML1, Ask to ask each time the program runs, or a pre-populated 2 or 3 digit character number for XML1 to automatically process.
  • xml2num: Can be None to skip exporting for XML2, Ask to ask each time the program runs, or a pre-populated 2 or 3 digit character number for XML2 to automatically process.
  • mua1num: Can be None to skip exporting for MUA1, Ask to ask each time the program runs, or a pre-populated 2 or 3 digit character number for MUA1 to automatically process.
  • mua2num: Can be None to skip exporting for MUA2, Ask to ask each time the program runs, or a pre-populated 2 or 3 digit character number for MUA2 to automatically process.
  • xmlpath: Can be None to skip exporting for XML1 and XML2, Ask to ask each time the program runs, or a pre-populated file path for the XML1/XML2 release to automatically process.
    • If both xml1num and xml2num are set to None, exporting will be skipped anyways.
  • muapath: Can be None to skip exporting for MUA1 and MUA2, Ask to ask each time the program runs, or a pre-populated file path for the mua1/mua2 release to automatically process.
    • If both mua1num and mua2num are set to None, exporting will be skipped anyways.
  • pconly: Choose if the assets should be for PC only. Put True for PC only, or False for all consoles.


     After populating the settings, save the file. You're now ready to run igbFinisher! Any time you want to edit these settings, simply close igbFinisher and change them.



Using igbFinisher
     With igbFinisher set up and your assets exported, you can run igbFinisher! Here's how:

Expand to see steps
  • To start, double click on the igbFinisher icon to launch the program.
  • Two windows will open: A command window (which is igbFinisher itself) and the queue.
  • Drag and drop the exported file into the queue.
  • If the file was named correctly (see "Necessary Model Setup" above for more information), igbFinisher will automatically recognize it. If it's not named correctly, or if you dropped in a BoltOn or other model, you'll be asked about the asset type. You can navigate in the program with the arrow keys and the enter key.
  • igbFinisher may ask you additional questions depending on your settings.
  • igbFinisher will then scan the file to identify the texture format and other information about the file. For other models, you will be asked additional questions.
  • After you've successfully answered all the questions, igbFinisher will begin running operations. It will rename the files, hex edit them, run the Alchemy operations, and then copy them to the destination folder. Based on the texture format and the other settings, the program will create assets for all possible games and consoles that the asset is compatible with.
  • Once the operations are complete, the program will say so. You can then drag and drop another igb file into the queue and repeat the process!

     After running your files through igbFinisher, they're ready for release!

February 15, 2021, 09:37AM #33 Last Edit: March 02, 2024, 06:13AM by BaconWizard17
MARVEL  MODS  MODELING  TUTORIAL
SUPPLEMENT 12: ADDING ADVANCED TEXTURES

By BaconWizard17



Introduction
      This section covers MUA material editor for Alchemy 5. MUA Material editor is a fabulous program created by nikita488, which allows you to apply advanced maps to a model, such as normal maps, specular maps, environment maps, and the like. They can be applied to any static model for MUA1 PC, or for skins that were exported using the MUA1 PC method. XML1, XML2, last-gen MUA1, and last-gen MUA2 don't support these types of maps.



Using MUA Material Editor
      To export advanced textures, see Chapter 7.
      In order to use MUA material editor, you must first install the Alchemy 5 tools, which are covered in Supplement 9.
      To use MUA material editor, load your skin in Alchemy 5 Finalizer. Load the optimization called "Raven: setup MUA material." Double click this optimization to edit it. I will first cover how the program works, and then I will discuss what each type of texture is and how to configure it.
      In the first box, enter the name of your diffuse texture with the file extension (such as "0701.dds"). For the other maps, type the full file path for the new map (for example, "C:\users\BaconWizard17\Desktop\0701_n.dds" for a normal map, etc).


      Ak2yny created a batch-executed version of this process, which can be found here. Place your skin in the same folder as Maps.bat, and then edit Maps.ini with notepad to change the file paths for your maps. When you've gotten the file paths, you can double click Maps.bat to run the process.

Here are the latest discoveries about some of the Alchemy attribute functions and how they impact transparency and lighting:

1) If the model has transparency applied via igBlendState, then it will fade into background when near very bright glowing effects or shadows. To prevent that, you can add the "igDepthWriteStateAttr" attribute in the Finalizer and set it to "Yes" (credits to MrKablamm0fish for finding it). This will allow you to keep the transparency, but light or shadows won't impact the visibility of the model.

Here's the result:



2) If the transparent model is supposed to glow (has emissive map), then it can be achieved by setting igBlendFunctionAttr::_dst = 1 under "igBlendFunctionAttr" tree (it needs igBlendStateAttr to also be enabled). It also makes the model look much brighter. It can be used to imitate glowing textures if you're playing without advanced lighting.

Here is how "igBlendFunctionAttr_dst = 1" looks in the game mixed with the previous fix:


3) Finally, if you want to keep the original color of the diffuse map even with Advanced Lighting on, then you can add two more attributes. The first is "igGlobalColorStateAttr" set to Yes, and the second is "igLightingStateAttr" set to "No":


That way, the model will have its original vibrant color and won't look gray. Combined with all of the previous attributes, it makes the transparent glowing models look very appealing:


Here are some of the examples of the models that this method can be used for:
- Holographic glowing objects
- Objects that consist of pure energy or light
- Fire-looking objects. Useful for mannequins that rely on fire textures such as Ghost Rider or Human Torch.

IMPORTANT: It's not recommended to use "igLightingStateAttr" for non-glowing models, because it makes it so the model is unaffected by any light source or shadow (or renderfx). So, your regular skin or mannequin can end up looking bland: As you can see, regardless of the Advanced Lighting settings, the model keeps the original diffuse colors but doesn't have any shadows rendered on it.


The Marvel Mods Modeling Tutorial has been updated with some significant updates:
  • "Sections" are now called "Chapters" for easier organization
  • There is now a dedicated chapter for setting up and installing 3ds Max, as well as some tips for using it
  • igbConverter now has its own chapter, although it's not fully detailed yet (that will happen in the future)
  • The chapter for importing models from other games has been updated with the latest recommendations and suggestions
  • There is a new chapter for creating 2D assets in 3ds Max, which currently covers conversation portraits/HUDs and character select portraits/CSPs
  • Textures, including transparent textures and advanced textures, have been consolidated into one chapter. The Marvel Mods GIMP Scripts are now used instead of users having to manually select texture options. There are also some new techniques and recommendations listed here.
  • A chapter discussing setup for other models (map models and power models) has been added, although it's not fully detailed yet (that will happen in the future)
  • The chapter for bipeds has been consolidated into one chapter. The term "biped" is now used instead of "skeleton" for added clarity
  • Exporting models has now been consolidated into one section, with some added suggestions and recommendations
  • The supplemental chapter for transparency has been updated to only cover the post-export steps, since transparent textures are now in the textures chapter
  • here is a new supplemental chapter covering BaconWizard17's igbFinisher
  • There is now only one supplemental chapter for adding advanced textures, and it only covers the Alchemy 5 method. Exporting the advanced textures is now in the main chapter covering textures.