Feral Heart

Help & Guidance => Game Help => Topic started by: DarkmoonNight on March 29, 2012, 11:43:55 am

Title: Material files...
Post by: DarkmoonNight on March 29, 2012, 11:43:55 am
Hello. This isn't really a problem, more like a question. Well, I don't know if this is the right place to post this. If it isn't, please tell me the right place and move it if possible.
Well, this is my question:
I've been needed to make some textures for one of my maps. But I don't like to change the texture of downloaded objects and such over and over again since I'm needing them too. And my question is: How do I make my own material files?I tried to add images into my_objects but it didn't work.(Such fail xD).

Thank you!
Title: Re: Material files...
Post by: Ingredient on March 29, 2012, 02:39:21 pm
Okay, lets start.

Go to the "rocks" folder (or any other folder, rocks just have a more basic code i guess you could put it) and see that .material file named "rock.material"? First copy and paste it then right click it and choose open. It wont open will it? There should be an option asking you to use a list of installed programs. Choose that options and Notepad should be there. Yes, the file needs to be opened with Notepad.   
You will see a whole list of all the rock materials. They would all look similar to this...

material rockMat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture rockTex.jpg
         }
      }
   }
}

Name your material here, rockMat is typed into the Material box in Object Maker to bring the texture up. Make your own by replacing this rockMat with something of your fancy.

Type in the name and format of the image you plan on using.

You can delete the rest of the other codes if you want, so its just the one like i have above.

When your ready to save do so by clicking "File>>Save" NOT "Save as" but just "Save". You can rename this file if you want and move it elsewhere.

If your wanting a transparent texture this code wont work.
Title: Re: Material files...
Post by: DarkmoonNight on March 29, 2012, 04:00:39 pm
Okay, lets start.

Go to the "rocks" folder (or any other folder, rocks just have a more basic code i guess you could put it) and see that .material file named "rock.material"? First copy and paste it then right click it and choose open. It wont open will it? There should be an option asking you to use a list of installed programs. Choose that options and Notepad should be there. Yes, the file needs to be opened with Notepad.   
You will see a whole list of all the rock materials. They would all look similar to this...

material rockMat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture rockTex.jpg
         }
      }
   }
}

Name your material here, rockMat is typed into the Material box in Object Maker to bring the texture up. Make your own by replacing this rockMat with something of your fancy.

Type in the name and format of the image you plan on using.

You can delete the rest of the other codes if you want, so its just the one like i have above.

When your ready to save do so by clicking "File>>Save" NOT "Save as" but just "Save". You can rename this file if you want and move it elsewhere.

If your wanting a transparent texture this code wont work.

Ooh I get it now, thank you! I'm going to try it.
And if I want transparent I should do the same with the oak leaf for example right? And also being png, I know that 8D.
Thank you very very very very very very much! I've been looking for that for ages. -Nuzzles-
Title: Re: Material files...
Post by: Ingredient on March 30, 2012, 07:27:41 am
Your very welcome, yes you could the oak leaf code for transparency. I havent tried it yet. It can be either .png or .jpg or other formats i believe. 
Title: Re: Material files...
Post by: DarkmoonNight on March 30, 2012, 08:52:25 am
Your very welcome, yes you could the oak leaf code for transparency. I havent tried it yet. It can be either .png or .jpg or other formats i believe. 
Well it should be png since transparency doesn't work on jpg.
Title: Re: Material files...
Post by: Ingredient on March 30, 2012, 12:39:30 pm
Yes, transparency should always be .png. I thought you were talking about all codes, which is why i suggested .jpg.