Jump to content
Sign in to follow this  
Stylophone

Issues

Recommended Posts

Hi,

1.  If I enable batching static on the polybrush-modified gameobject that in runtime the modification for the mesh won't be applied into the combined mesh. It keeps the original mesh. 
2. When doing "Save to Asset" on a primitive mesh of Unity I got the following errors:

Couldn't add object to asset file because the Mesh 'Plane' is already an asset at 'Library/unity default resources'!
UnityEditor.AssetDatabase:CreateAsset(Object, String)
Polybrush.z_EditorUtility:SaveMeshAsset(Mesh, MeshFilter, SkinnedMeshRenderer) (at Assets/ProCore/Polybrush/Code/Editor/Utility/z_EditorUtility.cs:131)
Polybrush.z_MeshFilterEditor:OnInspectorGUI() (at Assets/ProCore/Polybrush/Code/Editor/Interface/z_MeshFilterEditor.cs:30)
UnityEditor.DockArea:OnGUI()

UnityException: Creating asset at path Assets/Test.asset failed.
Polybrush.z_EditorUtility.SaveMeshAsset (UnityEngine.Mesh mesh, UnityEngine.MeshFilter meshFilter, UnityEngine.SkinnedMeshRenderer skinnedMeshRenderer) (at Assets/ProCore/Polybrush/Code/Editor/Utility/z_EditorUtility.cs:131)
Polybrush.z_MeshFilterEditor.OnInspectorGUI () (at Assets/ProCore/Polybrush/Code/Editor/Interface/z_MeshFilterEditor.cs:30)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1229)
UnityEditor.DockArea:OnGUI()

Video attached.

temp.mp4

Share this post


Link to post
Share on other sites

Ah, looks like a problem with Additional Vertex Streams and batching.  Unity should not have included the painted mesh in the static batch since it's MeshRenderer contains an additional vertex stream mesh. Furthermore, "Save to Asset" should not be available on that mesh (since it's not actually modified - all the mesh info is stored on that Additional Vertex Streams" mesh).

Share this post


Link to post
Share on other sites

I see. So we couldn't get benefit from batching when using Additional Vertex Streams on MeshRenderer cos Unity simply doesn't handle it. That right? :( Is it possible that merging additional vertex stream mesh with the original one into a new one? Or perhaps Unity should look into this problem...

Share this post


Link to post
Share on other sites

Unity just published a good article on batching here:  https://blogs.unity3d.com/2017/04/03/how-to-see-why-your-draw-calls-are-not-batched-in-5-6/

On merging the additional vertex streams to a new mesh, yes I believe that would work. The next Polybrush update actually includes a utility that makes baking the vertex streams to a new mesh much easier.

Share this post


Link to post
Share on other sites

Has this been fixed? I am still having the same issue with Unity 2017.3.1f1 and the current Polybrush beta from the Asset Store (updated in Feb 2018).

If I try to export the prefab and bring it into another project, it is just a sphere. If I try to click "Save to Asset" under the Sphere mesh or Plane mesh of the objects I have edited, I get the error:

Couldn't add object to asset file because the Mesh 'Plane' is already an asset at 'Library/unity default resources'!
UnityEditor.AssetDatabase:CreateAsset(Object, String)
Polybrush.z_EditorUtility:SaveMeshAsset(Mesh, MeshFilter, SkinnedMeshRenderer) (at Assets/ProCore/Polybrush/Code/Editor/Utility/z_EditorUtility.cs:131)
Polybrush.z_MeshFilterEditor:OnInspectorGUI() (at Assets/ProCore/Polybrush/Code/Editor/Interface/z_MeshFilterEditor.cs:30)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

 

How to I bake the Z_Additional Vertex Streams (Script) onto the actual mesh to save it? My end goal is to export multiple GameObjects from seperate projects and import them all into a single scene.

Thank you

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×