Author Topic: Making Object Materials?  (Read 1751 times)

Offline Ingredient

  • ~Dead men tell no tales~
  • Ancient Silver Mane
  • *****
  • Posts: 3,662
  • Country: 00
  • Floof-O-Meter: 366
    • Ingredient91
    • View Profile
Making Object Materials?
« on: September 23, 2011, 08:11:02 am »
i want to make some materials for some objects but idk how. I tried making a different crystal material and called it Crystal2Tex but idk how to get it up. In object maker i typed up Crystal2Mat and nothing happened. Any suggestions?
Will be inactive due to work and exams.

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: Making Object Materials?
« Reply #1 on: September 23, 2011, 12:33:08 pm »
3 things you need to make an object
Mesh
Texture Image
Material File & Code

So, you have the image, now you need to make the material file. Find the crystal material file, and make a copy of it. Rename the copy if you want. Now open it in notepad. Change the CrystalMat to whatever you want, and then in the image spot, put the name and format of the image you're going to use.
Depending on if you used a PNG or JPG, you would put
CrystalTex2.jpg
or
CrystalTex2.png

Offline Ingredient

  • ~Dead men tell no tales~
  • Ancient Silver Mane
  • *****
  • Posts: 3,662
  • Country: 00
  • Floof-O-Meter: 366
    • Ingredient91
    • View Profile
Re: Making Object Materials?
« Reply #2 on: September 23, 2011, 09:28:11 pm »
Ok i think i did the code right, is it?

material crystal2Mat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         emissive 1 1 1
         texture_unit
         {
            env_map spherical
            texture crystalTex2.jpg
         }
      }
   }
}
material crystalGlowMat
{
   technique
   {
      pass
      {
         scene_blend add
         depth_write off
         fog_override true
         texture_unit
         {
            texture crystalGlow.jpg
            tex_address_mode clamp
            wave_xform scale_x sine 0.9 0.5 0 0.1
            wave_xform scale_y sine 0.9 0.5 0 0.1
         }
      }
   }
}
« Last Edit: September 24, 2011, 05:27:13 am by Ingredient »
Will be inactive due to work and exams.

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: Making Object Materials?
« Reply #3 on: September 24, 2011, 12:43:27 pm »
material crystal2Mat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         emissive 1 1 1
         texture_unit
         {
            env_map spherical
            texture crystalTex2.jpg
         }
      }
   }
}
material crystalGlowMat
{
   technique
   {
      pass
      {
         scene_blend add
         depth_write off
         fog_override true
         texture_unit
         {
            texture crystalGlow.jpg
            tex_address_mode clamp
            wave_xform scale_x sine 0.9 0.5 0 0.1
            wave_xform scale_y sine 0.9 0.5 0 0.1
         }
      }
   }
}

What are you going to do with this part?
Other than that, yes it looks right.

Offline Ingredient

  • ~Dead men tell no tales~
  • Ancient Silver Mane
  • *****
  • Posts: 3,662
  • Country: 00
  • Floof-O-Meter: 366
    • Ingredient91
    • View Profile
Re: Making Object Materials?
« Reply #4 on: September 24, 2011, 09:13:15 pm »
Well im not too sure wat that part is im thinking its the glow. If it is the glow than i was just gonna leave it. Would i type in crystal2Mat to get the material?
Will be inactive due to work and exams.

Thunderheart

  • Guest
Re: Making Object Materials?
« Reply #5 on: September 24, 2011, 10:52:46 pm »
It's the glow for the normal crystal, but since it already exists you can delete that code.
& yup.

Offline Ingredient

  • ~Dead men tell no tales~
  • Ancient Silver Mane
  • *****
  • Posts: 3,662
  • Country: 00
  • Floof-O-Meter: 366
    • Ingredient91
    • View Profile
Re: Making Object Materials?
« Reply #6 on: September 24, 2011, 11:20:20 pm »
Ok this is the code now

material crystal2Mat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         emissive 1 1 1
         texture_unit
         {
            env_map spherical
            texture crystalTex2.jpg
         }
      }
   }
}


But its not showing up on Object maker it keeps saying its not found. Im using the normal crystal1.mesh do i hav to make a new one but rename it to crystal2.mesh?
Will be inactive due to work and exams.

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: Making Object Materials?
« Reply #7 on: September 25, 2011, 04:05:00 am »
No, it should just come up when you type crystal2Mat

Offline Ingredient

  • ~Dead men tell no tales~
  • Ancient Silver Mane
  • *****
  • Posts: 3,662
  • Country: 00
  • Floof-O-Meter: 366
    • Ingredient91
    • View Profile
Re: Making Object Materials?
« Reply #8 on: September 25, 2011, 05:46:12 am »
Well its not showing up, does it hav to be in a certain folder?

Ive made

-crystal2Tex
-crystal2 (The code on Notepad)
-crystal2.mesh

The crystal glow stuff is not in the code anymore as shown above, would that still need to be there u reckon?

Heres the original code

material crystalMat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         emissive 1 1 1
         texture_unit
         {
            env_map spherical
            texture crystalTex.jpg
         }
      }
   }
}
material crystalGlowMat
{
   technique
   {
      pass
      {
         scene_blend add
         depth_write off
         fog_override true
         texture_unit
         {
            texture crystalGlow.jpg
            tex_address_mode clamp
            wave_xform scale_x sine 0.9 0.5 0 0.1
            wave_xform scale_y sine 0.9 0.5 0 0.1
         }
      }
   }
}


Was there something i missed maybe?
Will be inactive due to work and exams.