Installer Steam
connexion
|
langue
简体中文 (chinois simplifié)
繁體中文 (chinois traditionnel)
日本語 (japonais)
한국어 (coréen)
ไทย (thaï)
Български (bulgare)
Čeština (tchèque)
Dansk (danois)
Deutsch (allemand)
English (anglais)
Español - España (espagnol castillan)
Español - Latinoamérica (espagnol d'Amérique latine)
Ελληνικά (grec)
Italiano (italien)
Bahasa Indonesia (indonésien)
Magyar (hongrois)
Nederlands (néerlandais)
Norsk (norvégien)
Polski (polonais)
Português (portugais du Portugal)
Português - Brasil (portugais du Brésil)
Română (roumain)
Русский (russe)
Suomi (finnois)
Svenska (suédois)
Türkçe (turc)
Tiếng Việt (vietnamien)
Українська (ukrainien)
Signaler un problème de traduction
{"materialName":["Agano_Main_Gray","Agano_Acc_Gray","Rigging","Transparent","Agano_Gray_D"]}
This defines all of the materials for the agano model.
"meshNames":["Main_LOD0","Main_LOD1".....
This defines the series of meshes that make up the model.
"materialsOnMeshIndex":["{\"mats\":[4]}","{\"mats\":[4]}"...
This defines the index of the materialName to be applied onto each mesh as defined in MeshNames; the ordering of meshNames and materialsOnMeshIndex must be correct as they correspond to each other.
So;
"Main_LOD0","Main_LOD1" both get index 4, namely "Agano_Gray_D". This is the agano material with support for the damage shading of regions.
"Accessories_LOD0","Accessories_LOD1" get index 1, namely "Agano_Acc_Gray" which are the accessories for agano in the base gray color scheme.
Further on,
"Rigging" gets index 2: "Rigging" material
"Transparency" gets index 3: "Transparent" material for railings, cranes etc.
See the pattern :)
Material definitions are presented as a List of materials for example "{\"mats\":[4]}" puts material index 4 on the mesh.
But some meshes have multiple sub-meshes, for example takao gun turrets with a solid base and railings on top, hence the need to define a list of materials.
If you look at takao_model.txt you will see "Main0" (main gun turret 1) has the material indexes "{\"mats\":[3,1]} corresponding to "Transparent" (for the railings) and "Takao_Acc_Gray" for the gun turret itself. Note the next turret has the sub-meshes in the other order.
Ships are clustered into groups which share common features. For example all IJN heavy cruisers use "Takao_Acc_Gray" (takao accessories gray) since their torpedo launchers, life boats etc are all shared between the models.
That is why you see the iowa folder which contains the accessories textures for the "iowa" ship group which currently contains the US battleships.
Furthermore, in regards to the default\materials folder am i right in that its referencing the materialName shared with the file from a units folder, and then assigns the textures to the material?
For example the "materialName":"Shokaku_Hull_Gray", which then follows with a file path that leads to the ships texture asset bundle and references a set of specific textures.
So in order to assign materials to my custom model i would:
1. Have the ships model.txt file have the meshNames, materialNames and materialOnMeshIndex sections finished correctly.
2. Create a new section in default\materials\xxx.txt of the material asset bundles name.
3. Fill out said section with the corresponding file path and textures assignment.
Is that correct?
Materials are never defined in an asset bundle, they are generated dynamically from the data in default/materials folder.
"Furthermore, in regards to the default\materials folder am i right in that its referencing the materialName shared with the file from a units folder, and then assigns the textures to the material?"
Correct, the exact name.
Note at the bottom of shokaku_model.txt is the exact reference to your example:
{"materialName":["Shokaku_Hull_Gray"....
1) Correct. The relative position of all 3 of these lists must correspond and by definition they must all be the same length.
2) If you enter your "material line data" into an existing material file, you are ok.
If you create a new file, you will need to add it to the config.txt list:
"materialFiles":["ammunition.txt","_common.txt","submarine.txt","destroyer.txt","cruiser.txt","other.txt","aircraft.txt"]
3) Are you referring to material names at bottom of the ship_model.txt file:
{"materialName":["Shokaku_Hull_Gray","Shokaku_Superstructure_Gray","Shokaku_Acc_Gray","Transparent","Poles","Shokaku_FlightDeck","Shokaku_Hull_Gray_D","Shokaku_SS_Gray_D","Shokaku_FD_D"]}
- The position of each of these in the list correspond to the indexes specified in materialsOnMeshIndex.
Or the material line in the material txt file:
{"materialName":"Shokaku_Hull_Gray_D","materialShader":"ShipDamage","materialTextures":["unit/sea/shokaku/shokaku_tex_gray/T_Hull_D","unit/sea/shokaku/shokaku_tex_gray/T_Hull_M","unit/sea/shokaku/shokaku_tex_gray/T_Hull_N","unit/sea/shokaku/shokaku_tex_gray/T_Hull_AO","unit/sea/shokaku/shokaku_dmg/T_Shokaku_Hull_DamageMask_L","unit/sea/shokaku/shokaku_dmg/T_Shokaku_Hull_DamageMask_R"],"glossScale":1.0,"damageIntensity":1.0,"offsetNoiseTiling":{"x":5.3,"y":3.67},"damageNoiseTiling":{"x":5.53,"y":5.0},"damageColTiling":{"x":1.0,"y":1.0}}
- Each of the "materialName" specified here correspond to those defined in the material data file.
Cause you need to do both :)
This material requires damage masks to be specified in order to shade damaged areas of the ship. You may have already seen the coloured masks in shokaku_dmg asset bundle.
If you look at skokaku:
{"materialName":["Shokaku_Hull_Gray","Shokaku_Superstructure_Gray","Shokaku_Acc_Gray","Transparent","Poles","Shokaku_FlightDeck","Shokaku_Hull_Gray_D","Shokaku_SS_Gray_D","Shokaku_FD_D"]}
"Shokaku_Hull_Gray" - this is index 0, but it is NOT referenced anywhere in "materialsOnMeshIndex". This is the original plain gray version without any damage shading.
Shokaku_SS_Gray_D - this is index 6 and referenced for the HULL meshes as it has the later implemented damage shading (hence the _D suffix).
When defining materials recommend do not use "materialShader":"ShipDamage" unless you intend to specify the colored mask textures also.
Aircraft never use "materialShader":"ShipDamage" at this time.
Your output_log.txt file should show an error of some kind.
If the materials fail, creation of the ship fails. This stops the rest of the scene initialising causing camera, underwater lighting/fog and gravity/physics to fail.
1. Create a new entry in materials\other.txt, named "Taiho_Material", using standard shader
2. Input all the textures in the order they appear within their bundle. In this case each texture looks like "unit/sea/taiho/taiho_tex/xxxxxx"
3. Enter "Taiho_Material" into the materialNames section of the taiho_model.txt file.
4. Enter "{\"mats\":[0]}" in the materialOnMeshIndex section, and repeat it for each of the meshes in the model (78 meshes in total).
The output_log.txt gave the following error, repeated indefinitely:
(Filename: Line: -1)
NullReferenceException: Object reference not set to an instance of an object
at UnitSea.CalculateSpeedPenalty () [0x00000] in <filename unknown>:0
at UnitSea.UpdateMovementData (Single duration) [0x00000] in <filename unknown>:0
at Unit.Update () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_position (UnityEngine.Vector3&)
at UnityEngine.Transform.get_position () [0x00000] in <filename unknown>:0
at ThirdPersonCamera.LateUpdate () [0x00000] in <filename unknown>:0
As for subsystems and the compartment cells, they're a direct copy from Shokaku then i'd tweak them later. Would that effect it?
Could delete all "Cell/UpperCell" data initially while trying to get the meshes/textures working.
Just tested this by deleting all Shokaku cells and it works in Museum!
Shokaku Model and Mesh comes into the Museum just fine.
Throws lots of other errors looking for directors etc, but that can get looked at once your model is working :) The scene works normally, Shokaku sails happily and camera is fully functional above/below water.
If you are still having issues, check ship_model.txt file as well, if you do not have the appropriate meshes available or defined you must clear the lists for:
propellerHubs
rudder
directors
mountedWeapons
mountedWeaponData
aaaGuns - parent AAA game object and in particular baseTransformNames must exist on the model.
You could consider starting with existing shokaku, delete all cells/upperCells as well as the data mentioned above to make sure you can get the empty shell in game.
shokaku_model.txt
shokaku_data.txt
Website link [imgur.com]
and also one thing I found, organizing this reference material is a bit of a gamble, when I type the meshname like this: "meshNames":["ASB023_Georgia_1945_bow.002","ASB023_Georgia_1945_midback.002","ASB023_Georgia_1945_front.002","ASB023Georgia.002"..Georgia.002".. ..], then the result is as I sent above (the stern is still purple.
but if I write this : "meshNames":["ASB023_Georgia_1945_bow.002","ASB023_Georgia_1945_midback.002","ASB023_Georgia_1945_midback.002","ASB023_Georgia_1945_stern.002"...], then the stern will be textured. and you see the text? I have to write twice "ASB023_Georgia_1945_midback.002"?
here the preview for the second result:
Website link [imgur.com]
I've managed to get a base grey material to appear, so does that mean my data files are correct but my texture paths aren't?
I also want to clarify that the meshNames section refers to the actual meshes as referenced in Unity, and not the game objects?
Basically i'm not entirely sure where to go from here.