Feral Heart

Help & Guidance => Member Made Tutorials => Presets & Markings Tutorials => Topic started by: Ruby1234 on August 25, 2012, 02:48:32 pm

Title: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on August 25, 2012, 02:48:32 pm
EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing


The lion preset
used in this tutorial
came with FH and
does not belong to me,
nor do I claim it as mine.

Yay, time for fun. Well I find this fun anyways, no guarantee you will.
Anyhow, I'm going to be showin' ya a few things about material codes. You know, those things that are found in the presets folders? If you dun know what materials are, you probably shouldn't be here. :3

Kayso, if I dun do a code that you want, you can request one as a comment or PM.
So let's get right to it~

The codes for Preset Mane Fix and Scrolling are located here in the first post. All other codes will be linked below:
How to: Add Wings to Your Preset (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=17301.0) (Works with all presets, not just 11 & 12)
Ghost Code (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg341652#msg341652)
Glow & Shading (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg379366#msg379366) (Emissive & Ambient - Does not cover glowing markings.)
Metallic Markings (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg465661#msg465661)
Transparent & Semi-Transparent (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg467116#msg467116)
Glowing Markings (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg555462#msg555462)

Preset Mane Fix
-The first thing I'm going to start off with is the mane fix for presets, since this seems difficult for people to find. You only need this code if you're using anything but the fluffy mane.

Go to your preset's material file, open it in notepad.
Scroll down to the mane code (should be the very bottom, and should read something like this:)

Code: [Select]
material preset_#_maneMat
{
technique
{
pass
{
lighting off
cull_hardware none
cull_software none
scene_blend alpha_blend
depth_write off
texture_unit
{
texture preset_#mane.png
}
}
}
}

Now all you do is select that section, copy this:

Code: [Select]
material preset_#_maneMat
{
        technique
        {
                pass
                {
                        cull_hardware none
                        cull_software none
                        alpha_rejection greater_equal 128
                        texture_unit
                        {
                                texture preset_#mane.png
                        }
                }
        }
}

and paste this over the previous selection. Then look for the # signs in the code, and replace it with the preset's number, which is found in the name of that preset's files. If done correctly, you would be going from this:
(http://i.imgur.com/uCM10bf.png)

to this:

(http://i.imgur.com/7Vb0mHw.png)

_______________________________________

Scrolling
-This works for meshes and presets, and this just makes the texture flow across the entire thing, or, if you wanted, you could restrict the flow to a certain spot, and have it be a certain color. For this example, and all examples to follow, I will be using presets. Let's get started.

Go to your material file, and open it in notepad.
You'll have the basic codes, which look something like this:

Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}

I recommend that, like this code above, you change all your image formats to .png. It's just easier to work with materials that way.
Now, to get your textures to scroll, all you need to do is add the line:
scroll_anim 1.0 1.0
underneath the texture names, like so:

Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.png
scroll_anim 1.0 1.0
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
scroll_anim 1.0 1.0
}
}
}
}

Now, this will probably create a very weird looking preset, but might be okay on a mesh.
However, you can choose to restrict the flow, and have it be any texture you want. How you ask? Well, by layering it of course! Now, if you've ever tried to make layers on an image and use it in FH, it probably didn't work all that well. However, it is possible to layer images onto presets/meshes, using the material coding:

(http://i.imgur.com/fmbM7lT.gif)

Let's get started.

Open your material and start with the basic coding again, but with .png formats again also.

Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}

Now, we'll need two textures here.
1, your preset's actual texture:

(http://i.imgur.com/TyNOBcF.png)

and 2, the texture that will be scrolling. Normally, one picks a gradient to be scrolling, like my preset above:

(http://i.imgur.com/tpA1Rf9.png)

Get your two textures and then come back.




Back? Okie.
Well, I'mma have to send you away again real quick. What you need to do now, is get your preset's actual texture, and take your /eraser/ tool, to make the markings, the place where you want the scrollyness to go. :3

(http://i.imgur.com/Cj1vVCQ.png)

So go do that if you dun have it done.




Back again? Okay.
Now it's time to layer it in with the coding.
Go to your code, and replace it with this one:

Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
scroll_anim 1.0 1.0
}
}
}
}

Now in notepad press Ctrl+H and it'll come up with replace (or just do Edit>Replace..)
and type in
_#
in the first box, then in the second type
_
and then after the underscore, put the number of your preset.
Then click replace all.
Now you may need to do some manual editing with the image names, because you might not have selected the same names as me.
But once you have everything pieced together, you should end up with a pretty nice result. :3

(http://i.imgur.com/NqYtOXM.gif)
(Sorry, it came out low quality for some reason, I'll redo it later. xD)

Now, the line
scroll_anim 1.0 1.0
can be edited.
The numbers can be changed to even negative integers.
Just to create some other effects. :3
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: animals_rock on August 25, 2012, 03:04:24 pm
Thanks for posting this. This will be very helpful c:
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: Ruby1234 on August 25, 2012, 03:06:25 pm
Thanks for posting this. This will be very helpful c:

You're welcome and thanks! :3
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: greystar on August 26, 2012, 01:38:26 am
AWESOMESAUCE
      Thy SO much i was wondering how 2. Now all i need to know is how to put pics in my FH acc >_>....
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: greystar on August 29, 2012, 12:08:29 am
Ok got it to work... how i make things INVISABLE? >:3
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: hugrf2 on August 29, 2012, 08:01:06 am
 Thank you, now i can make randomized and beautiful presets,  YOU ARE THANKED!  ;)  Floor-O-Meter for you!  XD
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: hugrf2 on August 29, 2012, 01:07:31 pm
 *Looks at preset* when i made the preset it didn't show up in-game and i followed everything and NON of the preset showed up in-game and i just edited the head to be moving or whatever!
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: Ruby1234 on September 01, 2012, 12:43:25 pm
PM me your material code and I'll look it over. c:
Title: Re: Material Codes for You! (Makes effects on your Preset and/or Meshes!)
Post by: Dafniforfree on September 01, 2012, 01:01:42 pm
wow awesome all I needed :O
Title: Re: Material Codes for You! (Preset Mane Fix / Scrolling +more soon
Post by: Ruby1234 on September 01, 2012, 02:45:31 pm
EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing


Ghost
-This will make your presets look semi-transparent, like a ghost!

We start with a preset.

(http://i.imgur.com/AXtd7Oz.png)

(If you don't have a preset yet, you need one. I use preset 2 for the purpose of this tutorial, but you need your own. So go get one if you dun have one.)

Now, your preset's code probably looks something like this:
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}

Well, we are going to make some changes.
First thing you want to do is make a 512x512 square of any color you want. This is going to add the ghost tint to your character, so you can make it lighter or darker depending on how you want it.
This is my ghost layer:

(http://i.imgur.com/qXqVyB8.png)

Once you have the color you want,
name it
preset_#ghost.png
And of course change the # to your preset's actual number.

Next, we need to change the coding.
Open your preset's material file in notepad.
Select everything, and delete it.
Copy and paste this into it:
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
texture_unit
{
texture preset_#ghost.png
}
}
}
}

Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.

Save and close that.

Open FH and look at your preset. It will have layered the color over it.

(http://i.imgur.com/0unyxUp.png)

Now is the time to change the ghost.png if you don't like how the color turned out.

Once you have it the way you want it, we're doing some code replacing again! (Yay.)

Now there are two ways to do this. The first way makes it really bright, the second way makes it a little dimmer. So skip down to the one that you want, and we'll continue.

First way:

(http://i.imgur.com/6dwMtuF.png)

Open your preset's code in notepad and once again, erase it all,
and replace it with this:
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}

Now repeat the replacing process:
Quote from: Me
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.

Save and close and take a look ingame!


Second way:

(http://i.imgur.com/QRvlqGs.png)

Open your preset's code in notepad and once again, erase it all,
and replace it with this:
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}

Now repeat the replacing process:
Quote from: Me
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.

Save and close and take a look ingame!

One last thing,
if you don't like the teeth and eyes showing through,
we can fix that.
Replace your preset's eye texture with a 512x512 transparent square.

Then open the material file in notepad and look for the eye codes, which look like this:
Code: [Select]
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
ambient 0.2 0.2 0.2 1
scene_blend add
texture_unit
{
texture preset_#ghost.png
}
}
}
}

We're going to highlight those sections of the code in notepad, and replace it with this code:
Code: [Select]
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#eye.png
}
}
}
}material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#eye.png
}
}
}
}
Once again, repeat the replacing process:
Quote from: Me
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.

And now you should be all set.
The eyes and teeth will no longer show through. :3

(http://i.imgur.com/tICZJlI.png)

And if you want, you can even draw on some eyes onto the head texture.
Lolz.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 01, 2012, 04:47:39 pm
PM me your material code and I'll look it over. c:
Mk, PMed it.  :)
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on September 01, 2012, 08:25:05 pm
Mk, PMed it.  :)

Looks like you made a mistake while editing. I'll send a fixed version. c:
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 01, 2012, 09:25:14 pm
Thanks! i'm gonna wait for the PM.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: CreamWolf on September 01, 2012, 10:55:53 pm
Ohhooohooho. c: This'll be helpful to those seeking to make a dynamic preset. Sure, there are many other threads for this, but you provided animated previews, which makes it stand out.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Jessie Dagger on September 05, 2012, 09:42:57 am
This is so awesome, you explained a lot of things, and that really helped.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 05, 2012, 09:48:38 am
When ya gonna PM me the fixed version?
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 05, 2012, 11:59:30 am
 By the way i tried the scroll code again then the ENTIRE file didn't even work in-game! and I'm pretty sure i did it right.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on September 08, 2012, 12:02:02 am
I already sent it.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 08, 2012, 02:26:55 am
I might need to change my name because of this stupid PM problem 3:< Just post the PM....  :-\
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on September 08, 2012, 09:08:14 pm
I might need to change my name because of this stupid PM problem 3:< Just post the PM....  :-\

Alright...
As I was going to say in the PM,
a lot of stuff ended up way different than the original code, which can't happen.
A lot of your lines read as:
preset__bodyMatL
which isn't even one of the mats.
So I believe something went wrong with your replacing.
Nevertheless, here's a fix.
Code: [Select]
material preset_4_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_4body.jpg
}
}
}
}
material preset_4_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_4body.jpg
}
}
}
}
material preset_4_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_4headsoft.png
scroll_anim 1.0 1.0
}
texture_unit
{
texture preset_4head.png
colour_op alpha_blend
}
texture_unit
{
texture preset_4head.png
colour_op_ex blend_current_alpha src_texture src_current
tex_address_mode wrap
filtering trilinear
}
}
}
}
material preset_4_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_4headsoft.png
scroll_anim 1.0 1.0
}
texture_unit
{
texture preset_4head.png
colour_op alpha_blend
}
texture_unit
{
texture preset_4head.png
colour_op_ex blend_current_alpha src_texture src_current
tex_address_mode wrap
filtering trilinear
}
}
}
}
material preset_4_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_4eye.jpg
}
}
}
}
material preset_4_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_4eye.jpg
}
}
}
}
material preset_4_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_4tail.jpg
}
}
}
}
material preset_4_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_4mane.png
}
}
}
}
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 08, 2012, 09:14:38 pm
Thank you a ton!
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: DragonSoul99 on September 19, 2012, 01:56:30 am
This is awesome! I'll have to try this once I get the hang of making presets! :D
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: hugrf2 on September 19, 2012, 10:13:42 pm
I have an idea for another code in these tutorials. Could you do a glowing marking on a preset tutorial in here too? The only one that i saw got me confused at one of the most important parts with the picture and the word "Transparent" for some reason. Could you? It would mean a lot to me.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on September 21, 2012, 12:42:49 am
This is awesome! I'll have to try this once I get the hang of making presets! :D

Thanks. :3

I have an idea for another code in these tutorials. Could you do a glowing marking on a preset tutorial in here too? The only one that i saw got me confused at one of the most important parts with the picture and the word "Transparent" for some reason. Could you? It would mean a lot to me.

Sure. :3
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Tessel. on September 21, 2012, 02:08:30 pm
Helpful c: Thanks
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: mevsyouvsthem9 on September 22, 2012, 05:49:04 pm
YES! I now know how to do this awesomeness! But sadly I am working on the head and no matter what I do it wont show up on preset maker :( im not sure about the tail and eyes, but so far only the body shows up. Can you help??
ha nvm i fixed it
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: aviannerd on September 30, 2012, 04:32:43 pm
Can I pm my MC to have it fixed? I lost  the two presets I tryed in-game...
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Smiling.Sin on September 30, 2012, 10:56:24 pm
My preset's head won't show up. It's base-white.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: aviannerd on October 02, 2012, 12:25:06 am
Yikes....
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on October 02, 2012, 12:36:28 am
You both can PM me the materials, and I'll see what's up. c:
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: .General.. on October 02, 2012, 07:27:58 pm
I'm having the same problem as others...The body will show up with animation but the head just shows up base white 3: Help would be appreciated X3
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on October 02, 2012, 11:20:17 pm
Can you show a screenie and possibly PM me the material code so I can haz a lookie? c:
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: greystar on October 02, 2012, 11:43:39 pm
the head and tail wont appear! D: ~X3X~ Halp!  :'(
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on October 03, 2012, 12:33:50 am
PM me your material code. c:
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on October 03, 2012, 10:39:14 pm
Edit: (Lmao shoot double post.)

Original: All people that PM'd me have had fixes sent, please check your inboxes.
Also, I am now working on the next entries, which will be Transparent and Glowing. Hopefully those will be up this weekend.
Derrrp~
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: SilverTW on October 04, 2012, 11:55:21 am
Nice, I'm good at this too XD
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: aviannerd on October 04, 2012, 08:22:48 pm
Same problem, head won't show  up.
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on October 04, 2012, 09:28:06 pm
Guys, if you are getting things that show up basewhite, you either replaced the numbers or names wrong, or your images are in the wrong format.
If that's not the case, then I really don't know what you're doing. xD
Title: Re: ? Material Codes for You! (Preset Mane Fix / Scrolling / Ghost Added! ?
Post by: Ruby1234 on November 07, 2012, 04:55:14 am
EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing


Glow
-Make the entire preset glow in the dark! (DOES NOT COVER GLOWING MARKINGS)

We start with a preset.

(http://i.imgur.com/AXtd7Oz.png)

(If you don't have a preset yet, you need one. I use preset 2 for the purpose of this tutorial, but you need your own. So go get one if you dun have one.)

Now, your preset's code probably looks something like this:
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}

Well, time for some glowyness.
Now, if we want just the whole preset to glow, then it's really quite simple. xD
You need only add one line, which is the emissive line.
Your best bet is to probably add
emissive 1.0 1.0 1.0 1.0
above every
texture_unit
'cause that's basically a standard glow.
However, we can add some color to our glowyness.
The way the emissive code works is really quite simple.
emissive 1.0 1.0 1.0 1.0
^ Basically explains it.
Each number controls a color value.
The first number controlling red, the second, green, the third, blue.
The last one, however, does not control white, it controls alpha. If you dunno what that is, then you best just leave it at 1.0
You'll end up with
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
emissive 1.0 1.0 1.0 1.0
texture_unit
{
texture preset_#mane.png
}
}
}
}

or something similar.
You can copy/paste that into your material file and then;

Quote from: Me lol
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.

then you can change the emissive values to your liking.

Now, you may test this out in-game and be like,
Ruby,
I don't even see a difference.

Probably not. lol.
You see, FH doesn't ever really get dark.
At night, everything is still pretty bright, so it's hard to tell the difference between something that's glowing and something that's not.
Your best bet is to go crouch in the corner of Ficho.
You'll possibly see the difference then.

So now you're probably like,
okay,
so what's the point of glowyderpness if you can't even see the difference?
Truth is, there isn't one,
unless you are going to do part of the preset normal or ambient, and then have glowing markings or eyes.
Best results if you use ambience~
_______________________________________

Ambient
-Make presets/objects more sensitive to light changes!
--This covers ambience alone, THIS POST DOES NOT COVER GLOWING MARKINGS.

We start with a preset.

(http://i.imgur.com/AXtd7Oz.png)

(If you don't have a preset yet, you need one. I use preset 2 for the purpose of this tutorial, but you need your own. So go get one if you dun have one.)

Now, your preset's code probably looks something like this:
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}

And all we are going to do is add one line above each
texture_unit
and that line is ambient.
The ambient line tells us how much light is going to be reflected off the object or character.
The default is
ambient 1.0 1.0 1.0 1.0
so using that won't help us.
Your best bet is probably
ambient 0.5 0.5 0.5 1.0
'cause it's right around the middle;
(http://i.imgur.com/TDZnptq.png)
'course, you could go darker if you want.
But remember, to go darker, you must decrease the values, not increase them.

Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#mane.png
}
}
}
}

Replace your code with that, and then;

Quote from: Me Again
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.

That's basically it, but there are other options too.
Ambient works like emissive,
the first three values correspond to red, green, and blue.
This allows for tinting, by making one value slightly (or drastically) higher than the others.

(http://i.imgur.com/GUnXpP5.png)

Above, I increased the red value, and slightly decreased the other two on one side of the preset, tinting that side red.

Next post will cover glowing markings.

Meeeowww!~
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: greystar on December 21, 2012, 04:51:57 pm
i fixed it by doing this : copying the mesh area (such as body) that works, paste it OVER eyes, replace body with eyes (MANUALLY, NOT CTRL+H OR IT WONT WORK XD) and voiala! hope dish helps.
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Ruby1234 on December 22, 2012, 05:58:44 am
i fixed it by doing this : copying the mesh area (such as body) that works, paste it OVER eyes, replace body with eyes (MANUALLY, NOT CTRL+H OR IT WONT WORK XD) and voiala! hope dish helps.

(http://27.media.tumblr.com/tumblr_lk06lvRy4p1qeijdeo1_500.gif) I'm confused.

There was nothing broken in the first place?
Or, your last post in here was about head and tail, idk what we are doin' talking about eye fixes now.

But um, yeah.

Ctrl+H works only if you use a new piece of coding to replace numbers, not body parts, yeah...

Sorry I'm just confused. xD

But hey, you got something working so, yay! c:

--

Oh and to everyone about their scrolling code issues.
I've updated the material code slightly, and you only need 1 scrolling texture.
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Jaded on January 12, 2013, 09:51:46 pm
I have one request~ Can you make a tutorial for metallic markings with a code?
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Logical on January 13, 2013, 03:50:36 am
Alright...I have only one problem.  NO matter the coding or texture my manes look blocky and or weird looking. Mind helping me?;A;
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: SilverTW on January 13, 2013, 03:46:37 pm
@Logic:
I could also help you. What exactly do you mean by 'weird looking'? And by 'blocky' do you mean like as blocky as it would be in Minecraft? Also a picture would be helpful. Don't forget a copy of your script for the mane, otherwise we can't view what you've done wrong. Also, re-install FeralHeart and try to see if that fixes it. If not, it (possibly) could be your computer's graphics that are bad, or maybe it's just something wrong in your coding script that is making it do that.
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Logical on January 13, 2013, 04:27:03 pm
I tried all coding, and I am usually pretty good at coding, but  by blocky I mean, that it looks like it is squares instead of spikes.~Faceplant.~
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: SilverTW on January 13, 2013, 06:52:07 pm
Hmm.. Well that is weird. I'm very good at coding too. But honedtly, I've never heard of a mane being blocky ever. Well, if this is the case, check to see if your mane texture isn't screwed up (By mane texture, I mean literally the texture files found in FeralHeart>Media>Textures). If that isn't messed up, then, it must be a error within the coding of your preset for sure. I highly recommend you re-install a new copy of FeralHeart, because things tend to go wrong sometimes. If you provide your script, I may be able to fix it maybe. Trust me, try one of these, it may help. If not, well try making a completely new preset and see if it happens. If still, then try deleting every single preset and try then. If it still does not work, well, I don't know.
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Ruby1234 on January 18, 2013, 01:26:54 pm
Sorry I haven't been updating this thread as much guys. I've been really busy with school.
If any of you still need help, please PM me with a screenshot of your problem.
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: greystar on January 21, 2013, 02:55:25 pm
lol i mean over parts tht arent working~ get things mixed up sometimes XD
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: BuioUmbra on January 24, 2013, 07:55:42 pm
I found out that experimenting with codes and trying new things with them is really fun :3 I never thought i would like preset coding and here i am now wishing I had known it was so fun.
-le runs to preset maker-
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Ruby1234 on January 26, 2013, 12:55:14 pm
I found out that experimenting with codes and trying new things with them is really fun :3 I never thought i would like preset coding and here i am now wishing I had known it was so fun.
-le runs to preset maker-

Glad you like it. c:
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: fireheart101 on February 13, 2013, 01:01:33 pm
Hay this really helped me. I'm not sure if you did put this in but how do you make one body part invisible?
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: greystar on February 13, 2013, 11:38:52 pm
You need gimp. Save ur preset image as a png file and erase the part u want invisiable. Look it up on utube and click on the link in it
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Ruby1234 on February 15, 2013, 03:59:27 pm
Hay this really helped me. I'm not sure if you did put this in but how do you make one body part invisible?

Haven't gotten to that code yet.
But all you need to do is add alpha_rejection greater_equal 128 above the texture_unit line.
Then for your texture you just use the eraser and erase the part you want to be transparent.
Save the image as a .png and make sure your code says .png for the texture, not .jpg. c:
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: BuioUmbra on March 14, 2013, 03:33:20 pm
I have a small problem, I have the scrolling to work but only the body comes up, the head, tail and eyes all appear as marshmallows. I've checked all the code as well as the formats and names of my preset.
I'm not sure whats wrong  :-\
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Ruby1234 on March 23, 2013, 03:26:43 am
I have a small problem, I have the scrolling to work but only the body comes up, the head, tail and eyes all appear as marshmallows. I've checked all the code as well as the formats and names of my preset.
I'm not sure whats wrong  :-\
If you're willing, could you please send me your files?
It's easier for me to do a check that way.
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: BuioUmbra on March 23, 2013, 09:15:06 pm
The code or the textures?
Title: Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
Post by: Ruby1234 on March 24, 2013, 02:12:24 am
Both if possible.
If you are reluctant about sending the textures, then at least include their names please. c:
Title: Metallic Markings
Post by: Ruby1234 on April 01, 2013, 06:00:30 pm
EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing


(Double post, sorry.)
Metallic Markings
-Because no one else has said anything about them. And because they're pretty cool and I'm too tired to put anything that makes remote sense here. c:
Oh, and, let's use common sense, if you have no clue what you're doing, please don't start by doing this, start with actually making a normal preset first.
That's not to say I won't help you if you run into a problem. xD

You'll be needing 2 textures.
1, random dark scribbles, with some parts lighter than others,
(https://i.gyazo.com/75aa7f4d61da79635958aaf4c6c70b90.png)
And two, your actual texture, with transparency where the markings will go. I'm making Metal Legs. xD (Appears black in this post because I actually have this transparent so yea.)
(https://i.gyazo.com/58cf72aa106033d51526428dcdd52ae0.png)

Now, the code is actually quite simple here, you start with your basic,
Code: [Select]
material preset_11_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11body.png
}
}
}
}
Now as you may have guessed, we are going to put the metal down first, and your preset's texture goes over it.
So we can do this,
Code: [Select]
material preset_11_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11metal.png
}
}
}
}
Now this next part is important. The effects to actually make this look metallic.
Specular & Env_Map
specular makes it shine in the light, env_map will make it actually look like metal.
Pay close attention to their placements.
Code: [Select]
material preset_11_bodyMatL
{
technique
{
pass
{
specular 0.5 0.5 0.5 1
texture_unit
{
texture preset_11metal.png
env_map spherical
}
}
}
}
You can test this much in-game if you'd like.
Or continue.
Now as you may or may not have noticed, everything above 1 texture_unit applies to everything below that one.
Adding another texture_unit just layers something over something else.
But we don't want to do that here, or your whole preset shall become a shiny Edward Cullen.
What do we do?
We add another pass.
Like so,
Code: [Select]
material preset_11_bodyMatL
{
technique
{
pass
{
specular 0.5 0.5 0.5 1
texture_unit
{
texture preset_11metal.png
env_map spherical
}
}
pass
{
texture_unit
{
texture preset_11body.png
}
}
}
}
See how we had to pass again, and repeat the brackets? It's not too difficult really. But one last thing, transparency! Add the alpha_rejection greater_equal 128 code!
And I also add ambience but that's just me, take it out if you want.
Code: [Select]
material preset_11_bodyMatL
{
technique
{
pass
{
specular 0.5 0.5 0.5 1
texture_unit
{
texture preset_11metal.png
env_map spherical
}
}
pass
{
ambient 0.5 0.5 0.5 1
alpha_rejection greater_equal 128
texture_unit
{
texture preset_11body.png
}
}
}
}
(https://i.gyazo.com/b3b987905d5d72293f1f59e475f2574e.png)
Done!
-
Thank WhiteLightHeart for motivating me to get off my butt and do something useful... oh, and for this post, this was originally a PM to her. ;P
Title: Re: ? Ze Big Book of Mat Codes (Codes for your Presets & Objects!) *METAL CODE UP!!*
Post by: WhiteLightHeart on April 02, 2013, 04:33:31 pm
:'D Awhh, thank you for helping me out, dearie! <3 I love your tutorials, and you deserve oodles and oodles of floofs for posting this.

There's really been a need for a metallic markings tutorial out here, anyway, so this is pretty shweet. Not to mention, it's easy to follow, and the step-by-step way you go about it really is a huge help. Keep up the wonderful work, and thanks again! :D <3
Title: Re: ? Ze Big Book of Mat Codes (Codes for your Presets & Objects!) *METAL CODE UP!!*
Post by: Ruby1234 on April 02, 2013, 06:47:59 pm
:'D Awhh, thank you for helping me out, dearie! <3 I love your tutorials, and you deserve oodles and oodles of floofs for posting this.

There's really been a need for a metallic markings tutorial out here, anyway, so this is pretty shweet. Not to mention, it's easy to follow, and the step-by-step way you go about it really is a huge help. Keep up the wonderful work, and thanks again! :D <3

It's not a problem. c:
Thanks for the feedback.?
Title: Re: ? Ze Big Book of Mat Codes (Codes for your Presets & Objects!) *METAL CODE UP!!*
Post by: WhiteLightHeart on April 02, 2013, 08:34:10 pm
Anytime, floof<3 You're a wonderful teacher. ^.^
Title: Transparent && Semi-Transparent
Post by: Ruby1234 on April 04, 2013, 03:07:19 pm
EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing


Transparent
-Oh, the wonders of making body parts disappear!

Start with your preset/object.
(http://i.imgur.com/AXtd7Oz.png)
(This is preset 2 for the purpose of this tutorial, but I repeat, IT'S NOT MINE. Kay? Kay. c:)

Now, all you do is open your preset in Photoshop or GIMP, like you would any other time.
But this time, we need to make sure you have an alpha channel of transparency enabled. To do this, simply go to Layers >> Transparency >> Add Alpha Channel, like so for GIMP;
(https://i.gyazo.com/80ab760473cade75a6a857e29cc276c8.png) (https://i.gyazo.com/80ab760473cade75a6a857e29cc276c8.png)
Fullsize Image (https://i.gyazo.com/80ab760473cade75a6a857e29cc276c8.png)
If the option is not available, it usually means you already have it enabled, so you should be all good!
Now just erase the part(s) you want to be gone. I'm going to erase the midsection.
(https://i.gyazo.com/25e88e2b7ea33c54b0b24f2fb4d45fbf.png) (https://i.gyazo.com/25e88e2b7ea33c54b0b24f2fb4d45fbf.png)
Now, and this is important, save your image, AS A .PNG. Why, you might ask? First of all, I always use .png just because .jpg doesn't always look as well on presets, but second, .jpg DOES NOT support transparency. And look at that, we just used transparency! So guess what, we need a .png. c:
Once you've saved as a .png, open your material code, which should look something like this as default;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}
Now, you need to change whatever part is using transparency to .png instead of .jpg, but for me, all my stuff is in .png anyway, so I'm going to go ahead and switch it all.
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}
Now, before we save and test, we should make sure that we have the actual transparency code in there, which is this simple line;
alpha_rejection greater_equal 128
which gets placed above all the texture_unit lines. Or at least all the ones you're using transparency on.
So, you can do that manually if you're only doing a few body parts, but if you're doing them all, then take it from me;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}
Quote from: Me
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.
^ Only if you're using the code I just gave you, because I use # signs in it where your actual preset's number should be.
So since I'm using preset 2, this is what I'd be doing;
(https://i.gyazo.com/b83b889ce2b9d5fad8d960ba89d9f091.png) (https://i.gyazo.com/b83b889ce2b9d5fad8d960ba89d9f091.png)
But you'd be using whatever number preset you're doing.

Now, make sure you SAVE your material file, then go ahead and close it. Once we take a look ingame, you should have something like this! - Eep!
(https://i.gyazo.com/d23a1b6d4e2624c84ae5c88c85edfbcb.png) (https://i.gyazo.com/d23a1b6d4e2624c84ae5c88c85edfbcb.png)
Have fun with it!

-

Semi-Transparent
-Similar to the Ghost (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg341652#msg341652) code, but not quite as glowy, and it actually uses transparency, instead of giving the feel of it.
(http://i.imgur.com/AXtd7Oz.png)
Start with this guy again.
But this time, we're going to make him slightly see-through. To do this, we are going to open the textures, and change the opacity. It is completely up to you what you do with the opacity. But as said above, we are going to make sure we have an alpha channel for transparency, like so;
(https://i.gyazo.com/80ab760473cade75a6a857e29cc276c8.png) (https://i.gyazo.com/80ab760473cade75a6a857e29cc276c8.png)
Fullsize Image (https://i.gyazo.com/80ab760473cade75a6a857e29cc276c8.png)
And then we are going to change the opacity. Like so;
(https://i.gyazo.com/3ddd770374d98d1247f38f0a3b1c1959.png) (https://i.gyazo.com/3ddd770374d98d1247f38f0a3b1c1959.png)
Fullsize Image (https://i.gyazo.com/3ddd770374d98d1247f38f0a3b1c1959.png)
Now we save as a .png. Yes, it MUST BE a .png, kay? Kay. c:
After we've saved all of that, (and by "all of that" I mean, go through and do it to all the parts you want to be see through. You can experiment with just using the eraser tool at a lower opacity to do this just for markings.) open your material file. Replace the current code with this one;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_check on
depth_write off
scene_blend alpha_blend
texture_unit
{
texture preset_#mane.png
}
}
}
}
Then
Quote from: Me
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.
So you should be doing something like this;
(https://i.gyazo.com/b83b889ce2b9d5fad8d960ba89d9f091.png)
But you probably aren't using preset 2, so it'd be whatever number you're using.
Now, SAVE your material file, then you may close it, or leave it open, whatever floats your boat, and lets go take a look in-game.
(https://i.gyazo.com/f43208bb62c377f3df637644e7729987.png) (https://i.gyazo.com/f43208bb62c377f3df637644e7729987.png)
It's certainly.. different, right?
Haha, obviously this code works better for just markings, or objects, but hey, I believe you guys can make it work!
Good luck!
Title: Re: Material Coding for Beginners! Glowing, Metallic, Transparent, Animated, & more!
Post by: Ruby1234 on July 11, 2013, 06:10:33 pm
Updated with some code fixes. c:
Title: Re: Material Coding for Beginners! Glowing, Metallic, Transparent, Animated, & more!
Post by: Silver-Scratch on August 13, 2013, 03:35:12 pm
Absolutely flawless tutorials! These helped a lot, thank you.
Title: Re: Material Coding for Beginners! Glowing, Metallic, Transparent, Animated, & more!
Post by: Ruby1234 on August 13, 2013, 06:03:05 pm
Absolutely flawless tutorials! These helped a lot, thank you.
Aaa, thanksss. ;u;
Title: Re: Material Coding for Beginners! Glowing, Metallic, Transparent, Animated, & more!
Post by: Sir Equius on August 14, 2013, 04:03:50 am
I had a question regarding the scrolling markings on presets. if I wanted the scrolling to be vertical, instead of scrolling horizontally like in your demonstration, what would I need to do with the coding?
Title: Tutorial: Glowing Markings
Post by: Ruby1234 on October 12, 2013, 03:21:16 am
EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing


Glowing Markings
-Because you all asked.

Once again, I shall ask you to start with a preset. If you haven't one already, make one before following this tutorial.

(http://i.imgur.com/AXtd7Oz.png)

(Preset 2 is being used for the purpose of this tutorial, as it is easy to recognize, but you'll need your own.)

The basic code for every preset is set at a default of something like this;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}

(This has the mane fix applied, which you'll need if you plane to make a mane other than the Fluffy Mane.)

Now, you'll need to make a transparent texture to go over the top of your preset's other texture. This will be glowing marks area. And it needs to be a format that supports transparency, I use .png.
For example;
this texture is the body base texture;
(http://i.imgur.com/3bPYw6o.jpg)

and this is a texture I've made to be the glowing marks on top of the other texture;
(http://i.imgur.com/YGlkWca.png)
(really basic 'cause I'm lazy)

Now all we need to do is layer this onto the preset, from the coding.
There are two things I'm going to change here.
First, the way the bodypart reacts to the light, making it more sensitive, and second, making the actual markings glow.

The first part is easy, for all we need to add to the code is the ambient code, which I set usually at 0.5 for each value, so it's not overwhelming;
ambient 0.5 0.5 0.5 1
would go above the texture_unit line.
Then we need to create a second pass to be able to separate the effects, add a scene blend, and then the emissive code, which controls the glow. Normally I set it to
emissive 1.0 1.0 1.0 1
for full effect.

Overall, your code at the end should be like this;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#body.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#bodyglow.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#body.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#bodyglow.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#head.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#headglow.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#head.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#headglow.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#eye.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#eyeglow.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#eye.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#eyeglow.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1.0
texture_unit
{
texture preset_#tail.jpg
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#tailglow.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
pass
{
emissive 1.0 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture preset_#maneglow.png
}
}
}
}
(If you choose to copy/paste my code from above, you'll need to press Ctrl + H in notepad to bring up the replace menu, then have it replace
_#
with an underscore;
_
and then whatever number your preset is, for me it would be _2.)

You should end up with something like this;
(http://i.imgur.com/Nl57LkO.png)
(http://i.imgur.com/ClXfCm8.png)

You can see where the ambient makes the body react differently to light, and how the markings stay their constant color.
Though you may need to do some adjusting to get it how you want it.
Feel free to message me if you have any more questions.
Hope this helped, have a good one.
-Ruby
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: OreoHeroz on October 12, 2013, 01:56:08 pm
- flails - Thank you very much for this guide, Ruby! I've been wondering how to do those things, and here's my answer c: +floof for all your work and help
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on October 12, 2013, 02:19:45 pm
You are welcome, my dear!~
And thanks for the floof.?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Emberflame on October 16, 2013, 07:20:56 pm
these are awesome, thx! :) +floof one question, is there anyway to combine the scroll and ghost codes to make a ghostly scrolling preset?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Rainbowfur on October 17, 2013, 01:06:24 am
Hey, I used your mane code fix, and it ended up looking like this:
(http://i42BannedImageSite/1r9ceq.png)

Any code for that pesky top area that is still glitchy?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on October 18, 2013, 01:01:26 pm
these are awesome, thx! :) +floof one question, is there anyway to combine the scroll and ghost codes to make a ghostly scrolling preset?
Yep, follow the tut and make a scrolling preset first, then just follow the ghost code, add a scene_blend add above one of the texture_unit lines under each Mat section.

Hey, I used your mane code fix, and it ended up looking like this:
(http://i42BannedImageSite/1r9ceq.png)

Any code for that pesky top area that is still glitchy?
Since this code only deals with solid transparency, open PS or GIMP or whatever you use, and zoom in onto those transparent edges.
You've either missed some old black pixels, or there's too many trying to be semi-transparent, you'll need to use the lasso tool or a solid eraser along the edges.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Emberflame on October 18, 2013, 02:04:24 pm
these are awesome, thx! :) +floof one question, is there anyway to combine the scroll and ghost codes to make a ghostly scrolling preset?
Yep, follow the tut and make a scrolling preset first, then just follow the ghost code, add a scene_blend add above one of the texture_unit lines under each Mat section.

Ok thx, I'll try that
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Rainbowfur on October 19, 2013, 12:19:01 am
Hey thanks anyway, but I seemed to have fixed it but setting the alpha rejection to 200.
here's a screenie:

 (http://i43BannedImageSite/315h647.png)

If anyone else has this problem, tell them to do what I did :D
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: UnderSiege0731 on October 20, 2013, 01:17:40 pm
This is all doing wonder thank you!
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Emberflame on October 21, 2013, 06:30:50 pm
these are awesome, thx! :) +floof one question, is there anyway to combine the scroll and ghost codes to make a ghostly scrolling preset?
Yep, follow the tut and make a scrolling preset first, then just follow the ghost code, add a scene_blend add above one of the texture_unit lines under each Mat section.

Ok thx, I'll try that

I tried it, sorry it took a bit for me to get back. As far as I see, it didn't change anything :/ do you mind showing it to me in code? Sorry if I'm using your time X3
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: OreoHeroz on October 21, 2013, 08:13:19 pm
Sorry to dump more problems onto you but I have a question: So I made a preset for someone, but when I tried to make the right back leg transparent (added the code, etc.), the left back leg wasn't the color I wanted and instead was the texture of the reference leg. Any suggestions?

Click to show code
Code: [Select]
material preset_4_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_4body.png
}
}
}
}
material preset_4_bodyMatR
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_4body.png
}
}
}
}
material preset_4_headMatL
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_4head.png
}
}
}
}
material preset_4_headMatR
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_4head.png
}
}
}
}
material preset_4_eyesMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_4eye.png
}
}
}
}
material preset_4_eyesMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_4eye.jpg
}
}
}
}
material preset_4_tailMat
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_4tail.png
}
}
}
}
material preset_4_maneMat
{
technique
{
pass
{
lighting off
cull_hardware none
cull_software none
scene_blend alpha_blend
depth_write off
texture_unit
{
texture preset_4mane.png
}
}
}
}

Click to show for image
(http://i820.photobucket.com/albums/zz129/Ravensong4775/presethelp_zpsef657d80.png)

Thanks!

Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on October 26, 2013, 12:44:59 pm
@Rainbowfur: I'd completely forgotten about that option! o:
Thanks so much!~ +floof
-
@OreoHeroz: You've only got the left leg set to transparent, so the right leg is still seeing the other image, or a layer under it.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: OreoHeroz on October 26, 2013, 02:37:12 pm
@OreoHeroz: You've only got the left leg set to transparent, so the right leg is still seeing the other image, or a layer under it.

So is there anything I can do to fix it? Do I have to remove the layer?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: SenseiRei on October 30, 2013, 11:06:43 pm
the scrolling thing. what format do u save it as.. a jpg? a png? what?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: SenseiRei on November 02, 2013, 09:38:12 pm
now im trying to remove 1 arm and 1 wing... anything on this subject? please PM me your answer
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on November 04, 2013, 03:23:00 am
Read the tutorials? owo
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Wolflover224 on May 08, 2014, 03:02:45 pm
Did you use gimp or paint? Because right now i only have paint but i might be gettin gimp soon. Aye, those were some cool lookin presets! ?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on May 08, 2014, 04:15:04 pm
I used GIMP. c: Thank you!~
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: ligt18098 on June 07, 2014, 05:00:31 am
This is a great help, yes.

But for the mane, mine was originally transparent for some reason, I did the mane code, and then it looked like the unfixed screenshot above. (The one how the mane has an outline to it kinda.)

How would I fix That..? ^^' Can anyone help me?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on June 15, 2014, 01:12:27 pm
The unfixed one is not merely outlined, it has weird see-through clipping areas as well. Not sure if that's part of your issue? Try changing the 128 in the code to 200, or make the line between transparency and color on your mane texture a little more solid.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Black_Iris on September 29, 2014, 03:00:42 pm
I would like to know if there's any way to change the speed in which the image is scrolling when you make scrolling markings. I tried and succeeded, but it scrolls past so fast. ouo
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on September 30, 2014, 12:39:34 pm
Quote
scroll_anim 0.5 0.5
-speed along x-axis -speed along y-axis

Just change the numbers to lower numbers. c:
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: SenseiRei on October 26, 2014, 11:22:40 pm
like i want to use that same thing cutting off parts but the inside gap to be closed... cause it looks odd with a hole that lets you see inside and all you see is nothing you think its best we recreate the structure with an inner skeleton?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Black_Iris on February 14, 2015, 09:02:14 pm
So, I tried making a scrolling mane, where the whole mane is slowly scrolling by. But I encountered a problem;
It seems impossible to make the mane scroll and keep the pointy look. When I tried, I got the square thingies as seen in the image.
(http://i1308.photobucket.com/albums/s616/Black_IrisO/Mane_zps936951e6.png)
Otherwise, it turned out like this when the mane scrolled:
(http://i1308.photobucket.com/albums/s616/Black_IrisO/Ns_zpsac94c677.png)

Please help. I want a good looking and scrolling mane. ;w;
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on February 15, 2015, 05:08:53 pm
@Ina Nilsson:
Code: (Scrolling Mane) [Select]
material preset_#_maneMat
{
technique
{
pass
{
                        cull_hardware none
                        cull_software none
                        alpha_rejection greater_equal 200
texture_unit
{
texture fmaneMask.png
}
texture_unit
{
texture rainbowshit.png
scroll_anim 1 1
colour_op_ex blend_current_alpha src_texture src_current
}
}
}
}

You'll have to change the material preset_#_maneMat line, since I don't know what number you're using.
Also you'll need to put an image in for SCROLLING LAYER.png, but other than that, you can leave everything the same, maybe adjust the speed of the scroll_anim 1 1 line.

Hope you get it working.

EDIT: I don't know why the code spacing has gone to shiz,
but it doesn't seem to be something I can fix, must be
site error. I apologise for the inconvenience.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Black_Iris on February 17, 2015, 04:45:54 pm
I got it working, thank you so much! <3
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: ExtraX-Hybrid on May 13, 2015, 02:48:40 pm
Sorry if this is a late comment or anything and this topic is closed but..

I changed the .material file into a .txt file and changed all the stuff and everything but..

how do I turn it back into a .material file? I tried renaming it let's say ; preset_3.material but it stays a .txt file.


If anyone could help, I would appreciate it VERY much.
Regards,
EXH
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: pilami42 on June 17, 2015, 09:20:27 am
I want to make the scrolling preset. When I used the frist code It didn't want to work (just a white spot in place when it must to scroll). When I used the fixed code I saw all white character (I replaced the names). So if it didn't work I tried to do something with it and now I don't have in feralheart>>tools>>preset maker preset 7 to choose (this one with I was working) Maybye a little help?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on June 20, 2015, 12:22:07 pm
Sorry if this is a late comment or anything and this topic is closed but..

I changed the .material file into a .txt file and changed all the stuff and everything but..

how do I turn it back into a .material file? I tried renaming it let's say ; preset_3.material but it stays a .txt file.


If anyone could help, I would appreciate it VERY much.
Regards,
EXH
In notepad go to "Save as..." and click the dropdown and change to "All files" then save it as preset_3.material

I want to make the scrolling preset. When I used the frist code It didn't want to work (just a white spot in place when it must to scroll). When I used the fixed code I saw all white character (I replaced the names). So if it didn't work I tried to do something with it and now I don't have in feralheart>>tools>>preset maker preset 7 to choose (this one with I was working) Maybye a little help?
If you need help with a code, send me the broken one and I can show you what's wrong with it.
Copy the material file from a different preset into the preset 7 folder, and rename it to preset_7.material.
When the preset doesn't appear it means you broke the code, pretty badly. So just replace it with a standard one.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: ThatRandomTypo on June 20, 2015, 05:54:15 pm
I followed the instructions for scrolling, and when I went to check on the preset in preset maker, there wasn't even the gradient I chose for the scrolling part. I looked through the code, and I'm not entirely sure why it isn't showing up.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on June 21, 2015, 12:52:28 pm
I followed the instructions for scrolling, and when I went to check on the preset in preset maker, there wasn't even the gradient I chose for the scrolling part. I looked through the code, and I'm not entirely sure why it isn't showing up.
Can I see a screenshot of the preset and a copy of your code?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: ThatRandomTypo on June 21, 2015, 09:18:11 pm
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Arvemis on September 23, 2015, 05:20:54 am
i tired playing around with an old preset of mine and i dicided to do the ghost effect but when i followed the instrutions it went like this
(http://orig07.deviantart.net/8732/f/2015/265/5/8/screenshot_09232015_151428511_by_theflyinghusky-d9al7l7.png)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on September 24, 2015, 02:32:31 pm
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: shayy on September 24, 2015, 05:30:42 pm
wow this is great Ruby, really helpful. ^^
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ellen11v on October 01, 2015, 03:46:21 pm
Hello, I have this problem when I'm trying to make glowing markings on my preset.
It's like, I've just begun on the preset, and I've almost finished the head part of it.
So, eh... Tell me if I did something wrong here with the coding:
Code: [Select]
material preset_6_headMatL
{
 technique
 {
  pass
  {
   ambient 0.5 0.5 0.5
   texture_unit
   {
    texture preset_6head.png
   }
  }
pass
  {
   emissive 1.0 1.0 1.0
   scene_blend alpha_blend
   texture_unit
   {
    texture headglow.png
   }
  }
 }
}
material preset_6_headMatR
{
 technique
 {
  pass
  {
   ambient 0.5 0.5 0.5
   texture_unit
   {
    texture preset_6head.png
   }
  }
pass
  {
   emissive 1.0 1.0 1.0
   scene_blend alpha_blend
   texture_unit
   {
    texture headglow.png
   }
  }

 }
}

The other coding of the other parts (body, tail etc.) that you don't see in this code here, are just default/normal, not edited codes.
I also have a screenshot of how it appears like in game:
(http://i.imgur.com/JdPWBNr.png)
You can only see the glow-markings texture, and not the actual base (like, the seablue fur with red heart below the eye.)
Aaand, here's a screenshot of the files i have in my preset_6 folder, if it helps to have a look at them too.
(http://i.imgur.com/l23hHP0.png)
 
I would be happy if you could help. Tell me if there's more you need to know about my problem, and what you want to know. :)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on October 02, 2015, 12:40:15 pm
Looks like you might've had a spacing issue. Try this:
Code: [Select]
material preset_6_headMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1
texture_unit
{
texture preset_6head.png
}
}
pass
{
scene_blend alpha_blend
emissive 1.0 1.0 1.0 1
texture_unit
{
texture preset_6headglow.png
}
}
}
}
material preset_6_headMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5 1
texture_unit
{
texture preset_6head.png
}
}
pass
{
scene_blend alpha_blend
emissive 1.0 1.0 1.0 1
texture_unit
{
texture preset_6headglow.png
}
}
}
}
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on October 04, 2015, 02:26:13 pm
i tired playing around with an old preset of mine and i dicided to do the ghost effect but when i followed the instrutions it went like this
(http://orig07.deviantart.net/8732/f/2015/265/5/8/screenshot_09232015_151428511_by_theflyinghusky-d9al7l7.png)


I can't PM you back because your forum name isn't unique. The message keeps trying to send to "Hyper" but there's more than one person with that name so it keeps going to the wrong one.
Here is your fixed code.
Code: [Select]
material preset_3_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_3bodyL.jpg
}
scene_blend add
texture_unit
{
texture preset_3ghost.png
}
}
}
}
material preset_3_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_3bodyR.jpg
}
scene_blend add
texture_unit
{
texture preset_3ghost.png
}
}
}
}
material preset_3_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_3head.jpg
}
scene_blend add
texture_unit
{
texture preset_3ghost.png
}
}
}
}
material preset_3_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_3head.jpg
}
scene_blend add
texture_unit
{
texture preset_3ghost.png
}
}
}
}
material preset_3_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_3eye.png
}
}
}
}
material preset_3_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_3eye.png
}
}
}
}
material preset_3_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_3tail.jpg
}
scene_blend add
texture_unit
{
texture preset_3ghost.png
}
}
}
}
material preset_3_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_3mane.png
}
scene_blend add
texture_unit
{
texture preset_3ghost.png
}
}
}
}
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: RDLdoesRoblox on October 24, 2015, 04:15:06 pm
Its helpful, but scroll, is kinda hard as well. I was about to finish, but right head and tail is turn to yellow and black, what i need to do? :c




(sorry if my english isnt good...)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Rink2004 on November 27, 2015, 10:15:09 pm
What did you use to make the 512x512 square, like how did you do that?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: XsilentwhispersX on January 08, 2016, 07:46:56 pm
Thanks for this tip! ^u^
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Vwang on January 10, 2016, 09:48:18 pm
When i tried this for my preset's wings i wanted it to be a reindeer but the wings still turn out marshmallow white
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Wolflover224 on January 10, 2016, 11:29:25 pm
Sorry if I'm bumping this, but do you know how to do the special effects for presets? Some people have made presets where they have cell shading and/or outlines, but I don't know how to do them.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Spottedbears on January 11, 2016, 03:32:38 am
I'm not Ruby, but I know what you're talking about.
http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=54120.0 (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=54120.0)
You'll have to PM Softie for info & the codes!
Title: Help me?
Post by: Vwang on January 31, 2016, 02:52:56 am
I want to combine the Scrolling and the Mane fix together because now everytime i tried to make a scrolling mane it turns blocky
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Kerriki on January 31, 2016, 04:09:48 am
Here you go, fluff ^^

http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=53773.0 (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=53773.0)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: iCharlez on April 26, 2016, 12:41:54 am
I know that I am adding to this topic really late (few years late), but thank you so much for this tutorial! It worked!
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on April 28, 2016, 12:52:37 pm
I know that I am adding to this topic really late (few years late), but thank you so much for this tutorial! It worked!
Hey, that's alright!
Thanks for the feedback!? Glad it worked.
Title: Help?
Post by: Vwang on May 19, 2016, 01:55:28 am
What should I name the markings thing though
EX: Preset_2headglow??
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on May 19, 2016, 05:12:04 pm
Doesn't matter what you name it, it's just so you know which image is which. Can be anything.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: LW115 on July 05, 2016, 10:49:00 am
Hello. Firstly this post was really helpful. I just recently got into making my own presets. So far everything has gone well. Now Im working on the mane preset, thats where Im encountering problems.

I copied the code just like it shows. Yes it is in the right place. Yes the # have been changed to the correct number. Yes the .png and .jpg do match the images in the folder. But when I go into preset maker thats how the mane ends up looking. As if I hadnt changed the # to the correct number. So I dont know whats going wrong. Any help would be much appreciated.

(https://scontent-arn2-1.xx.fbcdn.net/v/t1.0-0/s480x480/13627230_1056654417704653_4807221997744108439_n.jpg?oh=a0a325ce1c47955b1d3dfdb7dcc15e83&oe=57F4AA99)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on July 16, 2016, 01:02:15 am
What is the mane supposed to look like here? Texture??
Title: Glowing and scrolling combined?
Post by: Vwang on August 14, 2016, 04:03:01 am
Is it possible to make a glowing AND scrolling preset?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Kuri on August 14, 2016, 07:36:08 am
Is it possible to make a glowing AND scrolling preset?

Looks like it, i just tried some to see it it would work and it look like it was glowing.  Didn't take it on any dark map but i don't see why it wouldn't.  One of my presets is filled with lightning and it's emissive (glowing) so yes i bet it is possible!
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on August 14, 2016, 08:03:31 am
 Wow, thank you very much for this. I'll add this in my bookmarks for future reference, as i'm not really creating anything quite yet. :)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on August 14, 2016, 07:18:29 pm
Is it possible to make a glowing AND scrolling preset?

Yes, you just need to layer it accordingly... scroll > main > glow
Code: [Select]
material EXAMPLEMAT
{
technique
{
pass
{
texture_unit
{
texture scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture body.png
}
}
pass
{
scene_blend alpha_blend
emissive 1.0 1.0 1.0 1
texture_unit
{
texture glow.png
}
}
}
}

Wow, thank you very much for this. I'll add this in my bookmarks for future reference, as i'm not really creating anything quite yet. :)
My pleasure.
De rien.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Vwang on August 15, 2016, 01:11:15 am
Is it possible to make a glowing AND scrolling preset?

Yes, you just need to layer it accordingly... scroll > main > glow
Code: [Select]
material EXAMPLEMAT
{
technique
{
pass
{
texture_unit
{
texture scroll.png
scroll_anim 1.0 1.0
}
}
pass
{
alpha_rejection greater equal 128
scene_blend alpha_blend
texture_unit
{
texture body.png
}
}
pass
{
alpha_rejection greater_equal 128
scene_blend alpha_blend
emissive 1.0 1.0 1.0 1
texture_unit
{
texture glow.png
}
}
}
}

Wow, thank you very much for this. I'll add this in my bookmarks for future reference, as i'm not really creating anything quite yet. :)
My pleasure.
De rien.
Can I have the full code? Or do I have to rebuild the whole entire code?
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Vwang on August 24, 2016, 02:14:51 am
HELPFUL
SO HELPFUL
OH MY GOSH I CANT BREATHEEEE
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on August 25, 2016, 01:01:13 pm
Breathe, friend. xD
I'm glad you find this useful though.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: amythealpha on August 29, 2016, 12:13:11 am
AAAA SO HELPFUL. +floof

*seeing this tutorial fills you with... determination. Enough determination to try another preset using something like this. (Not sure what character I'll make though...)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: amythealpha on August 29, 2016, 01:12:17 am
Some of the pictures don't show up (I'm currently looking at transparent and semi-transparent and nothing's showing up)
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: amythealpha on August 29, 2016, 08:57:09 pm
Ayyy, was trying out the ghost code, and for some reason it keeps on looking extremely bizarre. Think you could help? ;w; I can send you the files and code. I'd prefer it to be that the eyes and mouth are visible too, but it just doesn't seem to come out right. Using the canine model if that makes a difference, but it doesn't seem too. I purposefully put the code back to it's original state because I couldn't tell what part of it I was messing up, so I just put it make to normal.
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on August 30, 2016, 12:29:23 pm
Some of the pictures don't show up (I'm currently looking at transparent and semi-transparent and nothing's showing up)
Yeah, tinypic was blocked on this site, so I need to redo some of the pictures. I'll fix them eventually.

Ayyy, was trying out the ghost code, and for some reason it keeps on looking extremely bizarre. Think you could help? ;w; I can send you the files and code. I'd prefer it to be that the eyes and mouth are visible too, but it just doesn't seem to come out right. Using the canine model if that makes a difference, but it doesn't seem too. I purposefully put the code back to it's original state because I couldn't tell what part of it I was messing up, so I just put it make to normal.
I'm not sure what you mean, could you code it how you did again and show a picture? Or code it how you did before and then PM me the files. Either way, I'll try and fix it up for you. cx
Title: Re: Updated 10/11/13 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: amythealpha on August 31, 2016, 02:11:53 am
Some of the pictures don't show up (I'm currently looking at transparent and semi-transparent and nothing's showing up)
Yeah, tinypic was blocked on this site, so I need to redo some of the pictures. I'll fix them eventually.

Ayyy, was trying out the ghost code, and for some reason it keeps on looking extremely bizarre. Think you could help? ;w; I can send you the files and code. I'd prefer it to be that the eyes and mouth are visible too, but it just doesn't seem to come out right. Using the canine model if that makes a difference, but it doesn't seem too. I purposefully put the code back to it's original state because I couldn't tell what part of it I was messing up, so I just put it make to normal.
I'm not sure what you mean, could you code it how you did again and show a picture? Or code it how you did before and then PM me the files. Either way, I'll try and fix it up for you. cx
Eh, sorry, I decided against it ^^" The preset looks fine without the ghost effect added to effect, so I won't put ya through the trouble on second thought. Thanks for offering, though! These tutorials are amazing <3
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on September 17, 2016, 02:57:57 am
Updated.

Went through and fixed every broken image. @_@'
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: .xFactorsx. on October 16, 2016, 06:12:05 pm
Hey, I tried out the scrolling preset and ingame, and what I see is whre I used my eraser, instead of the colors I wanted it to be, its just black and yellow scrolling. ;w; Help?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 16, 2016, 09:02:50 pm
Hey, I tried out the scrolling preset and ingame, and what I see is whre I used my eraser, instead of the colors I wanted it to be, its just black and yellow scrolling. ;w; Help?

This is likely an issue with the code, or the accidental typo of the image file names. I'm sure Ruby will be able to help you with that. I can do my best to help you too. I've worked with scrolling before. (PM me, I can look through your code). Put an article in Game Help if you think you need it. They will tell you what I just did and may be able to fix your problem too.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 17, 2016, 04:13:41 am
I'm trying to make a preset with scrolling markings, but for some reason, when I erase, it fills it up with more pixels. It's really annoying me, because the last preset I made with scrolling markings didn't have this problem. Any suggestions?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 17, 2016, 05:47:18 am
I'm trying to make a preset with scrolling markings, but for some reason, when I erase, it fills it up with more pixels. It's really annoying me, because the last preset I made with scrolling markings didn't have this problem. Any suggestions?

Fills up with pixels? Do you mean it's not showing the scrolling markings underneath and there is no transparency? Is it doing this in the editor?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 18, 2016, 12:17:16 am
I'm trying to make a preset with scrolling markings, but for some reason, when I erase, it fills it up with more pixels. It's really annoying me, because the last preset I made with scrolling markings didn't have this problem. Any suggestions?

Fills up with pixels? Do you mean it's not showing the scrolling markings underneath and there is no transparency? Is it doing this in the editor?

Here's a pic:

(http://i1156.photobucket.com/albums/p567/Shaheiro/ohmy_zpslnn48dbi.png)

And it does show up on the animal when you look at it in-game.
(I just used some random brushes)
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 18, 2016, 12:23:44 am
I'm trying to make a preset with scrolling markings, but for some reason, when I erase, it fills it up with more pixels. It's really annoying me, because the last preset I made with scrolling markings didn't have this problem. Any suggestions?

Fills up with pixels? Do you mean it's not showing the scrolling markings underneath and there is no transparency? Is it doing this in the editor?

Here's a pic:

(http://i1156.photobucket.com/albums/p567/Shaheiro/ohmy_zpslnn48dbi.png)

And it does show up on the animal when you look at it in-game.
(I just used some random brushes)
Those checkered pixels are showing up in Photoshop for me and it seems to me that the png doesn't have any transparency to it. It must've become corrupt and deleted the transparency on it. Or somehow, it got switched around with filetypes or something. How are you editing your fur? Through Gimp/Photoshop?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 19, 2016, 04:42:48 am
I'm trying to make a preset with scrolling markings, but for some reason, when I erase, it fills it up with more pixels. It's really annoying me, because the last preset I made with scrolling markings didn't have this problem. Any suggestions?

Fills up with pixels? Do you mean it's not showing the scrolling markings underneath and there is no transparency? Is it doing this in the editor?

Here's a pic:

(http://i1156.photobucket.com/albums/p567/Shaheiro/ohmy_zpslnn48dbi.png)

And it does show up on the animal when you look at it in-game.
(I just used some random brushes)
Those checkered pixels are showing up in Photoshop for me and it seems to me that the png doesn't have any transparency to it. It must've become corrupt and deleted the transparency on it. Or somehow, it got switched around with filetypes or something. How are you editing your fur? Through Gimp/Photoshop?

I'm using Gimp. I save everything as a png, but the textures I'm using are jpeg files. Would that make any difference, or not?
(Also, that photo wasn't the actual file- it was a screenshot. The checkers still show up as transparent.)
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 19, 2016, 05:02:29 am
I'm using Gimp. I save everything as a png, but the textures I'm using are jpeg files. Would that make any difference, or not?
(Also, that photo wasn't the actual file- it was a screenshot. The checkers still show up as transparent.)

Oh I see. So, whatcha mean by the textures are jpeg? Are you talking about fur textures?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 19, 2016, 05:10:38 am
I'm using Gimp. I save everything as a png, but the textures I'm using are jpeg files. Would that make any difference, or not?
(Also, that photo wasn't the actual file- it was a screenshot. The checkers still show up as transparent.)

Oh I see. So, whatcha mean by the textures are jpeg? Are you talking about fur textures?

Ohmygod I am so sorry for all of this. I just realized that all I needed to do was add an alpha channel. It works now, and thank you for all your help! (even though stupid me realized what was wrong in the end)
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 19, 2016, 05:13:28 am
Ohmygod I am so sorry for all of this. I just realized that all I needed to do was add an alpha channel. It works now, and thank you for all your help! (even though stupid me realized what was wrong in the end)

No, that's not a problem at all. You're not stupid :P Hey, if you need any more help with the scrolling code, PM me! Glad you got it fixed ^^
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 19, 2016, 05:16:21 am
Ohmygod I am so sorry for all of this. I just realized that all I needed to do was add an alpha channel. It works now, and thank you for all your help! (even though stupid me realized what was wrong in the end)

No, that's not a problem at all. You're not stupid :P Hey, if you need any more help with the scrolling code, PM me! Glad you got it fixed ^^

Thank you ^^

... sorry to trouble you again, but I have one more quick question. Is it possible to combine the ghost, transparent, and scrolling codes?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 19, 2016, 05:41:11 am
Thank you ^^

... sorry to trouble you again, but I have one more quick question. Is it possible to combine the ghost, transparent, and scrolling codes?

Not a problem. I've combined codes together before. I'm sure that's possible to do.

Describe what you had in mind for the preset. Would the scrolling texture be underneath the ghost? Or?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 19, 2016, 06:01:11 am
Thank you ^^

... sorry to trouble you again, but I have one more quick question. Is it possible to combine the ghost, transparent, and scrolling codes?

Not a problem. I've combined codes together before. I'm sure that's possible to do.

Describe what you had in mind for the preset. Would the scrolling texture be underneath the ghost? Or?

Underneath would look best, I think.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 19, 2016, 06:28:48 am
Underneath would look best, I think.
And that scrolling texture would be underneath the entire character? Like under the partially transparent ghost texture?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 19, 2016, 06:43:11 am
Underneath would look best, I think.
And that scrolling texture would be underneath the entire character? Like under the partially transparent ghost texture?

I'm going to stop being indecisive and say yes, under the ghost texture.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 19, 2016, 07:36:13 am
I'm going to stop being indecisive and say yes, under the ghost texture.

That should be doable. Are you experimenting with code to see if you can get it to work or have you started on that yet? :)
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: fika on October 19, 2016, 07:50:30 am
I'm going to stop being indecisive and say yes, under the ghost texture.

That should be doable. Are you experimenting with code to see if you can get it to work or have you started on that yet? :)

I'll probably start tomorrow/later today, since I'm about to go to bed. Thank you for all your help! :D I really appreciate it~
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on October 19, 2016, 07:52:43 am
I'll probably start tomorrow/later today, since I'm about to go to bed. Thank you for all your help! :D I really appreciate it~
You're welcome ^^ And Goodnight
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: _Yorkiette_ on April 25, 2018, 08:16:40 pm
I know this is very late. However how in the world do you save it as a png? In GIMP. Because it’s not able to be saved as a one apparently
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: FlyingGrass on April 25, 2018, 09:13:08 pm
I know this is very late. However how in the world do you save it as a png? In GIMP. Because it’s not able to be saved as a one apparently
Use "Export as" that is a bit below the "Save" option.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Windstrider on June 09, 2018, 05:42:58 pm
Thanks for the tutorials! The scrolling one looks awesome, but I don't understand why the mane is totally fine on one of them but the mane is white/textureless on another. Also, the back legs turned out a bit weird on the one with leg markings. These are most likely mistakes I've made because my preset skills are rusty lmao, and I'm still kind of a beginner, but I don't know why they happened.

(https://image.ibb.co/eb2ZCo/textureless_mane.png)

(https://image.ibb.co/iJEaJT/weird_back_legs.png)

I didn't know if you need the code for them but here it is.

The one with the mane issue:
Code: [Select]
material preset_9_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9body.png
}
}
}
}
material preset_9_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9body.png
}
}
}
}
material preset_9_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9head.png
}
}
}
}
material preset_9_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9head.png
}
}
}
}
material preset_9_eyeMatL
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9eye.png
}
}
}
}
material preset_9_eyeMatR
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9eye.png
}
}
}
}
material preset_9_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9tail.png
}
}
}
}
material preset_9_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 129
texture_unit
{
texture preset_9mane.png
scroll_anim 0.1 0.1
}
}
}
}material preset_9_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9body.png
}
}
}
}
material preset_9_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9body.png
}
}
}
}
material preset_9_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9head.png
}
}
}
}
material preset_9_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9head.png
}
}
}
}
material preset_9_eyeMatL
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9eye.png
}
}
}
}
material preset_9_eyeMatR
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9eye.png
}
}
}
}
material preset_9_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_9scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_9tail.png
}
}
}
}
material preset_9_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_9mane.png
scroll_anim 0.1 0.1
}
}
}
}

The one with the leg issue:
Code: [Select]
material preset_8_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8body.png
}
}
}
}
material preset_8_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8body.png
}
}
}
}
material preset_8_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8head.png
}
}
}
}
material preset_8_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8head.png
}
}
}
}
material preset_8_eyeMatL
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8eye.png
}
}
}
}
material preset_8_eyeMatR
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8eye.png
}
}
}
}
material preset_8_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_8scroll.png
scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_8tail.png
}
}
}
}
material preset_8_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_8mane.png
scroll_anim 0.1 0.1
}
}
}
}

Fyi, the picture I used for the mane is a solid color 512x512 png, instead of the mane with the jaggedy looking edge. Manes are the one thing I don't really get when it comes to presets.

Thanks in advance to whoever helps.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Arelyka on July 30, 2018, 06:19:48 pm
how exactly do i slow down the animation? i cant seem to figure that out
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on July 30, 2018, 06:24:02 pm
how exactly do i slow down the animation? i cant seem to figure that out

The scrolling animation? All you need to do is make the numbers a smaller value. For example, where it says:
scroll_anim 1.0 1.0
change it to
scroll_anim 0.5 0.5

you can go smaller than that, that should just give you a start.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Arelyka on July 30, 2018, 08:55:33 pm
im having some trouble with my preset, it wont export for some reason? i keep trying but im not sure what to do or what im doing wrong
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on July 31, 2018, 01:23:24 am
im having some trouble with my preset, it wont export for some reason? i keep trying but im not sure what to do or what im doing wrong

Is there an error message that it gives you?
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Arelyka on July 31, 2018, 08:46:24 pm
im having some trouble with my preset, it wont export for some reason? i keep trying but im not sure what to do or what im doing wrong

Is there an error message that it gives you?

it says "failed to export preset"
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Morgra on July 31, 2018, 10:33:03 pm
im having some trouble with my preset, it wont export for some reason? i keep trying but im not sure what to do or what im doing wrong

Is there an error message that it gives you?

it says "failed to export preset"


Are all of your files in the correct preset number folder? Is your material named and listed correctly?

Maybe pasted your material code here and then we can take a look at it. Also let us know what preset number it should be for.
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Void. on December 28, 2018, 02:19:36 pm
This helped   me very much! Thank you! <3
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: Ruby1234 on January 31, 2022, 12:58:47 pm
Updated main topic; tutorial is being moved!
Title: Re: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!
Post by: toonanimals317 on February 05, 2022, 04:40:16 pm
Very helpful material coding! Its cool to see this updated after so long!