Feral Heart

Help & Guidance => Game Help => Topic started by: BlackRidgeWolf on March 18, 2014, 11:57:46 pm

Title: Map/Sky Help
Post by: BlackRidgeWolf on March 18, 2014, 11:57:46 pm
I was making a sky for one of my maps and I noticed once I clicked on the 'sun', there was a 'Material' option. Would it be possible to change the sun just for that certain map? If so, how would I do that?
Title: Re: Map/Sky Help
Post by: Ingredient on March 19, 2014, 09:01:56 am
What you will need to know for this is using .material files and editing images.

You may want to refer to my Sky Maker tutorial for saving a custom sky: http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=12567.0 (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=12567.0)

The tutorial will cover how to use a custom sky in your maps. You don't have to make a whole new sky, you can just change the sun texture and leave it at that and continue with the rest of the instructions.



I personally would work in the Sky folder, just to keep everything organised. Go to your Feralheart >> Media >> Sky folder and copy and paste one of the .material files. Doesn't matter which one just make sure it's a .material file. Also copy one of the images like rain.png or snow.png. Once copied you can rename it, same goes for the .material file.

Notice how all the images in your particles and sky folder have black background? If you use a texture for a rock for example it will only show as a white square. That's why it's important to have the black background. Open your copied image in a program such as GIMP. Colour the whole image black and find the image of your sun and paste it on. You can go ahead and save. You pretty much just need a cropped photo of a sun or whatever you wish, no need to colour the whole thing in. Whatever isn't black will show, that's why there is a black background.

Now for the .material file...

You will need to open it up with Notepad. You can do this by right-clicking the file and choosing Open/Open With and then select Notepad (or what I prefer, Notepad++ (http://notepad-plus-plus.org/))

Delete everything inside the file and replace it with this:


Code: [Select]
material NAME
{
technique
{
pass
{
lighting off
scene_blend add
depth_write off
fog_override true
cull_hardware none
cull_software none
texture_unit
{
texture IMAGE.png
}
}
}
}

Where it says NAME at the top you can replace to anything you like. It's what you will need to type in the Material box in Sky Maker.

Where it says IMAGE is where you type in your image name. It would be best to save your sun's texture as a .png and not .jpg.

Go ahead and click File >> Save. You can continue to Sky Maker now and test out your image. Click Sun and change type in your material name and see if it worked. You can then go ahead and save it, instructions on saving sky files and adding them to your map are located in the tutorial I posted.

I hope this helps, if you are having troubles just let me know :)