Feral Heart

Help & Guidance => Game Help => Topic started by: SL138197 on October 01, 2014, 06:05:01 pm

Title: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 06:05:01 pm
Hey,

Ok, so I'm doing Jake for the Halloween party, and wanted to give him some metal leg stuff.  
Only problem is, I have a glow coding inside the material file as well, and when I go to test in-game, it screws up.  
I know I'm coding wrong, but with a glow marking on the body already, is there a way to add both?
Title: Re: Metal Marking Preset Help?
Post by: TheApplePie on October 01, 2014, 08:21:20 pm
I have no idea on how to fix stuff in presets, and I can say to ye' is  that when you make a double sided preset, and put the metal on one side then the glow markings on the other, it should fix the problem.. I'm not entirely sure though. My preset making skills are far worse than object making so that's basically allI can say.   
Title: Re: Metal Marking Preset Help?
Post by: S. Italy/Romano on October 01, 2014, 10:18:49 pm
This is probably your metal code
material preset_1_bodyMatL
{
   technique
   {
      pass
      {
         ambient 0.8 0.9 0.9
         specular 1.0 1.0 1.0 128
         texture_unit
         {
            METALTEXTURE.jpg
            env_map spherical
         }
      }
   }
}
Ok and this is your glowing code, correct?
material preset_1_bodyMatL
{
   technique
   {
      pass
      {
         ambient 0.5 0.5 0.5
         texture_unit
         {
            texture NORMALTEXTURE.png
         }
      }
      pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture GLOWINGTEXTURE.png
         }
      }
   }
}

Now if you want to put a glowing marking ONTO the metal, your base texture would derive the metal code, like so:
material preset_1_bodyMatL
{
   technique
   {
      pass
      {
         ambient 0.8 0.9 0.9
         specular 1.0 1.0 1.0 128
         texture_unit
         {
            texture METALBASETEXTURE.png
            env_map spherical
         }
      }
 pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture GLOWINGTEXTURE.png
         }
      }
   }
}
But in this case, your whole body would be metallic.

Now as for a "leg only" metal code WITH glowing markings, it would be:
material preset_1_bodyMatL
{
   technique
   {
      pass
      {
         specular 0.5 0.5 0.5 1
         texture_unit
         {
            texture METALTEXTURE.png
            env_map spherical
         }
      }
      pass
      {
         ambient 0.5 0.5 0.5 1
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture NORMALTEXTURE.png
         }
      }
 pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture GLOWINGTEXTURE.png
}
}
}
}

At least I THINK it's supposed to be like this. I remember on my old account, one of my presets had a metallic eye that glowed in the center, so I may not remember the EXACT coding CORRECTLY.

EDIT: I think I may have found a guide that may help you: Metallic Markings (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg465661#msg465661) Glow Markings (http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=26062.msg555462#msg555462)

EDIT2: Tested, it works, just remember, your base body texture has to be a png and have transparent areas where the metal texture shows up underneath.
Title: Re: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 10:37:28 pm
Darn it, nope.

The reason  I need both together on the same part of the body is because there are scars on both sides, and the paw pads glow.  I added the coding in, and while it didn't mess anything up, it didn't add the metal.
Title: Re: Metal Marking Preset Help?
Post by: S. Italy/Romano on October 01, 2014, 10:41:37 pm
Did you erase the parts where the metal is supposed to show up on your base texture? I did and it worked fine.

(https://lh5.googleusercontent.com/-oK1XIEc7KVk/VCyDA__y5GI/AAAAAAAAB_g/v-9EbRXQV2c/w1598-h841-no/screenshot_10012014_183934653.png)

The metal is a separate texture that is made to look metallic, like a picture of steel of something. In the case of my screenshot, it was black with white lines.
Title: Re: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 10:42:08 pm
Wait, what do you mean by erase?
O_O
Title: Re: Metal Marking Preset Help?
Post by: S. Italy/Romano on October 01, 2014, 10:44:33 pm
So, your base texture is a PNG file with Transparency enabled.

On that image, anything that's supposed to be metal must be erased, so that the grey "checkerboard" shows up underneath.

MAKE BACKUPS IN CASE IT DOESN'T WORK FOR YOU.

EDIT: (https://lh6.googleusercontent.com/7NYV1Nsf0Q_DaX0jA9e_PWqf_6hTWHhR3ine4IS29wg=w1541-h867-no)
Title: Re: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 10:54:34 pm
Ok, so then I have the texture of the metal as the metal texture, and it replaces things that are erased?
Title: Re: Metal Marking Preset Help?
Post by: S. Italy/Romano on October 01, 2014, 10:56:47 pm
It's supposed to. We are "layering" these textures in the coding. So that the metal is the bottommost texture, covered by the base, which has transparent areas through which the metal texture is visible and finally, the topmost texture is the glow.

Remember: Backup files. I was working once on a preset and unknowingly forgot to make a backup folder. The result wasn't pretty. They teach us this in animation class: Computers are stupid.
Title: Re: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 11:00:54 pm
Hmm, I get what you're saying.

I'm doing that, in the coding this is what I have:
material preset_3_bodyMatL
{
   technique
   {
      pass
      {
         specular 0.5 0.5 0.5 1
         texture_unit
         {
            texture background-brushed2.png
            env_map spherical
         }
      }
      pass
      {
         ambient 0.5 0.5 0.5 1
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_3body.png
         }
      }
 pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture preset_3bodymarkings.png
}
material preset_3_bodyMatR
{
   technique
   {
      pass
      {
         ambient 0.5 0.5 0.5
         texture_unit
         {
            texture preset_3body.png
         }
      }
pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture preset_3bodymarkings.png
         }
      }
   }
}

And in GIMP the layers are
Glow
Body
Metal

I export it to a .png and it isn't showing up in-game

Title: Re: Metal Marking Preset Help?
Post by: S. Italy/Romano on October 01, 2014, 11:05:55 pm
There should be no layers in GIMP.

Let me try to explain this a bit simpler. Your coding's fine.

First, the metal texture is supposed to be named "background-brushed2.png" -All it is is a square image of metal, that's it.
Next, your base body image is named "preset_3body.png -This is your body with transparent areas.
Finally, your glow marking should be named "preset_3bodymarkings.png" -This is your glowing markings on a transparent background.

WAIT A SEC
EDIT: On your coding,

material preset_3_bodyMatL
{
   technique
   {
      pass
      {
         specular 0.5 0.5 0.5 1
         texture_unit
         {
            texture background-brushed2.png
            env_map spherical
         }
      }
      pass
      {
         ambient 0.5 0.5 0.5 1
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_3body.png
         }
      }
 pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture preset_3bodymarkings.png
}

You're missing four brackets, it should be:

material preset_3_bodyMatL
{
   technique
   {
      pass
      {
         specular 0.5 0.5 0.5 1
         texture_unit
         {
            texture background-brushed2.png
            env_map spherical
         }
      }
      pass
      {
         ambient 0.5 0.5 0.5 1
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_3body.png
         }
      }
 pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture preset_3bodymarkings.png
}
}
}
}
Title: Re: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 11:37:51 pm
Thank you!
I finally got it working, now Jake is officially done!

I appreciate it, lots and lots!
Title: Re: Metal Marking Preset Help?
Post by: S. Italy/Romano on October 01, 2014, 11:46:03 pm
No problem, glad I could help! Have fun with your preset :3
Title: Re: Metal Marking Preset Help?
Post by: SL138197 on October 01, 2014, 11:50:50 pm
I shall, can't wait for the Halloween party!