Author Topic: is there code for this?  (Read 1174 times)

Offline logout

  • Curious Wanderer
  • *
  • Posts: 43
  • Floof-O-Meter: 2
    • View Profile
is there code for this?
« on: January 22, 2018, 03:41:49 pm »
hi i want make my characters dad a preset
we can do it without them glowing back and forth but we still was wondering is there a code for any type of these glows for the eyes?

glow 1) both eyes being same color and then glowing/changing into another color back and forth

glow 2) a simple shine or glow effect to the eyes of which it goes from dark to light of the same color (e.g like the IT glowing eyes where it will go from a bright blue to darker blue etc)

if not its ok im just make him one with two normal diff color eyes like asked :) tnx

Offline Bloo.

  • Space-Child ✌
  • Moderator
  • Elder Grey Pelt
  • *****
  • Posts: 2,657
  • Country: us
  • Floof-O-Meter: 191
  • nyoom
    • Bloopaloozer
    • Bloopalooza FH
    • aLittleProzium
    • Bloopalooza
    • View Profile
    • DeviantArt
Re: is there code for this?
« Reply #1 on: January 22, 2018, 04:46:05 pm »
I'm not sure how you can layer the two glow codes, I'm not much of a preset maker lol

But here are a number of preset codes you can comb through to get exactly what you're looking for, wish I could help more!
https://feral-heart.com/smf/index.php?topic=5665.0


You are amazing <3

Offline Kuri

  • Immortal Legend
  • *****
  • Posts: 8,168
  • Country: nz
  • Floof-O-Meter: 136
  • Foreboding evil harmless kitten.
    • dumbstuff4friends
    • channel/UCo42jgbLvEzkofpOin0_a4A
    • View Profile
Re: is there code for this?
« Reply #2 on: January 22, 2018, 05:47:59 pm »
Both those are possible.  Would you like me to make some codes & textures for it?
The Japanese concept of wabisabi:
The closest concept in english would be 'rustic'
They might have an old thing, one example is a favourite bowl or dish, it's broken, pieces are missing, why fix it?  With gold and pieces from other dishes?
"Because it was my favourite & I like it"

Lucius

  • Guest
Re: is there code for this?
« Reply #3 on: January 22, 2018, 06:07:47 pm »
There is.

glow 1) both eyes being same color and then glowing/changing into another color back and forth

To do that, you'll need to use the anim_texture code.

You'll have to layer the area you want to glow over the regular eye texture.


Example

Quote
material preset_4_eyeMatL
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture preset_4eye.jpg
         }
      }
      pass
      {
         scene_blend alpha_blend
         emissive 1 1 1 1
         texture_unit
         {
            anim_texture preset_4eyeGlow_0.png preset_4eyeGlow_1.png preset_4eyeGlow_2.png preset_4eyeGlow_3.png preset_4eyeGlow_4.png preset_4eyeGlow_5.png preset_4eyeGlow_6.png preset_4eyeGlow_7.png preset_4eyeGlow_8.png preset_4eyeGlow_9.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_10.png preset_4eyeGlow_9.png preset_4eyeGlow_8.png preset_4eyeGlow_7.png preset_4eyeGlow_6.png preset_4eyeGlow_5.png preset_4eyeGlow_4.png preset_4eyeGlow_3.png preset_4eyeGlow_2.png preset_4eyeGlow_1.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png preset_4eyeGlow_0.png 10.0
         }
      }
   }
}

The "preset_4eye.jpg" is your base texture. The anim_texture is long format in this case, to save file space. This means you can re-use files and arrange them however you want.

The long format is written like this: anim_texture <frame1> <frame2> ... <duration>

You must input the name of every frame (the same frame can be copy-pasted multiple times if you want it to show longer) one after the other and then the duration of the whole animation (in seconds).




You also have the short format, which is less writing, but more texture frames.

The short format is written like this: anim_texture <base_name> <num_frames> <duration>

If you want to use the short format, then your files must be suffixed with "_0", "_1", "_2", etc. in chronological order. Then, you input how many frames you have in the <num_frames> and how long the whole animation takes (in seconds) in the <duration>.




I'll provide some eye frames here if you want to use them as a base (they go from red to blue):

Eye_Animated_Glow.zip



glow 2) a simple shine or glow effect to the eyes of which it goes from dark to light of the same color (e.g like the IT glowing eyes where it will go from a bright blue to darker blue etc)

You can use the same code as above, but instead of making it animate from one color to another, you make it animate from light blue to dark blue.

If you don't want the dark blue to glow, then you'll need to make the dark blue as a base and layer a light blue on a pass with emissive over it, going from low to max opacity.




For both of these, you could also mask the part of the eye you want to glow and use a scrolling gradient texture with wave_xform to mimic the effect of changing colors.

Alternatively, if you want to save space, then you could create two eye textures and a mask that determines where the new color will overlay the old one. Then, you just need to create frames for the mask's opacity.

Let me know if you need examples, resources, or more in-depth explanations, I'll be happy to help.
« Last Edit: January 22, 2018, 06:17:59 pm by Lucius »

Offline logout

  • Curious Wanderer
  • *
  • Posts: 43
  • Floof-O-Meter: 2
    • View Profile
Re: is there code for this?
« Reply #4 on: January 23, 2018, 03:56:23 pm »
Both those are possible.  Would you like me to make some codes & textures for it?

if you could yes please :) and tnx to the others for the help