Author Topic: Random, and Very Wierd, Preset Help  (Read 1072 times)

Offline Emberflame

  • Ancient Silver Mane
  • *****
  • Posts: 3,636
  • Country: 00
  • Floof-O-Meter: 27
    • WatcherMagic
    • View Profile
Random, and Very Wierd, Preset Help
« on: October 14, 2013, 10:54:09 pm »
Hello! I had the idea to make a water-textured preset, just like the water in-game, but I'm having trouble with coding. I'm using the water mats in-game to make the preset, and borrowing codes from the Water files. (P.S If this isn't allowed please tell me and I'll stop making this preset.) ANYWAY! This is my hilariously failing preset in-game at the moment:



Images don't do it though, but the wings and mane float above the body, and the wings and body ripple just like the in-game water texture. XD Plus, everything but the mane is flattened.

And this is the code I'm currently trying to work with:

material preset_7_bodyMatL
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7body
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off
         texture_unit
         {
            texture preset_7body.jpg
                                scale 0.4 0.4
            scroll_anim -0.05 -0.05
         }
      }
   }
}
material preset_7_bodyMatR
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7body
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off

         texture_unit
         {
            texture preset_7body.jpg
                                scale 0.4 0.4
            scroll_anim -0.05 -0.05
         }
      }
   }
}
material preset_7_headMatL
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7head
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off

         texture_unit
         {
            texture preset_7head.jpg
                                scale 0.4 0.4
            scroll_anim -0.05 -0.05
         }
      }
   }
}
material preset_7_headMatR
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7head
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off

         texture_unit
         {
            texture preset_7head.jpg
                                scale 0.4 0.4
            scroll_anim -0.05 -0.05
         }
      }
   }
}
material preset_7_eyeMatL
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7eye
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off

         texture_unit
         {
            texture preset_7eye.jpg
                                scale 0.5 0.5
            scroll_anim -0.08 0.1
         }
      }
   }
}
material preset_7_eyeMatR
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7eye
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off
         
         texture_unit
         {
            texture preset_7eye.jpg
                                scale 0.5 0.5
            scroll_anim -0.08 0.1
         }
      }
   }
}
material preset_7_tailMat
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7tail
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off

         texture_unit
         {
            texture preset_7tail.jpg
                                scale 0.4 0.4
            scroll_anim -0.05 -0.05
         }
      }
   }
}
material preset_7_maneMat
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7mane
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off

         texture_unit
         {
            texture preset_7mane.png
                                scale 0.5 0.5
            scroll_anim -0.08 0.1
         }
      }
   }
}
material preset_7_equipMatL
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7equip
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off
         texture_unit
         {
            texture preset_7equip.jpg
                                scale 0.5 0.5
            scroll_anim -0.08 0.1
         }
      }
   }
}
material preset_7_equipMatR
{
   technique
   {
      pass
      {
         //depth_write off
         scene_blend alpha_blend
         vertex_program_ref WaterVP
         {
            param_named_auto worldViewProjMatrix worldviewproj_matrix
            param_named_auto timeVal time 0.05
         }
         fragment_program_ref WaterFP
         {
            param_named colourTint float3 0.25 0.27 0.28
            param_named noiseScale float 10
         }
         texture_unit
         {
            preset_7equip
         }
      }

   }
}

vertex_program WaterVP cg
{
   source water.cg
   entry_point water_VP
   profiles vs_1_1 arbvp1
}

fragment_program WaterFP cg
{
   source water.cg
   entry_point water_FP
   profiles ps_2_0 arbfp1
}

fragment_program UnderWaterFP cg
{
   source water.cg
   entry_point underwater_FP
   profiles ps_2_0 arbfp1
}

         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off
         texture_unit
         {
            texture preset_7equip.jpg
                                scale 0.5 0.5
            scroll_anim -0.08 0.1
         }
      }
   }
}

I borrowed this code from the water.material file in FeralHeart>Media>Materials I'm not good a coding, know almost nothing about code, I just modify the little bits. :) If anybody can help please respond!

(Again, if I'm breaking the rules here or something, tell me and I can stop)
« Last Edit: October 15, 2013, 12:17:54 am by Firespirit »

Offline Kerriki

  • Band Geek
  • Immortal Legend
  • *****
  • Posts: 5,670
  • Country: us
  • Floof-O-Meter: 371
  • Who needs furniture when you have the floor?
    • Kikiorylandia
    • View Profile
    • DeviantART
Re: Random, and Very Wierd, Preset Help
« Reply #1 on: October 15, 2013, 12:35:43 am »
Are you trying to get the water to "move" (animated) on your preset or no?
Farewell everyone<3

Offline Feareh

  • The Jaguar Artist
  • Ancient Silver Mane
  • *****
  • Posts: 4,026
  • Country: us
  • Floof-O-Meter: 195
  • Where is the Walrus Species?
    • View Profile
Re: Random, and Very Wierd, Preset Help
« Reply #2 on: October 15, 2013, 01:18:05 am »
What in the world is that -pokes at it with a stick- I never seen that before xD
but I know another coding that works perfectly fine if you are wanting a water moving effect.
Code: [Select]
material preset_4_bodyMatL
{
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 PresteBody1.jpg
tex_address_mode wrap
filtering trilinear
colour_op replace
scroll_anim 0.0 0.1
}
texture_unit
{
texture PresetBody.png
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
}

}

}
}
Use this coding and use a water jpg that you can perhaps find on DeviantART or Google. Here is a texture I found that you might like since you are going for a water effect.
I Stalk from time to time...I have moved on to other things but do miss this place. Good times
Add me on discord:
Bakujio 🐺#7358

Offline Emberflame

  • Ancient Silver Mane
  • *****
  • Posts: 3,636
  • Country: 00
  • Floof-O-Meter: 27
    • WatcherMagic
    • View Profile
Re: Random, and Very Wierd, Preset Help
« Reply #3 on: October 15, 2013, 02:18:14 am »
Thanks, and yes, I'm trying to make it move. :) I'll try the codes tomorrow and tell you how it works, bedtime here :P

Offline Emberflame

  • Ancient Silver Mane
  • *****
  • Posts: 3,636
  • Country: 00
  • Floof-O-Meter: 27
    • WatcherMagic
    • View Profile
Re: Random, and Very Wierd, Preset Help
« Reply #4 on: October 15, 2013, 03:32:49 pm »
It's working perfectly now :D Thanks a lot!

Offline Feareh

  • The Jaguar Artist
  • Ancient Silver Mane
  • *****
  • Posts: 4,026
  • Country: us
  • Floof-O-Meter: 195
  • Where is the Walrus Species?
    • View Profile
Re: Random, and Very Wierd, Preset Help
« Reply #5 on: October 15, 2013, 08:18:32 pm »
It's working perfectly now :D Thanks a lot!
Oh wonderful oUo
now just alittle tip you can change the current and how fast your texture can move as well. Lower numbers =slower flow. higher number = faster flow.
Code: [Select]
texture Brightnebula2.jpg
tex_address_mode wrap
filtering trilinear
colour_op replace
scroll_anim 0.3 0.3 <------- change this for speed (currently this is a very fast speed)
I Stalk from time to time...I have moved on to other things but do miss this place. Good times
Add me on discord:
Bakujio 🐺#7358

Offline Emberflame

  • Ancient Silver Mane
  • *****
  • Posts: 3,636
  • Country: 00
  • Floof-O-Meter: 27
    • WatcherMagic
    • View Profile
Re: Random, and Very Wierd, Preset Help
« Reply #6 on: October 15, 2013, 10:28:58 pm »
I'd already read that somewhere and then figured it out on my own, but thx anyway :) +floof