Feral Heart

Help & Guidance => Game Help => Topic started by: flandesuyo1 on September 26, 2017, 03:53:54 am

Title: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 03:53:54 am
So I originally had some issue with my character's mane a month or two a while back and I was tryin got fix it with some code or something but ended up not touching it and now the mane wont show up entirely. This is the code for my preset_9 mane:


material preset_9_maneMat
{
   technique
   {
      pass
      {
         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off
         texture_unit
         {
      
         }
      }
   }
}
What's the proper coding for the mane to get it to show, and not in a weird transparent matter?
Title: Re: Some mane coding help?
Post by: Kerriki on September 26, 2017, 03:55:18 am
Try this

Code: [Select]
material preset_9_maneMat
{
technique
{
pass
{
                        cull_hardware none
                        cull_software none
                        alpha_rejection greater_equal 128
                        texture_unit
{
texture preset_9mane.png
}
}
}
}
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 03:57:44 am
That actually just ended up making the hair marshmallow white instead of the weird yellow/black it was. And the tail is not showin gup now for my preset :/
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 03:58:38 am
   }
   }
}
material preset_9_tailMat
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinTail.png
         }
      }
   }
}material preset_9_maneMat
{
 technique
 {
  pass
  {
                        cull_hardware none
                        cull_software none
                        alpha_rejection greater_equal 128
                        texture_unit
   {
    texture preset_9mane.png
   }
  }
 }
}
This happened now.. yikes. Dont know exactly what to do, I'm a coding noob.
Title: Re: Some mane coding help?
Post by: Kerriki on September 26, 2017, 04:02:45 am
Can you post your entire coding here?
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 04:04:49 am
Yeah, I can only paste it tho. Here it is:
material preset_9_bodyMatL
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinBody_Left.png
         }
      }
   }
}
material preset_9_bodyMatR
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinBody_Right.png
         }
      }
   }
}
material preset_9_headMatL
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinHead_Left.png
         }
      }
   }
}
material preset_9_headMatR
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinHead_Right.png
         }
      }
   }
}
material preset_9_eyeMatL
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture RinEyes_Left.png
         }
      }
   }
}
material preset_9_eyeMatR
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture RinEyes_Right.png
         }
      }
   }
}
material preset_9_tailMat
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinTail.png
         }
      }
   }
}material preset_9_maneMat
{
 technique
 {
  pass
  {
                        cull_hardware none
                        cull_software none
                        alpha_rejection greater_equal 128
                        texture_unit
   {
    texture preset_9mane.png
   }
  }
Title: Re: Some mane coding help?
Post by: Kerriki on September 26, 2017, 04:22:53 am
I see what happened ^^

Quote from:
material preset_9_tailMat
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture RinTail.png
         }
      }
   }
}material preset_9_maneMat
{
 technique
 {
  pass
  {
                        cull_hardware none
                        cull_software none
                        alpha_rejection greater_equal 128
                        texture_unit
   {
    texture preset_9mane.png
   }
  }

See the yellow and red? Bring the "material preset_9_maneMat" on its own new line; it shouldn't be next to the } symbol, so instead the yellow and red bits look like this:

Quote from:
}
material preset_9_maneMat
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 05:00:19 am
Still not working.. I tried to fix the spacing and everything. Very frustrated lol I worked hard on my preset and want to get this darn coding right.
Title: Re: Some mane coding help?
Post by: Azurain on September 26, 2017, 05:03:59 am
Did you make sure your mane file itself is a png and not jpg? Usually with your mane not working like it is, it's because you have the wrong file type set in the coding.
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 05:06:55 am
It's a png. I think its a matter of my spacing and stuff and maybe the coding itself.. It's like the whole thing needs to be rewritten because I screwed with it a while ago and it won't work on the tail now, not just the mane. This was originally to solve a weird transparency issue on the mane, it was layered oddly and now it just won't show.
Title: Re: Some mane coding help?
Post by: Azurain on September 26, 2017, 05:10:09 am
You can always try and get a fresh new preset file and just fill it all out accordingly and then stick the mane fix in it then. If it really is an issue of where all the spacing got messed up. (Coding is so complicated sometimes, even when it doesn't need to be. xD)
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 05:12:37 am
Ill do that and ill probably get back to the initial mane problem. I'll try that and then get off (my dad will kill me if he sees im still on the computer at this hour) And continue this tomorrow if anything isn't solved ♡
Title: Re: Some mane coding help?
Post by: Azurain on September 26, 2017, 05:17:43 am
Aye, that's probably the best plan! Let us know if it works when you can! ^^
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 05:18:29 am
Put all the files and stuff in the different folder (empty preset folder) but it wont show up >_> Can someone tell me what I'm missing, and what I need to do and maybe some solutions to fix my one that was in the original preset_9 folder? I'll solve it in the morning but will read the replies in bed tonight
Title: Re: Some mane coding help?
Post by: Hakumi on September 26, 2017, 05:20:49 am
You have to make sure that the coding in the new preset folder actually matches. Number wise and all. If you were to just move everything to an empty preset folder without changing the numbers, it won't show for ya so make sure you did that. Also, follow the coding that Kiki did earlier for the mane and you should be good to go.
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 05:27:46 am
Thanks, i’ll do that tomorrow! And when i added in the coding that they gave me the spacing was different from the actual spacing in all other parts of it. Did i need to click [select] code one the forum to get the right format instead of highlighting>copy>paste
Title: Re: Some mane coding help?
Post by: Morgra on September 26, 2017, 05:32:16 am
Thanks, i’ll do that tomorrow! And when i added in the coding that they gave me the spacing was different from the actual spacing in all other parts of it. Did i need to click [select] code one the forum to get the right format instead of highlighting>copy>paste
The spacing doesn't matter as long as the same number of brackets are there, which to me it looks like they are. ^^ Certain people may have a preference for more or less spacing but it is all still the same code.

And there's no difference between the Select button and Highlighting it all and copying and pasting it.
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 05:36:17 am
thanks for clearing that up for me. I’ll do all these changes tomorrow to see if i can fix this dang preset of my boy. Also, a friend asks about what “coding language” this is?
Title: Re: Some mane coding help?
Post by: Morgra on September 26, 2017, 05:42:17 am
FeralHeart is on the Ogre game engine and this is an Ogre material that you are coding ^^
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 09:24:22 pm
Alright! So i finally have had the time to transfer everything and it is now in the preset_3 folder! We're back to the initial problem I was trying to fix. The mane texture is not full. It's odd to where it just kinda, phases through itself. It has everything but its not exactly solid. Its like a texture that really has no mesh and its kinda empty, (Kinda like feral heart huge rock mountains.)
Code: [Select]
material preset_3_maneMat
{
technique
{
pass
{
lighting off
cull_hardware none
cull_software none
scene_blend alpha_blend
depth_write off
texture_unit
{
texture RinHair.png
}
}
}
}

This is the initial and default coding with all my textures put together.
Title: Re: Some mane coding help?
Post by: Morgra on September 26, 2017, 09:39:32 pm
Try this:
Code: [Select]
material preset_3_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
   alpha_rejection greater_equal 128
texture_unit
{
texture RinHair.png
}
}
}
}
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 10:19:39 pm
That fixed it, thank you so much! My baby Rin is finally finished and I can finally use him, after figuring out this dang preset sync D': But thank you all for the help!
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 26, 2017, 10:36:17 pm
Oh darnit.. Went to put it on Rin's original character and it wont even show up. It works in the preset maker but not the actually character maker D:
Title: Re: Some mane coding help?
Post by: Hakumi on September 27, 2017, 01:54:58 am
Did you export the preset from the preset maker?
If you didn't, it won't show up in the character selection.
Make sure you export it and near the last tab where you're changing the colors and all of that, click 'Preset' and it should be there.
Title: Re: Some mane coding help?
Post by: VortexAlive on September 27, 2017, 02:40:18 am
When you export it (because of Preset Sync) make sure to move your .fhp to your PrivatePresets folder or it might get deleted when opening the game again.
Title: Re: Some mane coding help?
Post by: flandesuyo1 on September 30, 2017, 04:51:21 am
Yeah it was exported from the preset maker. Everything has been solved now as of last week and my preset is finally showing up!
Title: Re: Some mane coding help?
Post by: Kerriki on September 30, 2017, 05:17:11 am
I'm glad it's working! Have fun with your preset c:

Locking this up now