浏览代码

Babylon Entities Update

Toolkit Babylon Entities Update
MackeyK24 8 年之前
父节点
当前提交
bfab44e0e7
共有 22 个文件被更改,包括 82 次插入52 次删除
  1. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonAbstractMesh.cs
  2. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonActions.cs
  3. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonAnimationKey.cs
  4. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonBone.cs
  5. 6 2
      Exporters/3ds Max/BabylonExport.Entities/BabylonExport.Entities.csproj
  6. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonFresnelParameters.cs
  7. 6 1
      Exporters/3ds Max/BabylonExport.Entities/BabylonHDRCubeTexture.cs
  8. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonIAnimatable.cs
  9. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlare.cs
  10. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlareSystem.cs
  11. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonMultiMaterial.cs
  12. 30 27
      Exporters/3ds Max/BabylonExport.Entities/BabylonPBRMaterial.cs
  13. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonProducer.cs
  14. 6 1
      Exporters/3ds Max/BabylonExport.Entities/BabylonShaderMaterial.cs
  15. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonSkeleton.cs
  16. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonSound.cs
  17. 21 8
      Exporters/3ds Max/BabylonExport.Entities/BabylonStandardMaterial.cs
  18. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonSubMesh.cs
  19. 13 13
      Exporters/3ds Max/BabylonExport.Entities/BabylonTexture.cs
  20. 0 0
      Exporters/3ds Max/BabylonExport.Entities/BabylonVector3.cs
  21. 0 0
      Exporters/3ds Max/BabylonExport.Entities/Properties/AssemblyInfo.cs
  22. 0 0
      Exporters/3ds Max/BabylonExport.Entities/packages.config

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonAbstractMesh.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonActions.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonAnimationKey.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonBone.cs


+ 6 - 2
Exporters/3ds Max/BabylonExport.Entities/BabylonExport.Entities.csproj

@@ -59,13 +59,16 @@
     <Compile Include="BabylonAnimationKey.cs" />
     <Compile Include="BabylonBone.cs" />
     <Compile Include="BabylonCamera.cs" />
+    <Compile Include="BabylonDirectionalLight.cs" />
     <Compile Include="BabylonFresnelParameters.cs" />
+    <Compile Include="BabylonHDRCubeTexture.cs" />
     <Compile Include="BabylonIAnimatable.cs" />
     <Compile Include="BabylonLensFlare.cs" />
     <Compile Include="BabylonLensFlareSystem.cs" />
     <Compile Include="BabylonLight.cs" />
     <Compile Include="BabylonMaterial.cs" />
     <Compile Include="BabylonPBRMaterial.cs" />
+    <Compile Include="BabylonShaderMaterial.cs" />
     <Compile Include="BabylonStandardMaterial.cs" />
     <Compile Include="BabylonAbstractMesh.cs" />
     <Compile Include="BabylonMesh.cs" />
@@ -78,6 +81,7 @@
     <Compile Include="BabylonSound.cs" />
     <Compile Include="BabylonSubMesh.cs" />
     <Compile Include="BabylonTexture.cs" />
+    <Compile Include="BabylonUniversalCamera.cs" />
     <Compile Include="BabylonVector3.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
@@ -85,12 +89,12 @@
     <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\packages\SharpDX.2.6.3\build\SharpDX.targets" Condition="Exists('..\packages\SharpDX.2.6.3\build\SharpDX.targets')" />
+  <Import Project=".\packages\SharpDX.2.6.3\build\SharpDX.targets" Condition="Exists('.\packages\SharpDX.2.6.3\build\SharpDX.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\packages\SharpDX.2.6.3\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SharpDX.2.6.3\build\SharpDX.targets'))" />
+    <Error Condition="!Exists('.\packages\SharpDX.2.6.3\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '.\packages\SharpDX.2.6.3\build\SharpDX.targets'))" />
   </Target>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonFresnelParameters.cs


+ 6 - 1
Exporters/3ds Max/BabylonExport.Entities/BabylonHDRCubeTexture.cs

@@ -25,7 +25,7 @@ namespace BabylonExport.Entities
 
         public BabylonHDRCubeTexture()
         {
-            this.customType = "BABYLON.HDRCubeTexture";
+            this.SetCustomType("BABYLON.HDRCubeTexture");
             this.size = 0;
             this.isCube = true;
             this.useInGammaSpace = false;
@@ -33,5 +33,10 @@ namespace BabylonExport.Entities
             this.usePMREMGenerator = false;
             this.isBABYLONPreprocessed = false;
         }
+
+        public void SetCustomType(string type)
+        {
+            this.customType = type;
+        }
     }
 }

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonIAnimatable.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlare.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonLensFlareSystem.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonMultiMaterial.cs


+ 30 - 27
Exporters/3ds Max/BabylonExport.Entities/BabylonPBRMaterial.cs

@@ -130,37 +130,40 @@ namespace BabylonExport.Entities
         [DataMember]
         public bool twoSidedLighting { get; set; }
 
+        [DataMember]
+        public int maxSimultaneousLights { get; set; }
+
         public BabylonPBRMaterial() : base()
         {
-            customType = "BABYLON.PBRMaterial";
-
-            directIntensity = 1.0f;
-            emissiveIntensity = 1.0f;
-            environmentIntensity = 1.0f;
-            specularIntensity = 1.0f;
-            cameraExposure = 1.0f;
-            cameraContrast = 1.0f;
-            indexOfRefraction = 0.66f;
-            twoSidedLighting = false;
-            useRadianceOverAlpha = true;
-            useSpecularOverAlpha = true;
-            usePhysicalLightFalloff = true;
-            useEmissiveAsIllumination = false;
+            this.SetCustomType("BABYLON.PBRMaterial");
+            this.directIntensity = 1.0f;
+            this.emissiveIntensity = 1.0f;
+            this.environmentIntensity = 1.0f;
+            this.specularIntensity = 1.0f;
+            this.cameraExposure = 1.0f;
+            this.cameraContrast = 1.0f;
+            this.indexOfRefraction = 0.66f;
+            this.twoSidedLighting = false;
+            this.maxSimultaneousLights = 4;
+            this.useRadianceOverAlpha = true;
+            this.useSpecularOverAlpha = true;
+            this.usePhysicalLightFalloff = true;
+            this.useEmissiveAsIllumination = false;
 
             // Default Null Metallic Workflow
-            metallic = null;
-            roughness = null;
-            useRoughnessFromMetallicTextureAlpha = true;
-            useRoughnessFromMetallicTextureGreen = false;
-
-            microSurface = 0.9f;
-            useMicroSurfaceFromReflectivityMapAplha = false;
-
-            ambient = new[] { 0f, 0f, 0f };
-            albedo = new[] { 1f, 1f, 1f };
-            reflectivity = new[] { 1f, 1f, 1f };
-            reflection = new[] { 0.5f, 0.5f, 0.5f };
-            emissive = new[] { 0f, 0f, 0f };
+            this.metallic = null;
+            this.roughness = null;
+            this.useRoughnessFromMetallicTextureAlpha = true;
+            this.useRoughnessFromMetallicTextureGreen = false;
+
+            this.microSurface = 0.9f;
+            this.useMicroSurfaceFromReflectivityMapAplha = false;
+
+            this.ambient = new[] { 0f, 0f, 0f };
+            this.albedo = new[] { 1f, 1f, 1f };
+            this.reflectivity = new[] { 1f, 1f, 1f };
+            this.reflection = new[] { 0.5f, 0.5f, 0.5f };
+            this.emissive = new[] { 0f, 0f, 0f };
         }
 
         public void SetCustomType(string type)

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonProducer.cs


+ 6 - 1
Exporters/3ds Max/BabylonExport.Entities/BabylonShaderMaterial.cs

@@ -56,7 +56,7 @@ namespace BabylonExport.Entities
 
         public BabylonShaderMaterial()
         {
-            this.customType = "BABYLON.ShaderMaterial";
+            this.SetCustomType("BABYLON.ShaderMaterial");
             this.shaderPath = null;
             this.options = new BabylonShaderOptions();
             this.textures = new Dictionary<string, object>();
@@ -73,6 +73,11 @@ namespace BabylonExport.Entities
             this.matrices3x3 = new Dictionary<string, object>();
             this.vectors3Arrays = new Dictionary<string, object[]>();
         }
+
+        public void SetCustomType(string type)
+        {
+            this.customType = type;
+        }
     }
 
     [DataContract]

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonSkeleton.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonSound.cs


+ 21 - 8
Exporters/3ds Max/BabylonExport.Entities/BabylonStandardMaterial.cs

@@ -5,6 +5,9 @@ namespace BabylonExport.Entities
     public class BabylonStandardMaterial: BabylonMaterial
     {
         [DataMember]
+        public string customType { get; private set; }
+
+        [DataMember]
         public float[] ambient { get; set; }
 
         [DataMember]
@@ -71,16 +74,26 @@ namespace BabylonExport.Entities
         [DataMember]
         public bool twoSidedLighting { get; set; }
 
+        [DataMember]
+        public int maxSimultaneousLights { get; set; }
+
         public BabylonStandardMaterial() : base()
         {
-            ambient = new[] {1.0f, 1.0f, 1.0f};
-            diffuse = new[] { 1.0f, 1.0f, 1.0f };
-            specular = new[] { 1.0f, 1.0f, 1.0f };
-            emissive = new[] { 0f, 0f, 0f };
-            specularPower = 64;
-            useSpecularOverAlpha = true;
-            useEmissiveAsIllumination = false;
-            linkEmissiveWithDiffuse = false;
+            this.SetCustomType("BABYLON.StandardMaterial");
+            this.ambient = new[] {1.0f, 1.0f, 1.0f};
+            this.diffuse = new[] { 1.0f, 1.0f, 1.0f };
+            this.specular = new[] { 1.0f, 1.0f, 1.0f };
+            this.emissive = new[] { 0f, 0f, 0f };
+            this.specularPower = 64;
+            this.maxSimultaneousLights = 4;
+            this.useSpecularOverAlpha = true;
+            this.useEmissiveAsIllumination = false;
+            this.linkEmissiveWithDiffuse = false;
+        }
+
+        public void SetCustomType(string type)
+        {
+            this.customType = type;
         }
     }
 }

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonSubMesh.cs


+ 13 - 13
Exporters/3ds Max/BabylonExport.Entities/BabylonTexture.cs

@@ -76,19 +76,19 @@ namespace BabylonExport.Entities
 
         public BabylonTexture()
         {
-            level = 1.0f;
-            uOffset = 0;
-            vOffset = 0;
-            uScale = 1.0f;
-            vScale = 1.0f;
-            uAng = 0;
-            vAng = 0;
-            wAng = 0;
-            wrapU = 1;
-            wrapV = 1;
-            hasAlpha = false;
-            coordinatesIndex = 0;
-            samplingMode = 3;
+            this.level = 1.0f;
+            this.uOffset = 0;
+            this.vOffset = 0;
+            this.uScale = 1.0f;
+            this.vScale = 1.0f;
+            this.uAng = 0;
+            this.vAng = 0;
+            this.wAng = 0;
+            this.wrapU = 1;
+            this.wrapV = 1;
+            this.hasAlpha = false;
+            this.coordinatesIndex = 0;
+            this.samplingMode = 3;
         }
     }
 }

+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/BabylonVector3.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/Properties/AssemblyInfo.cs


+ 0 - 0
Exporters/3ds Max/BabylonExport.Entities/packages.config