[Orxonox-commit 7514] r12120 - in data/branches/Shader_HS18: materials materials/BumpMapping models

wiesep at orxonox.net wiesep at orxonox.net
Wed Nov 28 10:13:16 CET 2018


Author: wiesep
Date: 2018-11-28 10:13:16 +0100 (Wed, 28 Nov 2018)
New Revision: 12120

Added:
   data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material
   data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material
   data/branches/Shader_HS18/models/Cube_Lava_V2_Normal_Blank.mesh
Removed:
   data/branches/Shader_HS18/materials/Cube_Lava_Normal-Mask.material
Modified:
   data/branches/Shader_HS18/materials/Cube_Lava_Normal.material
Log:
Implemented material script inheritance for bump mapping

Added: data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material
===================================================================
--- data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material	                        (rev 0)
+++ data/branches/Shader_HS18/materials/BumpMapping/BumpMap.material	2018-11-28 09:13:16 UTC (rev 12120)
@@ -0,0 +1,131 @@
+// Any number of lights, diffuse
+material BumpMap_Base
+{
+    technique
+    {
+        // Base ambient pass
+        pass ambient
+        {
+          // base colours, not needed for rendering, but as information
+          // to lighting pass categorisation routine
+          diffuse 0 0 0
+          depth_write on
+          depth_bias 0
+
+        }
+        // Now do the lighting pass
+        // NB we don't do decal texture here because this is repeated per light
+        pass perlight
+        {
+
+            // do this for each light
+            iteration once_per_light
+            scene_blend add
+            depth_write on
+            depth_bias 1
+
+            // base colours, not needed for rendering, but as information
+            // to lighting pass categorisation routine
+            ambient 0 0 0
+
+            // Vertex program reference
+            vertex_program_ref BumpMapping/BumpMapVP
+            {
+                param_named_auto lightPosition light_position_object_space 0
+                param_named_auto worldViewProj worldviewproj_matrix
+            }
+
+            // Fragment program
+            fragment_program_ref BumpMapping/BumpMapFP
+            {
+                param_named_auto lightDiffuse light_diffuse_colour 0
+            }
+
+            // texture shadow receiver program
+            shadow_receiver_vertex_program_ref BumpMapping/BumpMapVPShadowRcv
+            {
+                param_named_auto lightPosition light_position_object_space 0
+                param_named_auto worldViewProj worldviewproj_matrix
+                param_named_auto worldMatrix world_matrix
+                param_named_auto texViewProj texture_viewproj_matrix
+            }
+            // Additive texture shadow receiver program
+            shadow_receiver_fragment_program_ref BumpMapping/BumpMapFPShadowRcv
+            {
+                param_named_auto lightDiffuse light_diffuse_colour 0
+            }
+
+            // Vertex program reference
+            vertex_program_ref BumpMapping/BumpMapVPSpecular
+            {
+                param_named_auto lightPosition light_position_object_space 0
+                param_named_auto eyePosition camera_position_object_space
+                param_named_auto worldViewProj worldviewproj_matrix
+            }
+
+            // Fragment program
+            fragment_program_ref BumpMapping/BumpMapFPSpecular
+            {
+                param_named_auto lightDiffuse light_diffuse_colour 0
+                param_named_auto lightSpecular light_specular_colour 0
+            }
+
+
+            // Base bump map
+            texture_unit normalmap
+            {
+                texture Cube_Lava_NORM.jpg
+                colour_op replace
+            }
+        }
+
+        // Decal pass
+        pass decal
+        {
+            // base colours, not needed for rendering, but as information
+            // to lighting pass categorisation routine
+            lighting off
+            depth_write on
+            depth_bias 2
+
+            scene_blend dest_colour zero
+            texture_unit decalmap
+            {
+                texture Cube_Lava_COLOR.jpg
+            }
+        }
+    }
+}
+
+// Example for Material using this template //
+// import * from "BumpMap.material"
+// // Any number of lights, diffuse
+// material Cube_Lava_Normal : BumpMap_Base
+// {
+//     technique
+//     {
+//         pass ambient
+//         {
+//         }
+//         // Now do the lighting pass
+//         // NB we don't do decal texture here because this is repeated per light
+//         pass perlight
+//         {
+//             // Base bump map
+//             texture_unit normalmap
+//             {
+//                 texture Cube_Lava_NORM.jpg
+//                 colour_op replace
+//             }
+//         }
+
+//         // Decal pass
+//         pass decal
+//         {
+//             texture_unit decalmap
+//             {
+//                 texture Cube_Lava_COLOR.jpg
+//             }
+//         }
+//     }
+// }

Deleted: data/branches/Shader_HS18/materials/Cube_Lava_Normal-Mask.material
===================================================================
--- data/branches/Shader_HS18/materials/Cube_Lava_Normal-Mask.material	2018-11-28 09:02:11 UTC (rev 12119)
+++ data/branches/Shader_HS18/materials/Cube_Lava_Normal-Mask.material	2018-11-28 09:13:16 UTC (rev 12120)
@@ -1,57 +0,0 @@
-// Cube_Lava_Normal-Mask genrated by blender2ogre 0.6.0
-
-material Cube_Lava_Normal-Mask 
-{
-    receive_shadows on 
-
-    technique
-    {
-        pass Cube_Lava_Normal-Mask
-        {
-            ambient 0.800000011920929 0.800000011920929 0.800000011920929 1.0
-            diffuse 0.6400000190734865 0.6400000190734865 0.6400000190734865 1.0
-            specular 0.5 0.5 0.5 1.0 12.5
-            emissive 0.0 0.0 0.0 1.0
-
-            alpha_to_coverage off
-            colour_write on
-            cull_hardware clockwise
-            depth_check on
-            depth_func less_equal
-            depth_write on
-            illumination_stage 
-            light_clip_planes off
-            light_scissor off
-            lighting on
-            normalise_normals off
-            polygon_mode solid
-            scene_blend one zero
-            scene_blend_op add
-            shading gouraud
-            transparent_sorting on
-
-            texture_unit 
-            {
-                texture Cube_Lava_COLOR.jpg
-                tex_address_mode wrap
-                scale 1.0 1.0
-                colour_op modulate
-            }
-            texture_unit 
-            {
-                texture Cube_Lava_NORM.jpg
-                tex_address_mode wrap
-                scale 1.0 1.0
-                colour_op modulate
-            }
-            texture_unit 
-            {
-                texture Cube_Lava_MASK.jpg
-                tex_address_mode wrap
-                scale 1.0 1.0
-                scroll_anim 1.0 1.0 
-                colour_op modulate
-            }
-        }
-    }
-}

Modified: data/branches/Shader_HS18/materials/Cube_Lava_Normal.material
===================================================================
--- data/branches/Shader_HS18/materials/Cube_Lava_Normal.material	2018-11-28 09:02:11 UTC (rev 12119)
+++ data/branches/Shader_HS18/materials/Cube_Lava_Normal.material	2018-11-28 09:13:16 UTC (rev 12120)
@@ -1,76 +1,16 @@
+import * from "BumpMap.material"
 // Any number of lights, diffuse
-material Cube_Lava_Normal
+material Cube_Lava_Normal : BumpMap_Base
 {
     technique
     {
-        // Base ambient pass
         pass ambient
         {
-          // base colours, not needed for rendering, but as information
-          // to lighting pass categorisation routine
-          diffuse 0 0 0
-          depth_write on
-          depth_bias 0
-
         }
         // Now do the lighting pass
         // NB we don't do decal texture here because this is repeated per light
         pass perlight
         {
-
-            // do this for each light
-            iteration once_per_light
-            scene_blend add
-            depth_write on
-            depth_bias 1
-
-            // base colours, not needed for rendering, but as information
-            // to lighting pass categorisation routine
-            ambient 0 0 0
-
-            // Vertex program reference
-            vertex_program_ref BumpMapping/BumpMapVP
-            {
-                param_named_auto lightPosition light_position_object_space 0
-                param_named_auto worldViewProj worldviewproj_matrix
-            }
-
-            // Fragment program
-            fragment_program_ref BumpMapping/BumpMapFP
-            {
-                param_named_auto lightDiffuse light_diffuse_colour 0
-            }
-
-            // texture shadow receiver program
-            shadow_receiver_vertex_program_ref BumpMapping/BumpMapVPShadowRcv
-            {
-                param_named_auto lightPosition light_position_object_space 0
-                param_named_auto worldViewProj worldviewproj_matrix
-                param_named_auto worldMatrix world_matrix
-                param_named_auto texViewProj texture_viewproj_matrix
-            }
-            // Additive texture shadow receiver program
-            shadow_receiver_fragment_program_ref BumpMapping/BumpMapFPShadowRcv
-            {
-                param_named_auto lightDiffuse light_diffuse_colour 0
-            }
-
-            // Vertex program reference
-            vertex_program_ref BumpMapping/BumpMapVPSpecular
-            {
-                param_named_auto lightPosition light_position_object_space 0
-                param_named_auto eyePosition camera_position_object_space
-                param_named_auto worldViewProj worldviewproj_matrix
-            }
-
-            // Fragment program
-            fragment_program_ref BumpMapping/BumpMapFPSpecular
-            {
-                param_named_auto lightDiffuse light_diffuse_colour 0
-                param_named_auto lightSpecular light_specular_colour 0
-            }
-
-
             // Base bump map
             texture_unit normalmap
             {
@@ -82,13 +22,6 @@
         // Decal pass
         pass decal
         {
-            // base colours, not needed for rendering, but as information
-            // to lighting pass categorisation routine
-            lighting off
-            depth_write on
-            depth_bias 2
-
-            scene_blend dest_colour zero
             texture_unit decalmap
             {
                 texture Cube_Lava_COLOR.jpg
@@ -95,4 +28,4 @@
             }
         }
     }
-}
+}
\ No newline at end of file

Added: data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material
===================================================================
--- data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material	                        (rev 0)
+++ data/branches/Shader_HS18/materials/Cube_Lava_Normal_Blank.material	2018-11-28 09:13:16 UTC (rev 12120)
@@ -0,0 +1,31 @@
+import * from "BumpMap.material"
+// Any number of lights, diffuse
+material Cube_Lava_Normal_Blank : BumpMap_Base
+{
+    technique
+    {
+        pass ambient
+        {
+        }
+        // Now do the lighting pass
+        // NB we don't do decal texture here because this is repeated per light
+        pass perlight
+        {
+            // Base bump map
+            texture_unit normalmap
+            {
+                texture Cube_Lava_NORM.jpg
+                colour_op replace
+            }
+        }
+
+        // Decal pass
+        pass decal
+        {
+            texture_unit decalmap
+            {
+                colour_op_ex source1 src_manual src_current 0.8 0.8 0.8
+            }
+        }
+    }
+}

Added: data/branches/Shader_HS18/models/Cube_Lava_V2_Normal_Blank.mesh
===================================================================
(Binary files differ)

Index: data/branches/Shader_HS18/models/Cube_Lava_V2_Normal_Blank.mesh
===================================================================
--- data/branches/Shader_HS18/models/Cube_Lava_V2_Normal_Blank.mesh	2018-11-28 09:02:11 UTC (rev 12119)
+++ data/branches/Shader_HS18/models/Cube_Lava_V2_Normal_Blank.mesh	2018-11-28 09:13:16 UTC (rev 12120)

Property changes on: data/branches/Shader_HS18/models/Cube_Lava_V2_Normal_Blank.mesh
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property


More information about the Orxonox-commit mailing list