Profile Picture

CC4 to unity

Posted By Jbowdoin 3 Years Ago
You don't have permission to rate!
Author
Message
Jbowdoin
Jbowdoin
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)Distinguished Member (1.1K reputation)

Group: Forum Members
Last Active: 4 Months Ago
Posts: 123, Visits: 795
ok so this as been bugging me for a while.
I am looking to fully optimize my exported characters so I want the different levels of the LOD mesh with the original. so use  "instaLOD" right?

only I don't want the original to have so many materials ether, I want the original to have  "Merge UV" so each character only has about 5  materials at most between the main mesh and the LOD

so why not expert them separately and combine them in unity ?
well that is were im at. as you can probably guess the only problem is the original and LOD are using  have separate skeletons and therefor  can't be controlled bay the same animator the same way expecting LOD with original would work.
how can I fix this ?  

I actually can do something similar with this code 

______________________________________________________________________________________________________________________________________________________________________________
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Equipmentizer : MonoBehaviour
  5. {
  6.     public SkinnedMeshRenderer TargetMeshRenderer;
  7.  
  8.     void Awake()
  9.     {
  10.         Dictionary<string, Transform> boneMap = new Dictionary<string, Transform>();
  11.         foreach (Transform bone in TargetMeshRenderer.bones)
  12.             boneMap[bone.gameObject.name] = bone;
  13.  
  14.  
  15.         SkinnedMeshRenderer myRenderer = gameObject.GetComponent<SkinnedMeshRenderer>();
  16.  
  17.         Transform[] newBones = new Transform[myRenderer.bones.Length];
  18.         for (int i = 0; i < myRenderer.bones.Length; ++i)
  19.         {
  20.             GameObject bone = myRenderer.bones[i].gameObject;
  21.             if (!boneMap.TryGetValue(bone.nameout newBones[i]))
  22.             {
  23.                 Debug.Log("Unable to map bone \"" + bone.name + "\" to target skeleton.");
  24.                 break;
  25.             }
  26.         }
  27.         myRenderer.bones = newBones;
  28.  
  29.     }
  30. }
______________________________________________________________________________________________________________________________________________________________________________

that lets me map extra clothing onto a character however when i try with the LOD the mesh stops rendering altogether.
any thoughts ? 
(I will look back this evening got work now) 





Reading This Topic