OgreMax: duplicate material definitions

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.

OgreMax: duplicate material definitions

Postby JDX_John » Thu Dec 22, 2011 12:57 pm

I've noticed one model we are exporting is creating many copies of the same materials in the resulting .material file... I think multiple parts of the original (3DS) model use the same material but why would they export individually?

Initially all the copies were identical, but after we tweaked some things now we even get the same material with different definitions... here is a sample:
Code: Select all
material ski
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.952941 0.894118 0.737255 1
         specular 0.2 0.2 0.2 1 56.4386
      }
   }
}

material ext
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.8 0.8 0.8 1
         specular 0.2 0.2 0.2 1 56.4386

         texture_unit
         {
            texture heok1.jpg
         }
      }
   }
}

material ski
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.952941 0.894118 0.737255 1
         specular 0.2 0.2 0.2 1 56.4386
      }
   }
}

material ski
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.952941 0.894118 0.737255 1
         specular 0.2 0.2 0.2 1 56.4386
      }
   }
}

material art2
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.543333 0.0966667 0.16 1
         specular 0.08 0.08 0.08 1 61.4975
         scene_blend one_minus_src_colour dest_colour
      }
   }
}

material art2
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.543333 0.0966667 0.16 1
         specular 0.08 0.08 0.08 1 61.4975
      }
   }
}

material art2
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.543333 0.0966667 0.16 1
         specular 0.08 0.08 0.08 1 61.4975
         scene_blend one_minus_src_colour dest_colour
      }
   }
}

material art2
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.543333 0.0966667 0.16 1
         specular 0.08 0.08 0.08 1 61.4975
         scene_blend one_minus_src_colour dest_colour
      }
   }
}

material ski
{
   technique
   {
      pass
      {
         ambient 0 0 0 1
         diffuse 0.952941 0.894118 0.737255 1
         specular 0.2 0.2 0.2 1 56.4386
      }
   }
}

As a non-artist I can't comment if this is a bug in OgreMax, a bug in the original models, or "just how things work", but it seems to me the same material should only be emitted once? Any advice on how to approach this is welcome.
JDX_John
Gnome
 
Posts: 397
Kudos: 2
Joined: 08 Nov 2008

Re: OgreMax: duplicate material definitions

Postby JDX_John » Thu Mar 08, 2012 6:03 pm

Had the same problem on another 3DS scene... bump! Anyone had this problem, anyone able to suggest what to do about it?
JDX_John
Gnome
 
Posts: 397
Kudos: 2
Joined: 08 Nov 2008


Return to Artists & Content Creators

Who is online

Users browsing this forum: No registered users and 3 guests