Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HazzyDevil opened this issue Oct 4, 2023 · 1 comment

Comments

@HazzyDevil
Copy link

HazzyDevil commented Oct 4, 2023

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?

@HazzyDevil HazzyDevil changed the title Two separate drawcalls mesh. One handles the posing whilst the other handles drawing to the screen. Two separate drawcalls for mesh. One handles the posing whilst the other handles drawing to the screen. Oct 4, 2023
@DarkStarSword
Copy link
Owner

DarkStarSword commented Oct 4, 2023

Yes, I'm actually working on this exact conundrum with @Hetaneko for a Unity game in another thread - Google tells me that Genshin Impact is a Unity game, so I expect it will likely be following the same pattern I'm looking at. I'm not positive what engine One Piece Burning Blood is using - based on the files listed in the depot I can see in steamdb I gather it is something custom or rare, but from what you say it must be doing something pretty similar, so hopefully whatever solution we come up with for Unity will help there too.

Take a look over my analysis from tonight and see it it lines up with the games you are looking at - if so, this should be enough to get the mesh + weights into Blender (still tbd how we get them back into the game):
#19 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants