OgreMax: duplicate material definitions

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
JDX_John
Gnome
Posts: 397
Joined: Sat Nov 08, 2008 1:59 pm

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.
0 x

JDX_John
Gnome
Posts: 397
Joined: Sat Nov 08, 2008 1:59 pm

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?
0 x

Rykemapo
Gnoblar
Posts: 6
Joined: Wed Apr 30, 2014 2:35 pm

Re: OgreMax: duplicate material definitions

Postby Rykemapo » Fri Jan 16, 2015 10:08 pm

We had the same problem. It is in the original *.max file. Your artist made copies of materials instead of instances of materials.
Our artist took it one step further and renamed the copies. Now I have 15 times more materials and subentities than I should, which is killing my performance.
0 x


Return to “Artists & Content Creators”

Who is online

Users browsing this forum: No registered users and 3 guests