MasterpieceVR

MasterpieceVR

Nincs elegendő értékelés
MasterpieceVR to Unity Workflow
Készítő: Morganicism
My workflow for getting models from MasterpieceVR to Unity.
   
Díjazás
Kedvenc
Kedvenc
Törlés
Exporting from MasterpieceVR
Export your artwork as an FBX.

Exported files are saved in "Documents\MasterpieceVR\Exports" by default.
Setting up Materials in Unity
If you would like to modify your model in another application like Blender first, I recommend viewing this guide.

After you have added your model to your Unity project, we'll need to set up a vertex color shader.
MasterpieceVR exports with vertex colors, rather than a traditional texture, and Unity does not have any shaders to support this.

There are many vertex shaders online that can be freely used, as well as some on the Unity asset store[www.assetstore.unity3d.com]. One that is confirmed working is this one here[github.com].

I'll just put this shader code here.
Shader "StandardLighting+VertexColour" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM // Physically based Standard lighting model, and enable shadows on all light types #pragma surface surf Standard fullforwardshadows // Use shader model 3.0 target, to get nicer looking lighting #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; float4 colour : COLOR; }; half _Glossiness; half _Metallic; fixed4 _Color; void surf (Input IN, inout SurfaceOutputStandard o) { // Albedo comes from a texture tinted by color fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; o.Albedo = c.rgb * IN.colour.rgb; // Metallic and smoothness come from slider variables o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Diffuse" }

After adding the shader to your project, you can select it from the shader dropdown on your material.

After applying your shader to your model, you should now see your colors on your model.
4 megjegyzés
michael_ocadu 2020. febr. 15., 12:44 
I sure wish this worked. Seems like an important feature for folks that want to import content into games etc.
Morganicism  [készítő] 2018. jan. 4., 6:08 
@The Stick
You don't need to update, you're fine. Colors are exported automatically, you can't export without them. The "Color" button was removed, I need to update the guide.
Genozen 2018. jan. 4., 5:10 
@The Stick
I'm pretty sure the "Color" button is right next to "Brush" and above "Quads"
The Stick 2018. jan. 3., 15:05 
I'm trying to export models with color, but when I went to export, the only options available are "All", "Brushes", and "Modeling" - there is no "Color" button. I think this guide might need an update...