Feral Heart

Help & Guidance => Game Help => Topic started by: Zarago on September 04, 2012, 09:29:57 pm

Title: A little help with presetting?
Post by: Zarago on September 04, 2012, 09:29:57 pm
A little help with presetting?

I'm trying to make a preset using the code below (the one that makes presets disappear and then randomly return).

Quote
material preset_4_bodyMatL
{
   technique
   {
      pass
      {
      lighting off
      scene_blend colour_blend
      depth_write off
      cull_hardware none
      cull_software none
         texture_unit
         {
           texture InvisibleTex.png
           tex_address_mode wrap
           filtering trilinear
         }
         texture_unit
         {
            texture TransparentMarkingTex.png
      scroll_anim 0.01 0.02
      tex_address_mode wrap
      rotate_anim -0.01
      wave_xform scale_x sine 3 0.1 0 3
      wave_xform scale_y sine 3 0.1 0 3           
            colour_op alpha_blend
         }
         texture_unit
         {
            texture InvisibleTex.png
            colour_op_ex blend_current_alpha src_texture src_current
         }
      }
   }
}

It doesn't work (and it makes half of the body white). Is there any way to fix this?

Thank you in advance.

Zarago
Title: Re: A little help with presetting?
Post by: Thierry on September 04, 2012, 09:33:29 pm
a question, maybe a silly one..

you are using the preset_4_bodyMatL (left), you are not missing to do the same script with the right side? i mean the preset_4_bodyMatR



You will need to just change this marked in red:

material preset_4_bodyMatR
{
   technique
   {
      pass
      {
      lighting off
      scene_blend colour_blend
      depth_write off
      cull_hardware none
      cull_software none
         texture_unit
         {
           texture InvisibleTex.png
           tex_address_mode wrap
           filtering trilinear
         }
         texture_unit
         {
            texture TransparentMarkingTex.png
      scroll_anim 0.01 0.02
      tex_address_mode wrap
      rotate_anim -0.01
      wave_xform scale_x sine 3 0.1 0 3
      wave_xform scale_y sine 3 0.1 0 3           
            colour_op alpha_blend
         }
         texture_unit
         {
            texture InvisibleTex.png
            colour_op_ex blend_current_alpha src_texture src_current
         }
      }
   }
}
Title: Re: A little help with presetting?
Post by: Zarago on September 04, 2012, 09:41:55 pm
I did that, and now both sides are white, but there is no disappearing and re-appearing as it said there would be in the description. I also used the same code for the head and tail, but now it has just replaced the entire preset with white.
Title: Re: A little help with presetting?
Post by: Thierry on September 04, 2012, 09:44:17 pm
Ok, this mean the material script has something wrong, maybe there are missing png images or it has just something wrong with the code. I will take a look and tell you in about 10 minutes.
Title: Re: A little help with presetting?
Post by: Zarago on September 04, 2012, 09:59:14 pm
Thank you for your help.
Title: Re: A little help with presetting?
Post by: Thierry on September 04, 2012, 10:01:33 pm
Ok, the problem is in the script, try this one instead:


material preset_4_bodyMatL
{
   technique
   {
      pass
      {
      lighting off
      scene_blend colour_blend
      depth_write off
      cull_hardware none
      cull_software none
         texture_unit
         {
           texture InvisibleTex.png
           tex_address_mode wrap
           filtering trilinear
         }
         texture_unit
         {
            texture TransparentMarkingTex.png
      scroll_anim 0.01 0.02
      tex_address_mode wrap
      rotate_anim -0.01
      wave_xform scale_x sine 3 0.1 0 3
      wave_xform scale_y sine 3 0.1 0 3           
            colour_op alpha_blend
         }
      }
   }
}






i just removed this texture unit:
         texture_unit
         {
            texture InvisibleTex.png
            colour_op_ex blend_current_alpha src_texture src_current
         }

and now looks like this (it is moving and it does not looks very good at the screenshot):
(https://dl.dropbox.com/u/42695546/otros/screenshot_09042012_170035280.png)

Title: Re: A little help with presetting?
Post by: Zarago on September 05, 2012, 07:59:54 am
Ah, thank you for that. Does it work for the head and tail, too?
Title: Re: A little help with presetting?
Post by: hugrf2 on September 05, 2012, 10:18:23 am
I'm sure.
Title: Re: A little help with presetting?
Post by: Thierry on September 05, 2012, 03:17:16 pm
Sure yes, you need to paste the same script for each body part, but i was lazy to do it.
But if you don't know how just ask here ;)