Code Monkey home page Code Monkey logo

3d-fixes's Introduction

Stereoscopic 3D Fixes

This repository tracks any fixes I make to games rendered in stereoscopic 3D using nVidia 3D Vision. Helix Mod and 3DMigoto are used to enable the fixes, see the Helix Mod blog for details on mod itself and final releases of these fixes.

Complete Fixes

  • Betrayer (Improvements on Eqzitara's fix) - fixes water, god rays, etc.
  • The Book of Unwritten Tales 2 - Fixes shadows, halos, etc.
  • [Montague's Mount](Montague's Mount) - Fixes halos, shadows, etc.
  • [Dreamfall Chapters](Dreamfall Chapters) - First ever Unity FOV correct shadow fix
  • World of Diving [DX9](World of Diving (DX9)) & [DX11](World of Diving (DX11)) - Fixed halos, shadows, etc.
  • [The Forest](The Forest) - Fixed halos, shadows, reflections, parallax sand/rocks, etc.
  • Legends of Aethereus - Fixed halos, shadows, skybox, etc.
  • DreadOut - Fix for missing fog after shader model upgrade, stereo cameraphone, etc.
  • Eleusis - Fixed shadows, light shafts, etc.
  • [Stranded Deep](Stranded Deep) - Fixed water, light shafts, yet another shadow pattern, auto-crosshair, etc.
  • [Life Is Strange](Life is Strange) - Fixed shadows, reflections, light shafts, bloom, etc.
  • Miasmata - Reflections, light shafts, stereo crosshair, skybox, etc.
  • [Oddworld: New 'n' Tasty](Oddworld New n Tasty) - Shadows, halos, clipping, ripple distortion, etc.
  • [Pineview Drive](Pineview Drive) - Halos, shadows, sun shafts, etc.
  • The Long Dark - Halos, shadows, etc.
  • Viscera Cleanup Detail - shadows, missing UI, etc.
  • [Dead or Alive 5: Last Round](Dead or Alive 5 Last Round) - water, halos, lens flares
  • [The Last Tinker: City of Colors](The Last Tinker City of Colors) - new technique to fix shadows
  • [Euro Truck Simulator 2](Euro Truck Simulator 2) - skybox, god rays, reflections
  • [Lichdom Battlemage](Lichdom Battlemage) - first every CryEngine 3 fix
  • [Mad Max](Mad Max) (Collaboration with DHR) - Fixes shadows, bloom, decals, reflections, etc.
  • Metal Gear Solid V: The Phantom Pain - New 3DMigoto hooking mode, accurate specular highlight fix, etc.
  • [The Witness](The Witness) - Automatic stereo mouse cursor, reflections, etc.
  • Firewatch - First game to use the DX11 port of my Unity scripts
  • [Far Cry Primal](Far Cry Primal) - Volumetric fog / light shafts / shadow volumes, accurate specular highlights, etc.
  • [Far Cry 4](Far Cry 4) (with mike_ar69) - fixes pretty much everything, adds an auto HUD
  • Witcher 3 (with mike_ar69 & others) - Highlight: physical lighting compute shaders

Several of my fixes are in their own dedicated repository due to their size:

  • WATCH_DOGS2 - First ever accurate Screen Space Reflection fix, accurate San Francisco volumetric fog, etc.

Works In Progress

  • Submerged (UE4 3DMigoto approach WIP, fixes shadows)
  • Batman: Arkham Knight (with mike_ar69) - fixes tile lighting compute shaders and halos
  • Demonicon - Quick fix to make the game playable, fixes lights and some halos
  • [Akiba's Trip](Akiba's Trip Undead & Undressed) - Adds a toggle for an auto UI depth adjustment (unpolished)

Minor Improvements

  • [Far Cry 2](Far Cry 2) - Adds auto-convergence while holding RMB
  • Infinifactory - fixes shadows from bo3b's fix

Other Branches

There's a couple of fixes that aren't in the master branch for various reasons:

Templates

Misc

I also keep a small collection of utilities related to 3D fixes.

useful_pre-commit_hook

If you are tracking 3D fixes in git, it is recommended to add this commit hook to prevent accidentally committing a shader with a NULL byte so that git will treat them as text files and show diffs in the history.

float_to_hex.py

Small python script to convert floating point numbers to hex and vice versa to get values for Helix Mod's DX9Settings.ini

_game_list_

Source for the auto-updating game list on the Helix Mod blog.

_shader_database_

Python script to crawl the helix blog downloading every fix it can find and creating a database of shaders so we can look up if a particular shader has been fixed previously, as may happen with games using the same engine.

mkrelease.sh

Small script to package up a game's fixes for release, replacing the symlinked dll with the real version and renaming README.md to 3DFix-README.txt. Run from cygwin, Linux or another Unix environment.

md2helix_blogger.py

Python script to format a markdown document to fit in with the formatting on the Helix blog. Strips top level headers and downgrades second level headers to underlined paragraphs.

CustomSettingNames_en-EN.xml

Custom setting names XML file for nVidia Inspector that adds friendly names for some of the stereo attributes that I've identified in each profile.

shadertool.py

This is a python tool I've started working on to parse shaders and automate some of the process of hacking them. It's very early and the code is not very pretty. At the moment it can (this list is out of date, run with --help for all current features):

  • Install shaders to the ShaderOverride directory, taking care of naming the file correctly.
  • Convert ps_2_0 to ps_3_0 and vs_2_0 to vs_3_0, optionally adding instructions to preserve fog that can stop working on shader model upgrades.
  • Analyse shader register usage and look for free constants.
  • Disable an entire shader by setting it's output to 0 or 1.
  • Disable individual texcoord outputs from a vertex shader.
  • Apply the stereo correction formula to an output texcoord of a vertex shader, optionally with a custom multiplier (try 0.5 if a correction switches eyes).
  • Reverse the stereo correction formula on the output position of a vertex shader to unstereoize it.
  • Disabled outputs, adjustments, etc. can be made conditional on a register passed in from Helix mod.
  • Insert a depth adjustment suitable for UI elements to the value of a constant register component (typically passed in from DX9Settings.ini).
  • Attempt to automatically fix common issues in vertex shaders where the output position has been copied, often resulting in halos (Very helpful for Unity games).
  • Automatically fix light shafts in Unreal Engine games.
  • Remove Unreal's stereo correction in shaders using vPos where it does more harm than good.
  • Automatically fix certain types of reflective surfaces in Unreal games (those using a 2D DNEReflectionTexture, used in Life Is Strange).
  • Automatically fix shadows in Unreal Engine games.
  • Apply auto fixes for Unity lights/shadows, specular highlights, reflections, fog, SSAO, etc (start with the templates instead).

hlsltool.py

This is similar to shadertool.py, but works on HLSL shaders instead. It's feature set is more limited than shadertool:

  • Install shaders to the ShaderFixes directory.
  • Attempt to automatically fix common issues in vertex shaders where the output position has been copied, often resulting in halos (Very helpful for Unity games).
  • Apply auto fixes for Unity lights/shadows, specular highlights, reflections, fog, light shafts, etc (start with the template instead).

asmtool.py

This is a port of shadertool.py to work with DX11 assembly shaders, (but internally is more similar to hlsltool and depends on both for some common code). It's feature set is the most limited for now:

  • Install shaders to the ShaderFixes directory.
  • Attempt to automatically fix common issues in vertex shaders where the output position has been copied, often resulting in halos (Very helpful for Unity games).
  • Apply auto fixes for Unity lights/shadows, specular highlights, reflections, fog, light shafts, etc (start with the template instead).

extract_stereo_settings.py

Short python script to extract the table of Stereo settings from the nVidia driver and write them to a CustomSettingNames_en-EN.xml which can be used with nVidia Inspector.

matrix.py

Small Python module to create typical matrices for translation, rotation, scaling and projection in 3D to help me understand the maths behind them.

extract_unity_shaders.py

Python script to parse the compiled output of Unity shaders and pull out all the different variants into separate files, with headers intact.

extract_unity53_shaders.py

Variant of the above for Unity 5.3 and later.

extract_unreal_shaders.py

This script has been abandoned due to considerable complications in the Unreal file formats. It can extract shader names from the Arkham Knight cooked shader cache, but probably won't do anything useful in any other game. Consider using the generic_shader_extractor.py script instead.

generic_shader_extractor.py

This script can extract DX11 shaders from many games. It is known to work with all UE4 games, but not Unity or CryEngine games, and may or may not work with other games. It will not extract any additional metadata for the shaders other than what 3DMigoto can already extract, but is useful for games that only dump shaders on demand / level by level, or games that use GPU specific shaders.

ddsinfo.py

Decodes the header on a DDS file and possibly converts it to PNG (conversion only supported for some DDS formats, extending support as I come across new formats, but I kind of want to rewrite the format support to be more declarative).

For use with Helix Mod: Use GetSampler1FromReg, GetSampler2FromReg or GetSampler3FromReg in a shader section of DX9Settings.ini to extract a texture passed to a shader, press F12 in game to dump it out as Tex1.dds, Tex2.dds or Tex3.dds, then use this tool to decode it's header.

For use with 3DMigoto: Use on .dds files dumped during frame analysis.

interlaced2jps.py

Converts an interlaced image into a jps file

screenshot_archive.py

This script periodically sorts all 3D screenshots into directories for the games they are from and renames them to include the date and time they were taken.

Place it in the Documents\NVStereoscopic3D.IMG directory and run it.

_shaderasm_ & shaderasm.exe

Small C++ project to assemble a shader .txt file. Used by extract_unity_shaders.py to calculate the CRC32 of shaders extracted from Unity games.

calc_shader_crc.py

Small wrapper around shaderasm.exe to calculate a shader's current CRC32.

unity_asset_extractor.py

An alternative to Unity Asset Explorer, to extract assets (currently limited to shaders) from Unity 4 and Unity 5 games in batch.

unity_asset_bundle_extractor.py

Parses Unity asset bundle files from games that use them (currently Unity 5.3+ UnityFS LZ4 & uncompressed variants only) to extract shaders in batch. These files are conceptually similar to the files parsed with unity_asset_extractor.py, but they are distinct in that they use an additional container format, and are typically used for DLC. These may be found in the *_Data/StreamingAssets/Bundles directory of a Unity game. They contain asset files that unity_asset_extractor.py can parse, and it will automatically be called on these files. This script uses a block based on-demand decompression scheme to significantly speed up the process for larger asset bundles.

dx11shaderanalyse.py

Decodes some information in the ISGN & OSGN sections of DX11 shaders.

pyasm.py

Implements shader like semantics in Python, including registers supporting masks and swizzles using a natural syntax, and various shader instructions. Useful to prototype & debug complicated algorithms.

decode_buffer.py

Decodes the given buffer extracted via 3DMigoto's frame analysis feature as both integers and floats.

3dvisionlive_download_button.user.js

User script to add a download button to images on 3D Vision Live.

cleanup_unity_shaders.py

Removes shaders from a Unity game in this git repository that are no longer found amongst the extracted shaders to stop a fix growing endlessly. Use only for games that people should not be running old versions of (like early access). Old shaders will still be in the git history if we need them.

compare_shader_bins.py

This was a quick 'n' dirty means to repair the damage caused to a DX11 assembly shader by the microsoft disassembler by comparing the original and otherwise unmodified reassembled shader binaries to look for differences then patch floating point values in the assembly text to compensate. In some cases this may patch the wrong floating point value, but has worked remarkably well in practice. This script is no longer required as 3DMigoto will now auto repair assembly shaders when they are dumped.

profiles

A couple of scripts to help catalogue the driver profiles and normalise the profile format to make it easier to compare changes between driver versions.

shaderutil.py

Utility library used by shadertool and the shader database.

find_frame_analysis_candidates.py

Provides statistics from a 3DMigoto frame analysis log.txt that may assist in selecting a suitable shader to use as a trigger to start analysis at the more interesting post-processing phase of the frame. Statistics include the percentage of draw calls and dumped render targets would be saved, as well as the total number of times each listed shader is used (not all shaders are listed), and the number of simultaneous render targets used with each listed shader (a series of consecutive shaders with a consistently high number of render targets may indicate the long and uninteresting forward rendering phase of the frame).

photo-gallery

Scripts to statically convert .mpo and .jps files into different viewing formats and create a website displaying them, with links to switch methods.

3dvisionlive.js

Javascript file to embed 3D photos from 3dvisionlive.com in a web page providing links to switch between using the plugin, cross-eyed or distance viewing methods, or anaglyph.

inverse-cs.hlsl

Compute shader that can be injected with 3DMigoto to inverse arbitrary 4x4 matrices. Uses the parallel nature of the GPU to accelerate the inverse, and 3DMigoto can usually restrict this to run once per frame to minimise the performance impact. Extremely useful for inversing matrices to be passed to assembly shaders, where performing an inline inverse is complicated and error prone.

rename2bytecode.sh

Script to rename shaders to use the bytecode hash. Requires a ShaderCache folder containing all replaced shaders dumped with their current hashes in binary form.

rename2embedded.sh

As above, but renames the shaders to use the embedded hash.

update_3dmigoto_symlinks.sh

Updates all 3DMigoto symlinks in the current directory or subdirectories to use the latest version of 3DMigoto (which must be extracted in a directory named 3Dmigoto-x.y.z under 3d-fixes).

custom_shader_cb_live_view

This directory contains a custom shader, font and the corresponding d3dx.ini sections to interpret a constant buffer as floating point values and show them live while in game. This is done entirely on the GPU and uses a geometry shader to generate the text.

get_unity_version.sh

Gets the Unity version of a given executable, or searches for Unity executables within a directory. Pass it SteamApps/common/* to find every Unity game in your collection.

unity_cb_to_hlsl.sh

Translates the Unity global constant buffer definition from a shader (or shaders) into a cbuffer definition for use in a HLSL shader. If multiple shaders are specified, their definitions will be collated and merged together.

matrix.hlsl

Includes functions to inverse a matrix in HLSL, a convinience macro to grab a matrix out of a constant buffer with no resource description, and functions to create the usual array of translation matrices.

stereo_buffer_tests

This directory contains test cases for whether buffers will be stereoised or not with varying combinations of bind flags and creation modes. Compare the results when running with different StereoFlagsDX10.

blender_3dmigoto.py

Addon for Blender to import meshes from 3DMigoto Frame Analysis dumps (analyse_options = dump_vb txt), and export binary vertex & index buffers suitable for re-injection.

3d-fixes's People

Contributors

bo3b avatar darkstarsword avatar earmada8 avatar flugan avatar helifax avatar kurokaze78 avatar leotorrez avatar mx-2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3d-fixes's Issues

3dmigoto-blender Export Error

Hi, I'm sorry to bother you again.

When I use an older version plugin (created by you rather than modified by others), I encounter the following error when attempting to output the model
I aimed to delete the skirt from "polySurface6085_10" and remove the top while keeping the tie. So, I imported the 3DMigoto raw buffers (only importing "polySurface6085_10.ib" and "polySurface6085_10.vb").
Essentially, my objective is to unpack the original models within the game, make modifications, and repack them for the game to read.

However, afterwards, Blender prompts the following error:

Python: Traceback (most recent call last):
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto (2).py", line 1399, in execute
export_3dmigoto(self, context, vb_path, ib_path, fmt_path)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto (2).py", line 1044, in export_3dmigoto
stride = obj['3DMigoto:VBStride']
KeyError: 'bpy_struct[key]: key "3DMigoto:VBStride" not found'

I have uploaded the older version of the plugin I used, and I would greatly appreciate it if you could take the time to help me identify where the issue might be occurring. Thank you very much for your assistance.

Also, my English is not very good, which might make it difficult for you to read. I'm really sorry.
original model&old version plugin&modified model(blender file).zip

Vertex Groups are not importing

I am trying to mod PGR. The character that i am trying to import to blender has vertex groups but the plugin is not importing them. I dont know if it's because it has same offsets.

element[12]:
SemanticName: BLENDWEIGHT
SemanticIndex: 0
Format: R8G8B8A8_UNORM
InputSlot: 0
AlignedByteOffset: 0
InputSlotClass: per-vertex
InstanceDataStepRate: 0

element[13]:
SemanticName: BLENDINDICES
SemanticIndex: 0
Format: R8G8B8A8_UNORM
InputSlot: 0
AlignedByteOffset: 0
InputSlotClass: per-vertex
InstanceDataStepRate: 0

FrameAnalysis.zip

Vertex buffer expansion on export

Hi,

I noticed that when I import a vertex buffer, then export it again, the size of the vertex buffer is enlarged. This might be desired behavior, I do not know, so I thought I would ask.

Looking at this mesh, for example; the original mesh has 2721 vertices, and when imported into Blender, it still has 2721 vertices. The old stable script would output a mesh with 2721 vertices, but the current commit outputs 2786 vertices. The appearance of the mesh seems to be the same.

The first triangle to show a difference is triangle 325, which is at offset 0x3CA in the index buffer. 163,168,167 has been changed to 163,168,169. Vertex 167 and 169 are almost identical, except the tangent vector is now different.

This does not happen with most meshes, but I have found more than a few. So it seems that the script is determining that some vertices need to be duplicated with differing tangent vectors? Is this desired behavior?

Thanks for looking into this!

Import .ib without .vb

hello i've downloaded mod which have .ib models only no .vb
script refuses to import .ib without .vb file how fix this ?

error when exporting 3dmigoto

Game: Power Rangers: Battle for the Grid
Engine: Unity 2019

I get the following error when using the 3dmigoto blender plugin:

Python: Traceback (most recent call last):
File "C:\Users\jubil\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 2610, in execute
export_3dmigoto(self, context, vb_path, ib_path, fmt_path, ini_path)
File "C:\Users\jubil\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 1694, in export_3dmigoto
vertex = blender_vertex_to_3dmigoto_vertex(mesh, obj, blender_lvertex, layout, texcoord_layers, None, translate_normal, translate_tangent)
File "C:\Users\jubil\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 1440, in blender_vertex_to_3dmigoto_vertex
vertex[elem.name] = list(mesh.vertex_colors[elem.name+'.RGB'].data[blender_loop_vertex.index].color)[:3] +
KeyError: 'bpy_prop_collection[key]: key "COLOR.RGB" not found'

It is also worth noting that I'm unable to export the models in a T or A-pose, they instead export in their pose at the time of the frame capture.

Proposal: Blender Plugin to delete .vb when saving .vbX files

Hi,

What would you think of the plugin deleting the old .vb file when it saves a new .vb0 file, in the case of upgrading a mesh from the old .fmt/.ib/.vb to the new .fmt/.ib/.vb0 format? The old .vb file is abandoned at that point, since the .fmt no longer points to it. It is useless, since the new .fmt and .ib files do not correspond to it anymore.

This would save some (modest) disk space, and it would reduce confusion since currently, both file exist side-by-side. In the "Import 3DMigoto raw buffers" menu in Blender, both show up, and the user needs to know which one to select.

Just a small proposal, please feel free to ignore. Thanks!

Two separate drawcalls for mesh. One handles the posing whilst the other handles drawing to the screen.

Hi Ian, just wanted to say thanks for updating the blender script to handle 4D data! Appreciate the work you've put in.

Thought I'd mention this incase you hadn't come across this. But for several games such as Genshin Impact and One Piece Burning Blood, there are multiple draw calls that handle the same mesh. One drawcall will have a specific vertex shader with two vertex buffers (vb0 with position, normal, tangent, and vb1 with blendindices and blendweight data). Both of these buffers appear to have a pointlist topology. When this VS is set to skip, the mesh in-game will stop being animated properly so I take it this is the drawcall that's posing the mesh.

The second draw call will have again two vertex buffers, with position, normal, tangent in one buffer, and texcoord and texcoord1 in the other. But this time the txt/bin files will have a pixel shader in addition to a vertex shader in the name as you would normally expect and a standard trianglelist topology. Now setting either of these to skip, will hide the mesh in-game.

Is this something you've come across, and would you happen to know how we can use data from these two drawcalls to create mods?

Blender 4.2 LTS is on the horizon and bpy api changes loom over us-

I have been trying to crack down on this issue and likely will get a working solution soon but I am not too skillful on the bpy side of things. However I would like to provide the information I've gathered so far.

When it comes to importing, the following changes broke the current implementation:

https://developer.blender.org/docs/release_notes/4.1/python_api/#mesh

here a short video to illustrate the changes: https://www.youtube.com/watch?v=WT29Hyv2XX8

namely the removal of normal related functions in favor of the new smooth modifier workflow.

To solve the issue we require a vector implementation of custom_attribute_float which the plugin currently lacks, I might have to crack down on that issue first before attempting to continue... Because using the built in attribute functions might break in past versions of blender.

The question that comes to mind is, how much backwards compatibility should we account for in the upcoming 4.2 version of the plugin?

When it comes to exporting meshes out of blender... issues will come again but I will research on that after solving the import

The reference updated plugin I was using as guide to fix our issue was the following: https://projects.blender.org/extensions/io_mesh_stl/commit/079f7d1f218a44757bcd2cdc23fdb180a2059647

Issue installing addons for Both blender 2.8 and 2.79

I tried to install Doa6 softbody to blender 2.8 it gives me an error even when I run the script too works fine on 2.79
b18a77aaf6fd2e0714bee445d66c827d

Then I tried to install 3Dmigoto to 2.79 it also doesn't work so I'm stuck on what to do
4c0cbb83e00014ef33718a4158f9d33b
Maybe I did something wrong?

question about filter_index when resource itself changed

sorry for making issue about it but i cant find answer anywhere i searched , for example if i use filter_index like this it works
i can load ini param in shader and use that to check

[ShaderOverrideTest]
hash=...
x15=ps-t0
checktextureoverride=ps-t0
[TextureOverrideTest]
hash=...
filter_index=1111

but if i change Test itself then it no longer match ? is it because resource changed so hash is different now? but even trying new resource hash (like what i can get from framedump) wouldnt work or is filter_index is not meant to work when resource changed or im doing something wrong?

[ShaderOverrideTest]
hash=...
x15=ps-t0
[TextureOverrideTest]
hash=...
filter_index=1111
this=ResourceTest
[ResourceTest]
filename=test.dds

import error

when i import ib and vb file it does not look for the fmt making me unable to import

Pad() is slow for large exports.

def pad(self, data, val):
padding = format_components(self.Format) - len(data)
assert(padding >= 0)
return data + [val]*padding

The current pad() function is very for very large exports. We did some profiling with cProfiler, and investigated some alternatives to the Concatenate Operator. We found this was a good alternative.

    def pad(self, data, val):
        padding = self.format_len - len(data)
        assert(padding >= 0)
        data.extend([val]*padding)
        return data

The profiler says this is only about 50% faster for this individual execution, but it seems to improve the time overall quite a lot more.
As this only really shows in large exports as a major slowdown, it wasn't really necessary, but we ended up doing a lot of exports while developing some new tools and it became bothersome.

We just wanted to report back to you, We were actually hoping for a much larger speedup when we started, but we couldn't think of a better way to generate the IBs or loop over the custom properties. This was the best we could do without taking the dive into a custom c/c++ implementation (which was honestly beyond our depth anyways for the blender API).

Thanks for this awesome tool!

Questions about transparency

Hello! Apologies in advance if this isn't the correct place to ask about it, but I have been struggling with getting transparency functional in 3dmigoto for nearly a year now and was wondering if you had any insights.

Broadly speaking, I have had two major issues when using transparency with 3dmigoto:

1) Being able to control the amount and location of transparency on an object
2) Handling how draw call order affects what parts of the object are drawn first/last


For 1), as I understand it there are two main ways to create a custom shader to make an object transparent - you can use blend_factor to make the entire part a uniform transparency, or you can you can use one of the other blend modes to make it dependent on the state of the render target outputs (such as SRC_ALPHA, SRC1_ALPHA, etc).

For the blend_factor method, as far as I know there is no way to set the factor either through a texture or to have it span a range of numbers so you have to "sacrifice" an entire part to be a uniform transparency (which can be a problem in games like genshin where a significant number of models are drawn with only 1-2 parts) and can't do things like gradients.

For the method that uses the render target state, I have found that a large number of games I mod use all of the o0 and o1 channels already (x,y,z,w), so any attempt to also use them for transparency results in it either not working or a clash between the "meaning" of the channel (e.g. it will become transparent but also glow).

The only general method I have found so far that works everywhere is to pass the current render target into the shader and manually blend in hlsl using something like lerp, but that adds a bunch of extra complexity and also loses some of the benefits of doing it in OM as well.

So, I was wondering if either a) there is a way to set the blend_factor dynamically based on something like a texture or equation or b) if it is possible to using things like SRC_ALPHA even when all the channels are full (maybe by moving the channel? as far as I can tell from the docs only o0 and o1 are supported for blend). Or perhaps c), an easier way that I might be overlooking?


For 2), the issue lies in the order parts are drawn. First, I am running under the assumption that 3dmigoto is unable to change the order objects are drawn in the frame, or delay certain calls until others have completed (I haven't seen anything in the code or all my searching in the documentation/forums, though I may have missed it). This means we are "stuck" with the order the game decides to draw objects in, which becomes an issue when trying to implement transparency.

The key issue I am running into is that because I do not have control of the order things are drawn in, there is no guarantee that a transparent object will be drawn after an opaque object that lies behind it. So when it comes time to "blend" the transparent object with the background, the background is all-black and it becomes transparent to the wrong thing (e.g. a character's clothing being drawn before their base model so you "see-through" the model to the background, or the character being drawn before the scenery behind them is drawn).

In some cases it is possible to shift around the transparent part to another portion of the model which is drawn after the rest has been drawn, but not always - sometimes different parts of the model have different properties (glow, skin shader, etc), sometimes the draw order changes depending on the scene, sometimes the vertex groups you need are only on a single part, or sometimes the model only has a small number of parts (and as far as I know you can't blend a transparent part with an opaque one on the same call?). And it usually doesn't fix blending with the background at all.

I know there are some methods of draw-order independent transparency, is 3dmigoto able to use/activate any of them?

This is the issue I am struggling most with, and have came up with 3 possible solutions but have ran into difficulties with each of them:

a) Draw a part in two passes - basically, draw the opaque portion first in a PS, then pass that PS output to a second PS which manually blends the transparent part with the opaque one. This would let you have both the opaque and transparent portion on the same draw call and guarantees no draw order issues within that call, though it wouldn't fix order issue with other parts or the background. I have not yet found a way to pass the output from one PS into a second one though - from all my testing, running multiple PS has them all execute simultaneously and not in sequence (e.g. no way to make calculations of some vertices dependent on the results from other ones)

b) Output the opaque and transparent data separately, and then do the blending of the transparent part later in the frame once more things have been drawn (or even 1 frame later with the result of the previous frame, though that would create a 1 frame lag for transparency). This seems to be the most hopeful, but I have been running into issues with adding more render targets (games either ignore the added ones, or the added ones don't clear properly between frames and accumulate junk data). It also isn't a very general method since you need to identify when in the frame to actually do the blending which would vary from game to game (since many games flip the screen at some point when drawing). This method also has issues since you need to find a way to distinguish between objects that are in front or behind the character yourself since you are doing the blend manually and can't rely on the depth data unless you store it somehow.

c) Take all the data (vb/ib/cb/shader/etc) from the draw call and move the entire call later in the frame by creating a new custom shader/call. I haven't found a way to "insert" new calls, and even if we override later calls parts with all the relevant data parts still seem to be missing (e.g. I can't find any way to turn on glow if the original shader had it and the new one does not). This also has the issue that often later frames depend on the output from earlier ones, so by moving the entire frame we potentially deprive later shaders of the information they need to function.

Do you think any of these methods are viable? Or is there a simpler method that I am overlooking?


Apologies for the long wall of text, but any insights you have would be appreciated!

Can't import fmt with 4D Position from WARRIORS OROCHI 4

Try to import some model from WARRIORS OROCHI 4 here.
I have some .fmt .ib .vb exported. (Athena's helmet, files attached below)
Both '0.ib' and '2.ib' imported correctly.
But importing '1.ib' got error 'Positions are 4D'.
Inside 1.fmt I found the format for position is 'R32G32B32A32_FLOAT'.
I guess these are cloth and hair and have special usage for the extra dimension.
Some settings are needed to omit the extra dimension.
00000.zip

3dmigoto support blender 2.8X?

can you update blender_3dmigoto to support blender 2.8X, i cant enable in blender 2.8! i got error

Properties: bpy.data.window_managers["WinMan"].addon_search = "3d"
Error: Traceback (most recent call last):
File "C:\Program Files\blender\2.80\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Users\Tayswell\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\blender_3dmigoto.py", line 38, in
from bpy_extras.io_utils import unpack_list, ImportHelper, ExportHelper, orientation_helper_factory, axis_conversion
ImportError: cannot import name 'orientation_helper_factory' from 'bpy_extras.io_utils' (C:\Program Files\blender\2.80\scripts\modules\bpy_extras\io_utils.py)

Error: Traceback (most recent call last):
File "C:\Program Files\blender\2.80\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Users\Tayswell\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\blender_3dmigoto.py", line 38, in
from bpy_extras.io_utils import unpack_list, ImportHelper, ExportHelper, orientation_helper_factory, axis_conversion
ImportError: cannot import name 'orientation_helper_factory' from 'bpy_extras.io_utils' (C:\Program Files\blender\2.80\scripts\modules\bpy_extras\io_utils.py)

Error: Traceback (most recent call last):
File "C:\Program Files\blender\2.80\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Users\Tayswell\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\blender_3dmigoto.py", line 38, in
from bpy_extras.io_utils import unpack_list, ImportHelper, ExportHelper, orientation_helper_factory, axis_conversion
ImportError: cannot import name 'orientation_helper_factory' from 'bpy_extras.io_utils' (C:\Program Files\blender\2.80\scripts\modules\bpy_extras\io_utils.py)

Did I input the wrong argument?

I saw your reply in DerPopo/UABE which is talking about how to extract shader of Unity.
I just run the unity_asset_extractor.py with the asset file I want to see and then show up error.
File "unity_asset_extractor.py", line 633, in <module>
main()
File "unity_asset_extractor.py", line 628, in main
analyse(open(file, 'rb'))
File "unity_asset_extractor.py", line 592, in analyse
assert(os.fstat(file.fileno()).st_size == file_len)
AssertionError

Feed asset file to unity_asset_extractor.py and get shader.decompressed right?
Then feed shader.decompressed to extract_unity55_shaders.py.
Did I misunderstand anything?

Also try unity_asset_bundle_extractor.py, still get the error.
File "unity_asset_bundle_extractor.py", line 228, in <module>
main()
File "unity_asset_bundle_extractor.py", line 223, in main
analyse(open(file, 'rb'))
File "unity_asset_bundle_extractor.py", line 176, in analyse
assert(data_header.read(16) == b'\0' * 16)
AttributeError: 'bytes' object has no attribute 'read'

Yup... by the way it's 5.6 version asset.

Missing ib file when exporting

When exporting using the Blender plugin, I get a vb, vb0, vgmap, and fmt file, but no ib file. I'm using Blender 3.6 with the latest version of the plugin. The model is imported into Blender as an ib + vb file.

Blender 4.0 breaks blender_3dmigoto.py

Good afternoon, the recent update has removed vertex attributes in the form that are used in the plugin in favor of their attribute api. I Chat-GPT'd my way through the issue to try and find a solution myself and arrived to color_attributes.

image

here are the 3 functions I've updated with the suggested code. I don't comprehend in full what the tool is doing in all these steps hence why I didn't go for a pull request. But here are the 3 functions I had to update in order to make the export work once more.

# This loads unknown data from the vertex buffers as vertex layers
def import_vertex_layers(mesh, obj, vertex_layers):
    for (element_name, data) in sorted(vertex_layers.items()):
        dim = len(data[0])
        cmap = {0: 'x', 1: 'y', 2: 'z', 3: 'w'}
        for component in range(dim):

            if dim != 1 or element_name.find('.') == -1:
                layer_name = '%s.%s' % (element_name, cmap[component])
            else:
                layer_name = element_name

            if type(data[0][0]) == int:
                # Create an integer type custom vertex attribute
                layer = mesh.color_attributes.new(name=layer_name, type='INT')
                for v in mesh.vertices:
                    val = data[v.index][component]
                    # Set the integer value for each vertex
                    layer.data[v.index] = val
            elif type(data[0][0]) == float:
                # Create a float type custom vertex attribute
                layer = mesh.color_attributes.new(name=layer_name, type='FLOAT')
                for v in mesh.vertices:
                    # Set the float value for each vertex
                    layer.data[v.index] = data[v.index][component]
            else:
                raise ValueError('BUG: Bad layer type %s' % type(data[0][0]))
def blender_vertex_to_3dmigoto_vertex(mesh, obj, blender_loop_vertex, layout, texcoords, blender_vertex=None):
    if blender_loop_vertex is not None:
        blender_vertex = mesh.vertices[blender_loop_vertex.vertex_index]
    vertex = {}
    seen_offsets = set()

    # TODO: Warn if vertex is in too many vertex groups for this layout,
    # ignoring groups with weight=0.0
    vertex_groups = sorted(blender_vertex.groups, key=lambda x: x.weight, reverse=True)

    for elem in layout:
        if elem.InputSlotClass != 'per-vertex':
            continue

        if (elem.InputSlot, elem.AlignedByteOffset) in seen_offsets:
            continue
        seen_offsets.add((elem.InputSlot, elem.AlignedByteOffset))

        semantic_translations = layout.get_semantic_remap()
        translated_elem_name, translated_elem_index = \
                semantic_translations.get(elem.name, (elem.name, elem.SemanticIndex))

        # Some games don't follow the official DirectX UPPERCASE semantic naming convention:
        translated_elem_name = translated_elem_name.upper()
        if translated_elem_name == 'POSITION':
            vertex[elem.name] = list(blender_vertex.co)
            if 'POSITION.w' in mesh.color_attributes:
                w_attribute = mesh.color_attributes['POSITION.w']
                vertex[elem.name].append(w_attribute.data[blender_loop_vertex.vertex_index])
            else:
                vertex[elem.name] += [1.0]
            # Handle POSITION.w attribute if available
        elif translated_elem_name.startswith('COLOR'):
            color_attr_name = elem.name if elem.name in mesh.vertex_colors else elem.name + '.RGB'
            color_attr = mesh.color_attributes.get(color_attr_name)
            if color_attr:
                vertex[elem.name] = list(color_attr.data[blender_loop_vertex.index])
                if color_attr_name != elem.name:
                    alpha_attr = mesh.color_attributes[color_attr_name + '.A']
                    vertex[elem.name].append(alpha_attr.data[blender_loop_vertex.index][0])
        elif translated_elem_name == 'NORMAL':
            if 'NORMAL.w' in mesh.color_attributes:
                normal_w_attribute = mesh.color_attributes['NORMAL.w']
                vertex[elem.name] = list(blender_loop_vertex.normal) + \
                    [normal_w_attribute.data[blender_loop_vertex.vertex_index]]
            elif blender_loop_vertex:
                vertex[elem.name] = elem.pad(list(blender_loop_vertex.normal), 0.0)
            else:
                vertex[elem.name] = elem.pad(list(blender_vertex.normal), 0.0)
        elif translated_elem_name.startswith('TANGENT'):
            # DOAXVV has +1/-1 in the 4th component. Not positive what this is,
            # but guessing maybe the bitangent sign? Not even sure it is used...
            # FIXME: Other games
            if blender_loop_vertex:
                vertex[elem.name] = elem.pad(list(blender_loop_vertex.tangent), blender_loop_vertex.bitangent_sign)
            else:
                # XXX Blender doesn't save tangents outside of loops, so unless
                # we save these somewhere custom when importing they are
                # effectively lost. We could potentially calculate a tangent
                # from blender_vertex.normal, but there is probably little
                # point given that normal will also likely be garbage since it
                # wasn't imported from the mesh.
                pass
        elif translated_elem_name.startswith('BINORMAL'):
            # Some DOA6 meshes (skirts) use BINORMAL, but I'm not certain it is
            # actually the binormal. These meshes are weird though, since they
            # use 4 dimensional positions and normals, so they aren't something
            # we can really deal with at all. Therefore, the below is untested,
            # FIXME: So find a mesh where this is actually the binormal,
            # uncomment the below code and test.
            # normal = blender_loop_vertex.normal
            # tangent = blender_loop_vertex.tangent
            # binormal = numpy.cross(normal, tangent)
            # XXX: Does the binormal need to be normalised to a unit vector?
            # binormal = binormal / numpy.linalg.norm(binormal)
            # vertex[elem.name] = elem.pad(list(binormal), 0.0)
            pass
        elif translated_elem_name.startswith('BLENDINDICES'):
            i = translated_elem_index * 4
            vertex[elem.name] = elem.pad([ x.group for x in vertex_groups[i:i+4] ], 0)
        elif translated_elem_name.startswith('BLENDWEIGHT'):
            # TODO: Warn if vertex is in too many vertex groups for this layout
            i = translated_elem_index * 4
            vertex[elem.name] = elem.pad([ x.weight for x in vertex_groups[i:i+4] ], 0.0)
        elif translated_elem_name.startswith('TEXCOORD') and elem.is_float():
            # FIXME: Handle texcoords of other dimensions
            uvs = []
            for uv_name in ('%s.xy' % elem.remapped_name, '%s.zw' % elem.remapped_name):
                if uv_name in texcoords:
                    uvs += list(texcoords[uv_name][blender_loop_vertex.index])
            # Handle 1D + 3D TEXCOORDs. Order is important - 1D TEXCOORDs won't
            # match anything in above loop so only .x below, 3D TEXCOORDS will
            # have processed .xy part above, and .z part below
            for uv_name in ('%s.x' % elem.remapped_name, '%s.z' % elem.remapped_name):
                if uv_name in texcoords:
                    uvs += [texcoords[uv_name][blender_loop_vertex.index].x]
            vertex[elem.name] = uvs
        else:
            # Unhandled semantics are saved in vertex layers
            data = []
            for component in 'xyzw':
                layer_name = '%s.%s' % (elem.name, component)
                if layer_name in mesh.color_attributes:
                    data.append(mesh.color_attributes[layer_name].data[blender_loop_vertex.vertex_index])
            if data:
                vertex[elem.name] = data

        if elem.name not in vertex:
            print('NOTICE: Unhandled vertex element: %s' % elem.name)
        #else:
        #    print('%s: %s' % (elem.name, repr(vertex[elem.name])))

    return vertex
def blender_vertex_to_3dmigoto_vertex_outline(mesh, obj, blender_loop_vertex, layout, texcoords, export_Outline):
    blender_vertex = mesh.vertices[blender_loop_vertex.vertex_index]
    pos = list(blender_vertex.undeformed_co)
    blp_normal = list(blender_loop_vertex.normal)
    vertex = {}
    seen_offsets = set()

    # TODO: Warn if vertex is in too many vertex groups for this layout,
    # ignoring groups with weight=0.0
    vertex_groups = sorted(blender_vertex.groups, key=lambda x: x.weight, reverse=True)

    for elem in layout:
        if elem.InputSlotClass != 'per-vertex':
            continue

        if (elem.InputSlot, elem.AlignedByteOffset) in seen_offsets:
            continue
        seen_offsets.add((elem.InputSlot, elem.AlignedByteOffset))

        if elem.name == 'POSITION':
            pos = list(blender_vertex.co)

            if 'POSITION.w' in mesh.color_attributes:
                position_w_attr = mesh.color_attributes['POSITION.w']
                vertex[elem.name] = pos + [position_w_attr.data[blender_loop_vertex.vertex_index]]
            else:
                vertex[elem.name] = pos + [1.0]
             # Handling if 'POSITION.w' attribute is not found
        elif elem.name.startswith('COLOR'):
            if elem.name in mesh.vertex_colors:
                vertex[elem.name] = elem.clip(list(mesh.vertex_colors[elem.name].data[blender_loop_vertex.index].color))
            else:
                try:
                    vertex[elem.name] = list(mesh.vertex_colors[elem.name+'.RGB'].data[blender_loop_vertex.index].color)[:3] + \
                                            [mesh.vertex_colors[elem.name+'.A'].data[blender_loop_vertex.index].color[0]]
                except KeyError:
                    raise Fatal("ERROR: Unable to find COLOR property. Ensure the model you are exporting has a color attribute (of type Face Corner/Byte Color) called COLOR")
        elif elem.name == 'NORMAL':
            vertex[elem.name] = elem.pad(blp_normal, 0.0)
        elif elem.name.startswith('TANGENT'):
            vertex[elem.name] = elem.pad(export_Outline.get(blender_loop_vertex.vertex_index, blp_normal), blender_loop_vertex.bitangent_sign)
        elif elem.name.startswith('BINORMAL'):
            pass
        elif elem.name.startswith('BLENDINDICES'):
            i = elem.SemanticIndex * 4
            vertex[elem.name] = elem.pad([ x.group for x in vertex_groups[i:i+4] ], 0)
        elif elem.name.startswith('BLENDWEIGHT'):
            # TODO: Warn if vertex is in too many vertex groups for this layout
            i = elem.SemanticIndex * 4
            vertex[elem.name] = elem.pad([ x.weight for x in vertex_groups[i:i+4] ], 0.0)
        elif elem.name.startswith('TEXCOORD') and elem.is_float():
            # FIXME: Handle texcoords of other dimensions
            uvs = []
            for uv_name in ('%s.xy' % elem.name, '%s.zw' % elem.name):
                if uv_name in texcoords:
                    uvs += list(texcoords[uv_name][blender_loop_vertex.index])

            vertex[elem.name] = uvs
        else:
            # Unhandled semantics are saved in vertex layers
            data = []
            for component in 'xyzw':
                layer_name = '%s.%s' % (elem.name, component)
                if layer_name in mesh.color_attributes:
                    data.append(mesh.color_attributes[layer_name].data[blender_loop_vertex.vertex_index])
            if data:
                vertex[elem.name] = data

        if elem.name not in vertex:
            print('NOTICE: Unhandled vertex element: %s' % elem.name)

    return vertex

Apologies if this was already taking into consideration before the time of my post.

Blender 4.0 Patch Notes: https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Python_API

match_first_index does not work as before

after update v1.21 my DOA 6 mods are broken, some costumes are work well but mostly are not. I try to follow your tutorial on youtube, but that doesn't work as before.

"Only draw calls using a single vertex buffer are supported"

"Only draw calls using a single vertex buffer and a single index buffer are supported for now"
Please fix this blender addon error. It would take modding other games to a whole new level. We could use 3Dmigoto to mod even online games with barely any risk of a ban.

blender_3dmigoto.py import issue

I can't import vb.txt and ib.txt using the blender_3dmigoto.py add-on.
It says "Only draw calls using a single vertex buffer and a single index are supported now"

Import Error:AssertionError

Happy New Year
Please accept my apologies for disturbing you at the beginning of the year.
I'm a novice modder with no programming experience. This is my first time using 3Dmigoto to create a mod. I've installed the 3Dmigoto plugin in Blender version 3.33. When attempting to import the ib and vb model, I encountered the following error message.

Python: Traceback (most recent call last):
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 2516, in execute
import_3dmigoto_raw_buffers(self, context, fmt_path, fmt_path, vb_path=vb_path, ib_path=ib_path, vgmap_path=vgmap_path, **migoto_raw_import_options)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 2441, in import_3dmigoto_raw_buffers
obj = import_3dmigoto(operator, context, paths, merge_meshes=False, **kwargs)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 1305, in import_3dmigoto
obj.append(import_3dmigoto_vb_ib(operator, context, [p], **kwargs))
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 1323, in import_3dmigoto_vb_ib
vb, ib, name, pose_path = load_3dmigoto_mesh(operator, paths)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 928, in load_3dmigoto_mesh
return load_3dmigoto_mesh_bin(operator, vb_paths, ib_paths, pose_path)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 910, in load_3dmigoto_mesh_bin
vb.parse_vb_bin(vb_paths[0], use_drawcall_range)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 618, in parse_vb_bin
self.merge_vbs(self.vbs)
File "C:\Users\ROG\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blender_3dmigoto.py", line 670, in merge_vbs
assert(len(vb.vertices) == self.vertex_count)
AssertionError

The model is known to function properly within 3Dmigoto (game: The Legend of Heroes: Trails into Reverie), so I'm hoping you can assist in determining whether the issue lies with my computer's environment or with the model itself.
Once again, thank you very much for your plugin.
AlisaKimono.zip

I installed the plugin and still get this huge error when importing

Done everything like on your youtube video but when I import I get an error

Python: Traceback (most recent call last):
File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 1422, in execute
import_3dmigoto(self, context, paths, **keywords)
File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 952, in import_3dmigoto
obj.append(import_3dmigoto_vb_ib(operator, context, [p], **kwargs))
File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 993, in import_3dmigoto_vb_ib
import_vertex_groups(mesh, obj, blend_indices, blend_weights)
File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 731, in import_vertex_groups
assert(len(blend_indices) == len(blend_weights))
AssertionError

Certain extracted models can't be imported to blender due to missing or undefined SemanticNames

This is a continuation of the blender addon issue
#10

The change you made fixes that issue and the script still works as intended.

However, I still can't import these problematic models successfully.

I send here a zip file with a FrameAnalysis which supposedly contains a character's hair (from the game Tekken 7)
FrameAnalysis-2023-12-13-154509.zip

Inside a problematic vb0 file
imagen
Each element's SemanticName are not defined correctly or missing and appear as ATTRIBUTE.
Perhaps this issue has to do with how 3DMigoto (or my mod manager) extracts the vb0 files.

I have sometimes had success importing problematic models by manually renaming the vb0.
For example, if I open a vb0 file from a correct working extracted model, I noticed that the elements which have
"Format: R32G32B32_FLOAT" tend to have "SemanticName: TEXCOORD" instead of ATTRIBUTE

So I would manually rename elements with
R32G32B32_FLOAT to TEXCOORD
R8G8B8A8_UNORM to UNORM
and so on, but this is very inconsistent.

In the example zip file I gave you, I later got the model to work by manually renaming element[6] to POSITION

element[6]:
  SemanticName: POSITION
  SemanticIndex: 0
  Format: R32G32B32_FLOAT

and also did a search and replace... on notepad to find ATTRIBUTE: and replace for POSITION:

imagen

My blender version is 2.93.0
Also, here is my d3dx.ini and I'm using 3DMigoto 1.3.16
d3dx.zip

model position in world space (?)

can addon import models in same positions as world space (im not sure thats what it is called ) i only know about pose cb import but not sure if thats what needed here
or does 3DMigoto Framedump have such data ? i only checked few places but dont think i found anything
my end goal is just being able to import framedump with all models positoned (location) in same way as in-game

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.