Feral Heart

Help & Guidance => Game Help => Topic started by: rawr_loud on July 14, 2011, 08:01:22 pm

Title: Material Files?
Post by: rawr_loud on July 14, 2011, 08:01:22 pm
How do I make a material file out of a .png image? Do I need a special program?
Title: Re: Material Files?
Post by: Redlinelies on July 14, 2011, 08:09:23 pm
For what exactly do you plan on using this image for?
Title: Re: Material Files?
Post by: rawr_loud on July 14, 2011, 08:19:13 pm
For a custom mesh texture. I already have the image made, I just want to make it a .material file so I can use it in game
Title: Re: Material Files?
Post by: rawr_loud on July 14, 2011, 08:35:40 pm
Oh, and sorry to double post but I forgot some information. I will download any program to convert it and the .png image is laid out correctly. I already have the .mesh files I just need the textures to get on them. :3
Title: Re: Material Files?
Post by: DimensionGal on July 14, 2011, 08:57:38 pm
Depends on what kind of coding you want for the .material file. There's lots of codes that do different things.

This is the basic coding for a .material file:
Code: [Select]
material materialname
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture picturename.jpg
}
}
}
}

1. Copy all of that, paste it into a blank notepad file.

2. Replace the "materialname" with whatever you want your material to be called. It's case-sensitive, just keep that in mind.

3. Replace the "picturename.jpg" with your picture's name and extention. Materials can be a .jpg or a .png.

4. Save the file in Feral Heart's Objects folder somewhere, preferably in my_objects.

5. Open the place where you saved it, click on it so you can rename it. Get rid of .txt extention, and put .material instead.

6. You have a basic .material file! ^.^
Title: Re: Material Files?
Post by: rawr_loud on July 14, 2011, 09:04:40 pm
Thank you!
Title: Re: Material Files?
Post by: rawr_loud on July 14, 2011, 09:10:29 pm
Wait... where do I put .material? I didn't quite understand. When I clicked on it in my_objects, the notepad came up and I couldn't save it as a .material. >.<
Title: Re: Material Files?
Post by: Thunderheart on July 14, 2011, 09:37:55 pm
I guess you have to remove the .txt and put .material instead. I would do it while saving, instead of choosing 'txt files' (or whatever is there, in the lower box at the bottom) choose 'all file types' and put a .material in the upper box after the file name.