OpenMLTD / MLTDTools

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

Sphere maps and cube maps #29

Closed Sozuke closed 3 years ago

Sozuke commented 3 years ago

I discovered that some models bring their sphere map textures and cubemaps (dress and accessory glow) assetstudio doesn't export them, but utinyripper does

For example the kotoha dress https://youtu.be/LkkjYK43jLs

hozuki commented 3 years ago

What is the difference without the cubemaps? Do you mean these?

image

Sozuke commented 3 years ago

for some reason that kotoha dress has a spa but not cubemaps (they were exported in the same folder as the textures), but elena has cubemaps (they were exported in a folder called cubemaps), also, some objects refer to totally dark textures, not I understand their purpose

hozuki commented 3 years ago

Hmm, this is why there is a "cubemap". The shader used in the model (Custom_Chr_Basic) has a parameter called "_Cube" with type Cube (which means cubemap in Unity Cg shaders). Its description is "reflection cubemap". So obviously(?) it is an envmap. Its default value is "_Skybox" which points to the skybox cubemap assigned in the scene. UtinyRipper must be intelligent enough to consider that as a resource reference and tries to find the referenced cubemap. Anyway, since we are using the default shaders provided by MMD/MMM, the cubemaps are not used.

hozuki commented 3 years ago

Some newer models (e.g. cb_sr077_a) also have cubemaps. But as I explained above cubemaps are not used in PMX materials. So I think we can close this issue for now. Maybe there will be someone who use these models with cubemap-enabled MME shaders. Let's solve the issue then.