OpenNaja / cobra-tools

A suite of GUI tools for extracting and modifying OVL and OVS archives, as well as editing the associated in-house file formats. Also includes a model plugin for Blender. For downloads, guides, and FAQs visit:
https://opennaja.github.io/cobra-tools/
GNU General Public License v3.0
94 stars 27 forks source link

Blender Scenery improvements #368

Closed hexabits closed 4 weeks ago

hexabits commented 6 months ago

Current workflow favors animals in its design. The switch from scenes to collections has also created a further usability gap between animals and scenery.

Decimation

Decimation modifier values are currently bad for low poly source geometry (e.g. wall planes) and causes export errors with invalid geometry. The modifier values should be increased with reduced input geometry, and removed altogether under certain conditions.

LODs

The shift from MDL2 Scenes to MDL2 Collections has caused issues with Create LODs. For scenery MS2 with dozens of models, Create LODs needs to be run on single collections and never the entire scene. Some LOD may be specifically customized/altered and Create LODs will wipe this out.

This may be easiest to address with a new panel on each top level collection for the MDL2 that will house collection based tools.

In this panel, for LODs, there could also be an option to set the number of LODs in the collection, which then manages the creation and removal of the LN meshes. Maybe also fields to set the Decimate modifiers for this MDL2 per LOD level.

Transforms

The armature system for Scenery, presumably used for attachment in game, can make transform manipulation tedious. AFAIK, there are no issues applying skinned transforms for scenery as they are weighted 100% to one joint. I assume this is only untrue for animated scenery, which is almost non-existent. The way much scenery is set up, it is simply easier to move pieces around this way, like moving all of L0-L5 using the same armature, or trying to align separate MDL2 that are using the same attachment axes.

Auto Smooth

An option to auto-smooth everything at a global or collection level would improve speed especially with 5 LOD items. The options built into Blender to multiselect and set properties on multiple items at once are esoteric and tedious, and in my experience wholly unreliable. I could not seem to shift-click multiple meshes + Alt-click Auto Smooth and actually get it working. Right-Click and Copy to Selected also didn't seem to work correctly. Even if it worked, traversing the hierarchy and multi-selecting everything is too tedious with the amount of MDL2 in scenery.

This is another candidate for the MDL2 collection tool panel.

Duplication and Hierarchy naming

Duplicating MDL2 collections creates a messy structure filled with .00N duplicate names. It harms organization and quality of life features of Blender like filtering, and until recently, .00N also broke name-based algorithms. Lack of filtering for 30 models each with 5 LOD levels can lead to a lot of wasted time finding things.

A MDL collection tool panel function to fix all the naming in a collection would be useful, in lieu of an automatic way to fix naming when Duplicating with Blender.

Since Blender-native collection duplication doesn't meet our needs without workarounds for naming issues etc. I think that the proposed MDL2 collection tool panel should probably have an option to duplicate a collection and fix all the names for you.

I also think that there should probably be an option to reuse the armature when duplicating a collection with this tool. And then probably also an option to stop sharing an armature between two MDL2 collections. Also same for materials.

The info/warning about .00N seems to be an unwanted duplication should also be much more apparent to users after export (for things that matter)

ModelFlag 517 UV1

Some ModelFlag such as 517 have arbitrary data that the game interprets differently depending on vertex (or possibly fragment) shaders.

Current code assumes this data is always a shape key when some models with the flag instead have UV1.

There needs to be a manual import option for the time being to correctly load the UV1 data

Task Summary

HENDRIX-ZT2 commented 6 months ago

checkbox for "expect shape keys" on import is implemented

ilodev commented 5 months ago

"expect shape keys" needs to be documented somewhere for people that has no idea what this is about, like me

HENDRIX-ZT2 commented 5 months ago

"expect shape keys" needs to be documented somewhere for people that has no idea what this is about, like me

I've already removed it because the heuristic I implemented appears to be good enoug :)

hexabits commented 5 months ago

I still have to take time to test LOD Distance editing with scenery. I have not had success with animals yet with modifying their LOD transition distances.