Feral Heart

Help & Guidance => Game Help => Topic started by: FlyingGrass on September 12, 2017, 12:09:58 pm

Title: Two problems in preset making
Post by: FlyingGrass on September 12, 2017, 12:09:58 pm
I'm creating a wolf preset that is riddled with scars.
To make the scars shiny, I am using layers. Layers with transparency always have a border on them, how do I get rid of the border on layers?

Screenshot:
(https://i.imgur.com/VIwu0Hi.png)

Code:
Code: [Select]
material preset_7_headMatL
{
        receive_shadows on
        technique
        {

                pass
                {
                         ambient 1.000000 1.000000 1.000000 1.000000
                         diffuse 1.000000 1.000000 1.000000 1.000000
                         specular 0.010000 0.010000 0.010000 1.000000
                         emissive 0.000000 0.000000 0.000000 1.000000
                         texture_unit
                         {
                                 texture Preset_7HeadL.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }

                }

                pass
                {
                         ambient 1.000000 1.000000 1.000000 1.000000
                         diffuse 1.000000 1.000000 1.000000 1.000000
                         emissive 0.000000 0.000000 0.000000 1.000000
                         cull_hardware none
                         cull_software none
                         scene_blend alpha_blend
                         alpha_rejection greater_equal 128
                         texture_unit
                         {
                                 texture MuzzleScar.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }

                }

        }
}

Second problem I'm having is when I tried to modify the eye code of Gui's preset, the eyes and teeth turned white.
This problem started when I tried to put the teeth in a different layer, and also tried putting a scrolling texture beneath the eyes(At the same time).

Code:
Code: [Select]
material preset_1_eyeMatL
{
        receive_shadows on
        technique
        {

                pass
                {
                         }
                         specular 1.0 1.0 1.0 128
                         texture_unit
                         {
                                 texture presetGuieyeLTFT.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }

                }
  pass
  {
   ambient 0.5 0.5 0.5
   specular 0.010000 0.010000 0.010000 1.000000
   emissive 1.0 1.0 1.0
   cull_hardware none
   cull_software none
   scene_blend alpha_blend
   alpha_rejection greater_equal 128
   texture_unit
   {
    texture presetGui5eyeRTFTeeth
   }
  }
 }
}
material preset_1_eyeMatR
{
        receive_shadows on
        technique
        {

                pass
                {
                         ambient 0.5 0.5 0.5
                         diffuse 1.000000 1.000000 1.000000 1.000000
                         specular 0.010000 0.010000 0.010000 1.000000
                         emissive 0.000000 0.000000 0.000000 1.000000
                         texture_unit
                         {
                                 texture presetCoolantAnimTR.jpg
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op replace
                                 scroll_anim 0.0 0.1
                         }
                         specular 1.0 1.0 1.0 128
                         texture_unit
                         {
                                 texture presetGui5eyeRTFT.png
                                 tex_address_mode wrap
                                 filtering trilinear
                                 colour_op alpha_blend
                         }

                }
  pass
  {
   ambient 0.5 0.5 0.5
   diffuse 1.000000 1.000000 1.000000 1.000000
   specular 0.010000 0.010000 0.010000 1.000000
   emissive 1.0 1.0 1.0
   cull_hardware none
   cull_software none
   scene_blend alpha_blend
   alpha_rejection greater_equal 128
   texture_unit
   {
    texture presetGui5eyeRTFTeeth
   }
  }
 }
}

Title: Re: Two problems in preset making
Post by: Hakumi on September 12, 2017, 04:47:15 pm
For your first problem with the scars, make sure that the layers are flat ( meaning it's all on one layer when you go to save ). Unless you're making the scars glow, then you're going to have to take the 'glow parts' and save them by themselves. If you're just making it look 'shiny' the trick I use is to just go slightly lighter and going over where I think the scar will shine most in the coloring. ( Lighter than the original base colour of the scar that is ). Don't use any special layer modes.



Second problem, with the scrolling eyes, it is possible. Make sure that the eyes are indeed solid and there's no transparency with it. On top of that, if ou want just to the teeth to scroll, erase the teeth completely. I think it took me a couple of tries with my Rainbow Preset because I wanted animations for the eyes and the teeth to have a scrolling texture. With mine I think I selected the teeth and turned down the opacity layer, saved it as an eye texture and then added my scrolling code.

Here's my coding for my eyes. Just edit so it'll match everything in your files and tell me if it works o:

Code: [Select]
material preset_5_eyeMatL
{
technique
{
pass
{
texture_unit
{
texture RainbowScroll.png
scroll_anim 2.0 0.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_5eye.png
}
}
}
}
material preset_5_eyeMatR
{
technique
{
pass
{
texture_unit
{
texture RainbowScroll.png
scroll_anim 2.0 0.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_5eye.png
}
}
}
}
Title: Re: Two problems in preset making
Post by: Kuri on September 12, 2017, 07:45:57 pm
For the scars, try winding the alpha rejection up from 128 to 200, i've seen that reduce the outlines.
Title: Re: Now only two problems in preset making
Post by: FlyingGrass on September 16, 2017, 05:07:07 am
Second problem, with the scrolling eyes, it is possible. Make sure that the eyes are indeed solid and there's no transparency with it. On top of that, if ou want just to the teeth to scroll, erase the teeth completely. I think it took me a couple of tries with my Rainbow Preset because I wanted animations for the eyes and the teeth to have a scrolling texture. With mine I think I selected the teeth and turned down the opacity layer, saved it as an eye texture and then added my scrolling code.

Here's my coding for my eyes. Just edit so it'll match everything in your files and tell me if it works o:

Code: [Select]
material preset_5_eyeMatL
{
technique
{
pass
{
texture_unit
{
texture RainbowScroll.png
scroll_anim 2.0 0.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_5eye.png
}
}
}
}
material preset_5_eyeMatR
{
technique
{
pass
{
texture_unit
{
texture RainbowScroll.png
scroll_anim 2.0 0.0
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture preset_5eye.png
}
}
}
}

I tried it, and the eye is still completely white.

I messed with the code of the body, and the deleting of a layer resulted in a similar problem with the body. I fixed the body.
Title: Re: Three problems in preset making, two are similar
Post by: Hakumi on September 16, 2017, 05:21:16 am
Are the files matching completely with what's written in the material and whatever you have the file named saved as..? And are you sure that the file is transparent where you want the transparency?
Title: Re: Two problems in preset making
Post by: FlyingGrass on September 16, 2017, 05:24:25 am
Are the files matching completely with what's written in the material and whatever you have the file named saved as..? And are you sure that the file is transparent where you want the transparency?
The eye file had no transparent areas when I added the scrolling code, could that be the cause of the eye turning white whenever the scrolling texture is used?
Title: Re: Two problems in preset making
Post by: Hakumi on September 16, 2017, 05:26:56 am
Are the files matching completely with what's written in the material and whatever you have the file named saved as..? And are you sure that the file is transparent where you want the transparency?
The eye file had no transparent areas when I added the scrolling code, could that be the cause of the eye turning white whenever the scrolling texture is used?


Ah, there needs to be some transparency where you want the portion of the eye file to scroll or else the coding simply won't work.
Title: Re: Two problems in preset making
Post by: FlyingGrass on September 16, 2017, 05:54:55 am
Are the files matching completely with what's written in the material and whatever you have the file named saved as..? And are you sure that the file is transparent where you want the transparency?
The eye file had no transparent areas when I added the scrolling code, could that be the cause of the eye turning white whenever the scrolling texture is used?


Ah, there needs to be some transparency where you want the portion of the eye file to scroll or else the coding simply won't work.
The eye and teeth can turn completely white if there are no transparent areas on the image?

I used the code that requires a mask file instead of transparency, and it works. Now the preset's eyes can scroll with a reflective layer below it.
Title: Re: Two problems in preset making
Post by: Hakumi on September 16, 2017, 05:59:21 am
That's usually the case for some codes since it requires a transparency layer in order for it to properly work if you want scrolling and the whole section is a scrolling texture.

But were you able to get it work? I could always try to see if I can get it working on my end if you want to send the files over and I'll send everything back to you, coding and all through PM if nej other solution is available o;
Title: Re: Two problems in preset making
Post by: FlyingGrass on September 16, 2017, 06:02:59 am
That's usually the case for some codes since it requires a transparency layer in order for it to properly work if you want scrolling and the whole section is a scrolling texture.

But were you able to get it work? I could always try to see if I can get it working on my end if you want to send the files over and I'll send everything back to you, coding and all through PM if nej other solution is available o;
I've found a solution that allows me to have a layer underneath the eye while keeping the scrolling texture, but I can still send the files to you if you want to investigate.
Title: Re: Two problems in preset making
Post by: Hakumi on September 16, 2017, 06:06:43 am
That's usually the case for some codes since it requires a transparency layer in order for it to properly work if you want scrolling and the whole section is a scrolling texture.

But were you able to get it work? I could always try to see if I can get it working on my end if you want to send the files over and I'll send everything back to you, coding and all through PM if nej other solution is available o;
I've found a solution that allows me to have a layer underneath the eye while keeping the scrolling texture, but I can still send the files to you if you want to investigate.


Only if ya needed help fixing it up or wanting me to take a look-see since I have most of my codes saved on my other computer c:

But at least you have a solution that works for ya o: