Advertisement
DSX8

SmashU Material Data (WIP)

Aug 18th, 2016
2,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.30 KB | None | 0 0
  1. Material Source (Start of every material data)
  2.  
  3. Note: Everything here has been documented from stage files first. Characters, Items, and Trophies will be added slowly over time.
  4. Credit to GFD for finding other types of material data.
  5. Credit to SMG for 2 extra bytes for material type "4th byte"
  6.  
  7. Material Type:
  8. 4 = ???
  9. 9 = Character/Trophy Material
  10. A = Stage Material
  11. B = Effect Material
  12. E = Environment Material
  13.  
  14. Lighting Channel(??):
  15. 0 = no colors
  16. 1 = Register Color
  17. 2 = Vertex Color/Alpha + False Color (not affected by light_set_param)
  18. 3 = Vertex Color + Register Alpha
  19. 4 = Vertex Color/Alpha + True Color
  20. 5 = ??
  21. 6 = ??
  22. 7 = ??
  23. 8 = ??
  24. A = ??
  25. B = ??
  26. C = fresnelColor Alpha - MaterialSource = Register;AlphaSource = Register
  27. D = ??
  28.  
  29. Second Byte:
  30. 00 = ???/no fog
  31. 01 = ???/Light_Set Fog
  32. 02 = ???/???
  33. 08 = ??
  34. 10 = glow??
  35. 11 = ??
  36. 12 = Fresnel Shading/Lighting
  37. 20 = ??
  38. 21 = Rim Map light shading/fresnel Lighting
  39. 22 = ??
  40. 41 = Material Fog + Light_set
  41. 44 = ??
  42. 61 = colorGain+Offset/fresnel Lighting
  43. 80 = ??
  44. 81 = ??
  45. 9D = ??
  46. A0 = ??
  47. A1 = ??
  48. C0 = Color Animation (Links to MTA via Hash and finalColorGain)
  49. C9 = finalColorGain + Fog (Links to MTA via Hash and finalColorGain)
  50. D3 = ??
  51. E1 = ??
  52.  
  53. Third Byte:
  54. 00 = ??
  55. 10 = No Animation
  56. 11 = Texture Animation
  57. 12 = Texture Animation + RotatePivotUV
  58. 19 = ??
  59. 33 = ??
  60. 50 = Two-UV Layer
  61. 51 = Two-UV Layer + MTA Animation
  62. 54 = ??
  63. 55 = Two-UV Layer + Masking
  64. 56 = Two-UV Layer + ??
  65. 59 = Two-UV Layer + Transparency
  66. 5C = ??
  67. 7B = ??
  68. 90 = V.Color Transparency
  69. 91 = Three-UV Layer + MTA Animation
  70. 96 = Three-UV Layer + ??
  71. 99 = Three-UV Layer + Transparency
  72.  
  73.  
  74. Fourth Byte (Material Effects):
  75. Note: 09/49 can act as AO map or 2 Diffuse blended together.
  76. 00 = No show
  77. 01 = Diffuse + No Shadows
  78. 03 = Diffuse + Normal Map + No Shadows
  79. 05 = Diffuse + Cubemap + No Shadows
  80. 07 = Diffuse + Cubemap + Normal Map + No Shadows
  81. 09 = Diffuse + AO Mapping + No Shadows
  82. 0D = Diffuse + Cubemap + AO Mapping + No Shadows
  83. 11 = Diffuse + ??? + No Shadows
  84. 21 = Diffuse + DummyMap + Shadow
  85. 40 = Shadows Only
  86. 41 = Diffuse + Shadows
  87. 43 = Diffuse + Normal Map + Shadows
  88. 45 = Diffuse + Cubemap + Shadows
  89. 47 = Diffuse + Cubemap + Normal Map + Shadows
  90. 49 = Diffuse + AO Map + Shadows
  91. 4D = Diffuse + Cubemap + AO Mapping + Shadows
  92. 61 = Diffuse + DummyRim + Shadow
  93. 63 = Diffuse + Normal Map + DummyRim + Shadows
  94. 65 = Diffuse + Diffuse + Eye Ramp + DummyRim + Shadow
  95. 67 = Diffuse + Normal Map + Skin Ramp + DummyRim + Shadows
  96. 69 = Diffuse + StageMap + DummyRim + Shadow
  97. 6B = Diffuse + StageMap + Normal Map + DummyRim + Shadow
  98. 73 = Specular + ShineHighlight + NormalMap + DummyRim + Shadow
  99. 81 = Glow
  100.  
  101. Unknown Data:
  102. 00 00 00 00
  103.  
  104. Transparency Types:
  105. https://docs.google.com/spreadsheets/d/1OHGQk0SWE-Y8P1gNjuEmFZn0QX2w8PoIVP54miosVRw/edit#gid=0
  106. Note: the "##" stand for how many textures are in the material
  107. 00 00 00 ## 00 00 00 00
  108. 00 00 00 ## 00 00 02 04
  109. 00 00 00 ## 00 00 02 06
  110. 00 00 00 ## 00 01 00 00
  111. 00 00 00 ## 00 02 00 00
  112. 00 01 00 ## 00 01 00 00
  113. 00 01 00 ## 00 01 02 04
  114. 00 01 00 ## 00 01 02 06
  115. 00 01 00 ## 00 02 00 00
  116. 00 01 00 ## 00 02 02 04
  117. 00 01 00 ## 00 03 00 00
  118. 00 01 00 ## 00 04 00 00
  119. 00 01 00 ## 00 0a 00 00
  120. 00 03 00 ## 00 01 00 00
  121. 00 03 00 ## 00 01 02 04
  122. 00 03 00 ## 00 02 00 00
  123. 00 03 00 ## 00 02 02 04
  124. 00 03 00 ## 00 04 00 00
  125. 00 04 00 ## 00 00 00 00
  126. 00 04 00 ## 00 00 02 04
  127. 00 04 00 ## 00 00 02 06
  128. 00 05 00 ## 00 01 00 00
  129. 00 05 00 ## 00 01 02 04
  130. 00 05 00 ## 00 02 00 00
  131. 00 05 00 ## 00 02 02 04
  132. 00 05 00 ## 00 02 02 06
  133. 00 05 00 ## 00 03 00 00
  134. 00 05 00 ## 00 03 02 04
  135. 00 05 00 ## 00 04 00 00
  136. 00 06 00 ## 00 02 00 00
  137. 00 07 00 ## 00 01 00 00
  138. 00 07 00 ## 00 01 02 04
  139. 00 07 00 ## 00 02 00 00
  140. 00 0b 00 ## 00 01 00 00
  141. 00 0b 00 ## 00 01 02 04
  142. 00 0b 00 ## 00 02 00 00
  143. 00 0f 00 ## 00 02 00 00
  144. 00 10 00 ## 00 00 00 00 = Full invisible
  145. 00 21 00 ## 00 02 00 00
  146. 00 25 00 ## 00 02 00 00
  147. 00 32 00 ## 00 02 00 00
  148. 00 33 00 ## 00 02 00 00
  149.  
  150. Byte1 = Padding(?)
  151. 00
  152.  
  153. Blend Mode: SrcFactor + Z-mode type
  154. 0 = Nothing + CompareBeforeTextureTrue + DepthTestTrue + EnableDepthUpdateFalse
  155. 1 = SourceAlpha + CompareBeforeTextureFalse + DepthTestTrue + EnableDepthUpdateTrue
  156. 3 = SourceAlpha + CompareBeforeTextureTrue + DepthTestTrue + EnableDepthUpdateFalse + MultiplyBy1
  157. 4 = RasterAlpha + CompareBeforeTextureTrue + DepthTestTrue + EnableDepthUpdateFalse
  158. 5 = SourceAlpha + CompareBeforeTextureTrue + DepthTestTrue (can also be False) + EnableDepthUpdateFalse + MultiplyBy2
  159. 7 = SourceAlpha + CompareBeforeTextureTrue + DepthTestFalse + EnableDepthUpdateFalse + ObjectDraw
  160. 32 = SourceAlpha + CompareBeforeTextureTrue + DepthTestFalse + EnableDepthUpdateFalse + MultiplyBy2
  161. 33 = SourceAlpha + CompareBeforeTextureTrue + DepthTestFalse + EnableDepthUpdateFalse + MultiplyBy1
  162.  
  163. Blend Mode: DstFactor(???)
  164. 00 = Do nothing
  165. 01 = InverseSourceAlpha
  166. 02 = One
  167. 03 = InverseSourceAlpha + SubtractTrue
  168. 04 = Dummy (faint Transparency, mostly used on stage DUMMY textures to show char shadows on transparent meshes, mesh should have vert alpha's)
  169. 05 = EffectAlpha(?)
  170.  
  171. Alpha Function: Ref1
  172. 00 = nothing
  173. 02 = 255 LessOrEqual
  174.  
  175. Alpha Function: Ref0
  176. 00 = nothing
  177. 04 = 128 GreaterOrEqual
  178. 06 = 255 GreaterOrEqual
  179.  
  180. Unknown Data:
  181. 00
  182.  
  183. Draw Priority:
  184. Note: Can use any value up to FF
  185. 00 = Doesnt Matter
  186.  
  187. Cullmode:
  188. 00 = Cull_None
  189. 01 = ??
  190. 02 = ??
  191. 03 = ??
  192. 04 - Cull_Inside
  193.  
  194. Unknown Data:
  195. note: Helps Cullmode
  196. 00 = Cull_None
  197. 01 = ??
  198. 02 = ??
  199. 03 = ??
  200. 04 = ??
  201. 05 = Cull_Inside
  202.  
  203. Unknown Data:
  204. 00 00 00 00
  205.  
  206. Unknown Data:
  207. Note: Possibly TexGen Flags?
  208. 00 00 00 00 = no effect
  209. 3A 83 12 6f = ?? (used for water, possibly watery effect?)
  210.  
  211. Z Mode:
  212. Note: extreme values may result in the object not rendering
  213. 00 00 00 00 = no effect
  214. 00 00 00 01 - 7F FF FF FF: depth increase (farther from camera)
  215. 80 00 00 00 - FF FF FF FF: depth decrease (closer to camera)
  216. stages:
  217. 4E 47 FF FF = Kongo Jungle
  218.  
  219. Texture ID:
  220. XX XX XX XX
  221.  
  222. Byte1 = Texture Type
  223. 20 = stages
  224. 30 = trophies
  225. 40 = character/fighter
  226.  
  227. Byte2 = Character Folder
  228. 00 = Captain
  229.  
  230. Byte3 = Costume ID
  231. 00 = c00
  232. 04 = c01
  233. 08 = c02
  234. 12 = c03
  235. 16 = c04
  236. 20 = c05
  237. 24 = c06
  238. 28 = c07
  239. 32 = c08
  240. FF = c255
  241.  
  242. Byte4 = Texture ID
  243. can be any value up to FF
  244.  
  245.  
  246. Unknown data:
  247. 00 00 00 00 00 00
  248.  
  249. 1st Layer MapMode:
  250. 00 00 = TexCoord (stays in place)
  251. 1D 00 = EnvCamera (moves with camera)
  252. 1E 00 = Projection
  253. 1E CD = EnvLight
  254. 1F 00 = EnvSpec
  255.  
  256. Wrap Mode:
  257. 01 01 = Repeat/Repeat
  258. 01 02 = Repeat/Mirror
  259. 01 03 = Repeat/Clamp
  260. 02 01 = Mirror/Repeat
  261. 02 02 = Mirror/Mirror
  262. 02 03 = Mirror/Clamp
  263. 03 01 = Clamp/Repeat
  264. 03 02 = Clamp/Mirror
  265. 03 03 = Clamp/Clamp
  266.  
  267. Note: Following stuff isn't 100% verified
  268. MinFilter:
  269. 00 = Linear_Mipmap_Linear??
  270. 01 = Nearest
  271. 02 = Linear
  272. 03 = Nearest_Mipmap_Linear
  273.  
  274. MagFilter:
  275. 00 = ???
  276. 01 = Nearest
  277. 02 = Linear
  278.  
  279. Mip Detail: (Documented by GFD)
  280. 00: hangs when loading stage
  281. 01: 1 mip level, anisotropic off
  282. 02: 1 mip level, anisotropic off (i guess they're identical??)
  283. 03: 4 mip levels, trilinear off, anisotropic off
  284. 04: 4 mip levels, trilinear off, anisotropic on
  285. 05: 4 mip levels, trilinear on, anisotropic off
  286. 06: 4 mip levels, trilinear on, anisotropic on
  287. 07: hangs when loading stage
  288.  
  289. Unknown data:
  290. 00 00 = Nothing
  291. 00 01 = ??
  292.  
  293. Unknown data:
  294. 00 00 00
  295.  
  296. End of TextureLayer1-Start of TextureLayer2 if supported; Starts back to TexID, otherwise goes to Material Hash, then padding till next Material Header.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement