Cities: Skylines

Cities: Skylines

Customize your city!
Create and upload new mods and assets to add new buildings, items, and game mechanics to Cities: Skylines. Explore new maps and share save games.
Learn More
Daniel 51 16 Mar, 2024 @ 3:28pm
I can't import the asset
I created an asset (building), but when importing it into the editor it gives the error "System.IndexOutOfRangeException Array index is out of range" and does not load the asset

There are 60k tris, but it hardly matters, because other users have 100k+
There is also a lod, textures and more

I tried to remove different parts of the building where the largest number of polygons is located, but it didn't really help

Ultimately, for the sake of experiment, I decided to try importing only the front part of the building and it worked, and also sometimes worked when removing any side wall of the building

I found reports in the logs "Texture missing.......Generated info has zero size"
< >
Showing 1-4 of 4 comments
NameInvalid 205 17 Mar, 2024 @ 2:45am 
>There are 60k tris, but it hardly matters, because other users have 100k+

No, we did not export them as a single piece. Because the limit is about 30k per mesh.
An asset of 100k tri will likely have 1 main mesh + at least 3 sub meshes.

How you want to split them is up to you, as long as you don't exceed 30k.
In most cases, try to split them in a way that you can minimize the amount of texture resolution required.

In term of LOD, just do the whole thing on the primary mesh if the item is small, submeshes just do empty lod (eg: just 1 tiny triangle).

Example : https://i.postimg.cc/NfS1pd8K/image-2024-03-17-175018696.png
Last edited by NameInvalid; 17 Mar, 2024 @ 2:53am
Daniel 51 17 Mar, 2024 @ 3:06am 
Originally posted by NameInvalid:
>There are 60k tris, but it hardly matters, because other users have 100k+

No, we did not export them as a single piece. Because the limit is about 30k per mesh.
An asset of 100k tri will likely have 1 main mesh + at least 3 sub meshes.

How you want to split them is up to you, as long as you don't exceed 30k.
In most cases, try to split them in a way that you can minimize the amount of texture resolution required.

In term of LOD, just do the whole thing on the primary mesh if the item is small, submeshes just do empty lod (eg: just 1 tiny triangle).

Example : https://i.postimg.cc/NfS1pd8K/image-2024-03-17-175018696.png

So the game doesn't allow you to export multiple objects in one file, does it? In this case, the FBX file is empty in the editor
Can you explain it in more detail?
NameInvalid 205 17 Mar, 2024 @ 3:30am 
>game doesn't allow you to export multiple objects in one file

what you mean by that?

it's hard limit for EACH individual fbx / obj file = around 60k vertex, or roughly 30k tri in most cases

in my example picture, I split my model into 1 main mesh, 2 sub mesh. Each are under 30k tri.
example:
- main_mesh.fbx, main_mesh_d.png, ......
- main_mesh_lod.fbx, main_mesh_lod_d.png,...........
- sub_1.fbx, sub_1_d.png, ..........
- sub_1_lod.fbx, sub_1_lod_d.png, ..........
- sub_2.fbx, sub_2_d.png, ..............
- sub_2_lod.fbx, sub_2_lod_d.png, ..........

Initially import your main mesh, then at the right side panel where you change item stats, there is a section called "sub mesh", you add the rest of the model from there.

of course, optimize your model, if you can do it with 50% less tri count with barely any visual differences, do it...
Last edited by NameInvalid; 17 Mar, 2024 @ 3:35am
Daniel 51 17 Mar, 2024 @ 3:35am 
Originally posted by NameInvalid:
>game doesn't allow you to export multiple objects in one file

what you mean by that?

it's hard limit for EACH individual fbx / obj file = around 60k vertex, or roughly 30k tri in most cases

in my example picture, I split my model into 1 main mesh, 2 sub mesh. Each are under 30k tri.
example:
- main_mesh.fbx, main_mesh_d.png, ......
- main_mesh_lod.fbx, main_mesh_lod_d.png,...........
- sub_1.fbx, sub_1_d.png, ..........
- sub_1_lod.fbx, sub_1_lod_d.png, ..........
- sub_2.fbx, sub_2_d.png, ..............
- sub_2_lod.fbx, sub_2_lod_d.png, ..........

Initially import your main mesh, then at the right side panel where you change item stats, there is a section called "sub mesh", you add the rest of the model from there.


Now I understand, I'll try, thanks
< >
Showing 1-4 of 4 comments
Per page: 1530 50