OpenMLTD / MLTDTools

Tools for THE iDOLM@STER Million Live! Theater Days (MLTD/MiriShita/ミリシタ) / 偶像大师百万演唱会剧场时光工具箱
BSD 3-Clause Clear License
142 stars 17 forks source link

questions and suggestions x2 #25

Open Sozuke opened 4 years ago

Sozuke commented 4 years ago

Seeing the publication of LudoMako encouraged me to write.

as for the dances with "+" in the name, just rename them as a normal dance (for example flyer+ change to flyers the dances keep the same position but from dance 6 on you can't read it in any position)

for some reason when i load the exported vmd from million dance they load me to 100 times their original size (even when i turn off the resize option) and the final one is because my pc uses "." to divide the decimals instead of "," (with time i got used to that and i can already take out in dl, but they are still very heavy)

the camera can be used in vmd just by opening the vmd in miku moving and exporting it, then in mmd load and multiply the position to 0.01 and add the fov +30 (for some reason in vmd it is exported to 0 from million dance) example: https://www.youtube.com/watch?v=36CUwCLk53w

also, I discovered that the game's cubemaps (hairh.png) can be used by adding them as test subtexts exporting directly from noesis but the models generated in million dance don't have them (I don't know if I'm using an outdated version) example: https://www.youtube.com/watch?v=7M2hWyGcFwM (I still have some problems with the textures)

hozuki commented 4 years ago

Thank you for testing.

So it's great: "+" motions can be used almost directly. Current file name restrictions aim to help user select the correct file quickly. Easing the restrictions and extending available positions will do the job.

The wrong scaling is strange. The "idol height" textbox should be treated correctly for different locales. It is supposed to be formatted and parsed using current UI locale set in Region and Language Options in Control Panel. (On my computer the decimal separator is dot ".".) This behavior is used to fix #4 #6, which was reported as fixed. But obviously something went wrong again. I think I should change the unit to centimeter to avoid confusion (and the annoying decimal separator differences).

It's good to see that converting in MMM also works (which means less code to maintain XD). FOV 0 for VMD cameras is a bug caused by this line: https://github.com/OpenMLTD/MLTDTools/blob/6b29e2467a5a9c11bb03241aad01183162afcf32/src/MillionDance/FMain.cs#L446 (will be fixed later). Well I didn't test VMD cameras though. :(

I don't know where the hair highlights should be positioned, so they are not overlayed to the hair textures now. Would you like to share how (using any software is okay)?

And thank you for mentioning Noesis. I didn't know this software before.

Sozuke commented 4 years ago

https://sta.sh/0wbxyyih0qi

Here is a prepared haruka model (not yet finished)

I doubled the hair material and put "hairh.png" as sub texture (in the same box as the spa and sph)

As for the eye glow, I duplicated both materials and replaced the original texture (eyeL and eyeR) with eyeh.png and rotated the uv-map 20 degrees to the right (or left?, I still have trouble distinguishing them)

hozuki commented 4 years ago

Sorry, when I tried to download that model yesterday, it showed up "the page doesn't exist". So just forget the solid model. :(

What I'm confused is: the hair texture is 512x512px but the hightlight texture is 256x256px. I have tried two naive ways to bake the texture:

  1. scale the hightlight texture to 512x512 and overlay ("decal") to the hair texture;
  2. overlay the highlight texture to the 4 corners (256x256 each), with possible rotations.

None of these worked. How does setting a subtexture solve this problem? For example, what will the baked texture (final hair texture with highlights) look like?

kdru commented 4 years ago

Hair mesh has two UV’s, one for normal hair texture, another one for highlights MillionDance exports only one UV layer, for this reason highlight texture can’t be applied

hozuki commented 4 years ago

@kdru Thank you for the tip. I wasn't aware of that. 😮 Trying to integrate it now.

Sozuke commented 4 years ago

Sorry :"3, there:

https://drive.google.com/file/d/113aFe6b6n4Nigkl7QoyE0_ZMJ_GwuyzF/view?usp=drivesdk

Sozuke commented 4 years ago

AAAAAAAH

I just found out that the glow map solo is right after the regular dance,

So the dance finishes and right after that he starts the solo

(The dance ends at frame 4490 and the solo starts at frame 4500)

LudoMako commented 4 years ago

the hair tex simply uses uv2, hence why they're not loaded directly. Eeyes uses veretx colors for the shadow, and the eye dots uses same uv as the regular eyes, i just have no idea how the game makes them fade out when the camera angle changes.

Sozuke commented 4 years ago

I guess the hair uses a spherical cubemap (I don't know how it works) and to make it work with shader the added a uv map that is used as a kind of tangent

Same with the eyes but I guess they're uv morphs

(I think asset studio can't export those kinds of morphs)

hozuki commented 4 years ago

@LudoMako What @Sozuke says is generally right. They do have those kinds of inputs in hair and eye shaders. I don't think it can be accomplished with vanilla MMD (e.g. secondary texture & UV, and tangents computed at runtime). It should require MME or something like that. Unfortunately, I don't have experience using that. For the hair highlights, it can't be done with a simple spherical map. I tried to draw the highlights over hair texture (in Unity) and the result does not look very good. It is similar for the eye highlights: it is possible to use UV morph in MMD but not secondary texture. I also searched how to create a "decal" effect in MMD. For now the only way is duplicating the mesh and assign a new material. This method would be problematic for both hair (it is used physical animation) and eyes (if you want to create UV morph).

kdru commented 4 years ago

@hozuki Not really, the hair indeed uses 2 UVs, vanilla mmd can use it if you duplicate hair mesh and use highlight texture as subtex for it. And actually, no need to use entire hair mesh to create those highlights. 1 NewCanvas2 11 NewCanvas22

hozuki commented 4 years ago

@kdru Thank you. I was confused about the "sub-texture" option before your explanation.

But this method has two problems. First, it requires manual vertex duplication and removal. Second, head models may have highlights in the parts affected by physics, for example Kotoha: image

The first problem may be solved by searching affected faces and duplicating them. The result will be one or more static meshes. I can't think of a nice solution to the second one for now.

kdru commented 4 years ago

Not really a problem as mesh saves weights O: So it will move with normal hair mesh 🤔 As for locating highlights mesh parts, you can apply texture, select at least one poly with highlight part and hit ctrl+x, it will select all connected polygons and you can separate them easily

Btw, is there any way I can contact you on discord or something like this?

hozuki commented 4 years ago

@kdru Thanks for the help. It seems there is a little misunderstanding: you were talking from a user's perspective (manually using external tools to do the postprocessing) and I was talking from a developer's perspective (finishing all steps in the program without intervention). Anyway, your idea does work correctly. I'll push the code soon. image

I have a Discord account but I don't log on frequently...