[Important Feature Request] Export SkinSwaps into multiple Atlases

Discuss issues pertaining to the Creature Animation Editor here.
sonic2002
Posts: 20
Joined: Sun May 05, 2019 7:51 pm

[Important Feature Request] Export SkinSwaps into multiple Atlases

Post by sonic2002 » Sun May 05, 2019 7:59 pm

Today's bussiness model of the most sold game in the world like Fortnite, Apex Legends, and many other are EXCLUSEVELY BASED on revenues on SKINS for the charcters.

PROBLEM:
- Today in Creature Is not possible to fit ALL the skins of a character into a a single Atlas (just a number limited to the atlas size), ALSO, most devices cannot support Atlas bigger than 2048 or 4096.
--------------------------------------------
SOLUTION 1:
-Creature should provide a SkinSwap that writes Each SkinSwap ( or a little group of them) into a SEPARATE Atlas, that can be loaded at the right moment at runtime.

---------------------------------------------
SOLUTION 2:
IF Could you implement by a code a method like this:

List L1.Add("meshName30");
List L1.Add("meshName20");

List L2.Add("meshName01");

Dictonary AtlasName2MeshElements[AtlasName1]= L1;
Dictonary AtlasName2MeshElements[AtlasName2]= L2;

Atlas GenerateAtlasFrom ( Dictionary<String, List<string>> AtlasName2MeshElements )
,
So one can choose the meshes that should be placed into a new ATlas.

IN THIS WAY, YOU CAN GENERATE THE ATLAS YOU NEED AT RUNTIME, This can overcome the limit of mobiles that force us to use 2048*2048 atlases and enables the business model that most of GameCompanies have today: selling SKIN SETS!
Please Read Below if you didn't get how much this feature is !!
Tell me what you think about this approach by code!
------------------------------------------------------------------------------------------

This is something that AFFECTS DIRECTLY the business model of most companies.And it should be developed as soon as possible.
What do you guys think ? How do you manage until now to hold in memory all the skinsets of a character?

Thank you,
Cheers,

Gabriel

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by chong » Sun May 05, 2019 8:24 pm

Hello,

This is in consideration but will need some major rework of the mesh + rendering layout.
The approach you outlined will not work for a general case, the actual implementation will be a lot more complicated/involved.
There are a number of other issues/requests by our large studios that are currently being worked on first.

Thanks

sonic2002
Posts: 20
Joined: Sun May 05, 2019 7:51 pm

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by sonic2002 » Fri May 17, 2019 11:50 am

Hello!

Could you at least suggest me a temporary solution?

If I have a character which has all his weapons and hats into a 4096*4096 atlas, how can I add more hats?
If I make a 8000*8000 atlas it will not be supported on Android or IOS...

If I export a 8000*8000 atlas and then shrink it I will lose half of the quality..

How other studios do?

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by chong » Fri May 17, 2019 4:20 pm

Hello,

What some people do is to create the swappable meshes as large rectangular placeholder blocks. Then they write code in the engine to copy different texture body parts into the rectangular blocks via the texture atlas. Copying is easy since you just need to find the largest bounding UV box of each mesh before writing your copy function. You can do this anyway you want depending on your engine design ( it's just standard copy to texture memory operations ). You should be familiar with the basics of 3D graphics and concepts like GPU Vertex/Pixel Buffer Objects etc. This is why we provide the full runtime source code which you can modify yourself.

Thanks

sonic2002
Posts: 20
Joined: Sun May 05, 2019 7:51 pm

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by sonic2002 » Sat May 18, 2019 8:13 am

My god, thank you very much, this is what i would really need ! Could you upload the code that does this ? You would really save my job! I suppose is often used and useful to be posted and included into the main runtime!
Thank you!

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by chong » Sat May 18, 2019 4:55 pm

Hello,

I do not have the code, these are the types of implementations the various studios use in order to add the feature they want.
What I outlined are high level suggestions on what they did. I encourage you to implement your own solutions based on the descriptions above.
Again, we provide full source code for the runtime so modify it at your own leisure to make it fit your custom solution(s).

Thanks

sonic2002
Posts: 20
Joined: Sun May 05, 2019 7:51 pm

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by sonic2002 » Wed Jul 10, 2019 5:59 pm

Dear Chong,
I am trying to look into it in CreaturePack Environment. I want to Swap a Sword in my charcter Mesh.
I see inside the PackRenderer that the active mesh is updated like this. But HOW can I swap a specific item? Should I look for specific triangles?

Code: Select all

 active_mesh.vertices = vertices;
        active_mesh.colors32 = colors;
        active_mesh.triangles = perform_skin_swap ? skin_swap_triangles : triangles;
        active_mesh.normals = normals;
        active_mesh.tangents = tangents;
        active_mesh.uv = uvs;
I am sure many people will benefit from this. Could you explain me what to do?

Thank you very much!

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by chong » Wed Jul 10, 2019 7:15 pm

Search in the code base on the SkinSwap code path ( start from Metadata ) It should give you a good idea how the indices are displayed and meshes are swapped int.

sonic2002
Posts: 20
Joined: Sun May 05, 2019 7:51 pm

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by sonic2002 » Sat Aug 10, 2019 3:27 pm

Dear Chong,

I tried wit all myself in digging into code but I see that In Creature Pack, vertices and indexes are read from the meta-data and from this, a unique mesh is created and displayed.
Instead I want To swap into a placeholder, several weapons.

So I need a method like:

void SwapPlaceholderMeshWithTexture( string PlaceHolderMeshName, Texture2D textureToBeSwappedIn);

I Believe such method is CRITICAL, because at the current status SKINSWAPS are useless for most of games, unless you want to swap few things.

The current SKinswap feature forces you to put all the skins in the same atlas of the character, that means an HUGE waste of memory when only one weapon is currently visible.
It shoud instead save them into a separate atlas or more, like atlas-with-yellow-dress, atlas-with blue-dress. So they can be loaded into memory in separate time with the AssetBundles.

So since this feature is missing, Could you at least provide a solution to Swap a texture into a Placeholder ?
I can make you a donation. This is feature is Really needed for most developers since without it they will have memory problems being forced to load all the big atlas!

Please help us! Thank you in advance! :roll: :roll:

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Important Feature Request] Export SkinSwaps into multiple Atlases

Post by chong » Sat Aug 10, 2019 4:38 pm

Hello,

What you requested is not trivial and will require investigation...

Post Reply