Author Topic: Updated 9/16/16 Material Coding for Beginners! Glow, metal, transparent, more!  (Read 144527 times)

Offline fireheart101

  • Forum Newcomer
  • *
  • Posts: 4
  • Floof-O-Meter: 0
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #50 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?

Offline greystar

  • Finest Floof
  • ***
  • Posts: 634
  • Country: 00
  • Floof-O-Meter: 24
  • hhhahahahahhhh...
    • Greystar2000
    • Quinnbee-s
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #51 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
Happy Pride Month!

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #52 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:

Offline BuioUmbra

  • Dedicated Supporter
  • ***
  • Posts: 404
  • Country: ie
  • Floof-O-Meter: 23
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #53 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
  :-\
Profile Picture by Kiaz1st on dA

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #54 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.

Offline BuioUmbra

  • Dedicated Supporter
  • ***
  • Posts: 404
  • Country: ie
  • Floof-O-Meter: 23
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #55 on: March 23, 2013, 09:15:06 pm »
The code or the textures?
Profile Picture by Kiaz1st on dA

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: ? Ze Big Book of Material Codes (Codes for your Presets and Objects!) ?
« Reply #56 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:

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Metallic Markings
« Reply #57 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,

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.)


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
}
}
}
}

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
« Last Edit: February 03, 2022, 09:55:42 am by Ruby1234 »

Offline WhiteLightHeart

  • iTrumpet~<3
  • Elder Grey Pelt
  • ****
  • Posts: 2,845
  • Country: us
  • Floof-O-Meter: 230
  • Seems legit
    • WhiteLightHeart
    • View Profile
:'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
|| ~Avatar by Kikiorylandia, Sig commissioned by Wolf_Memories~ ||
|| Thank you. <3 ||

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
:'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.?