Author Topic: A little help with presetting?  (Read 1464 times)

Offline Zarago

  • Finest Floof
  • ***
  • Posts: 661
  • Floof-O-Meter: 47
  • Officially left.
    • View Profile
A little help with presetting?
« 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

Thierry

  • Guest
Re: A little help with presetting?
« Reply #1 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
         }
      }
   }
}
« Last Edit: September 04, 2012, 09:35:43 pm by Thierry »

Offline Zarago

  • Finest Floof
  • ***
  • Posts: 661
  • Floof-O-Meter: 47
  • Officially left.
    • View Profile
Re: A little help with presetting?
« Reply #2 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.

Thierry

  • Guest
Re: A little help with presetting?
« Reply #3 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.

Offline Zarago

  • Finest Floof
  • ***
  • Posts: 661
  • Floof-O-Meter: 47
  • Officially left.
    • View Profile
Re: A little help with presetting?
« Reply #4 on: September 04, 2012, 09:59:14 pm »
Thank you for your help.

Thierry

  • Guest
Re: A little help with presetting?
« Reply #5 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):



Offline Zarago

  • Finest Floof
  • ***
  • Posts: 661
  • Floof-O-Meter: 47
  • Officially left.
    • View Profile
Re: A little help with presetting?
« Reply #6 on: September 05, 2012, 07:59:54 am »
Ah, thank you for that. Does it work for the head and tail, too?

Offline hugrf2

  • Purple Derple
  • Honored Hero
  • *****
  • Posts: 5,314
  • Country: us
  • Floof-O-Meter: 120
  • wrow
    • hugrf
    • channel/UChLphw5s3-hS8EFAgnNv6FQ
    • hugrf
    • hugrf
    • Ain't nobody got time fo' dat
    • View Profile
Re: A little help with presetting?
« Reply #7 on: September 05, 2012, 10:18:23 am »
I'm sure.

Thierry

  • Guest
Re: A little help with presetting?
« Reply #8 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 ;)