Index: plugins/engine/3d/engine.h
===================================================================
--- plugins/engine/3d/engine.h	(revision 25749)
+++ plugins/engine/3d/engine.h	(working copy)
@@ -768,6 +768,12 @@
   csRef<iGraphics3D> G3D;
   /// Pointer to the shader manager
   csRef<iShaderManager> shaderManager;
+  
+  /// Store virtual clock to speed up time queries.
+  csRef<iVirtualClock> virtualClock;
+
+  /// Store engine shadervar names
+  csStringID id_creation_time;
   /**
    * This is the Virtual File System object where all the files
    * used by the engine live. Textures, models, data, everything -
@@ -879,9 +885,6 @@
    */
   csRef<iReporter> reporter;
 
-  /// Store virtual clock to speed up time queries.
-  csRef<iVirtualClock> virtualClock;
-
   /// Default render loop
   csRef<iRenderLoop> defaultRenderLoop;
   csString override_renderloop;
Index: plugins/engine/3d/engine.cpp
===================================================================
--- plugins/engine/3d/engine.cpp	(revision 25749)
+++ plugins/engine/3d/engine.cpp	(working copy)
@@ -642,6 +642,9 @@
   {
     globalStringSet = CS_QUERY_REGISTRY_TAG_INTERFACE (
       objectRegistry, "crystalspace.shared.stringset", iStringSet);
+
+    id_creation_time = globalStringSet->Request("mesh creation time");
+
     csConfigAccess cfg (objectRegistry, "/config/engine.cfg");
 
     maxAspectRatio = 4096;
Index: plugins/engine/3d/meshobj.cpp
===================================================================
--- plugins/engine/3d/meshobj.cpp	(revision 25749)
+++ plugins/engine/3d/meshobj.cpp	(working copy)
@@ -161,6 +161,12 @@
 
   last_camera = 0;
   last_frame_number = 0;
+
+  // Set creation time on the mesh
+  csRef<csShaderVariable> sv_creation_time;
+  sv_creation_time.AttachNew(new csShaderVariable(engine->id_creation_time));
+  sv_creation_time->SetValue((float)engine->virtualClock->GetCurrentTicks() / 1000.0f);
+  GetSVContext()->AddVariable(sv_creation_time);
 }
 
 void csMeshWrapper::SelfDestruct ()
