Author Topic: Back at it again with another preset question.  (Read 999 times)

Offline RottenLemon

  • Curious Wanderer
  • *
  • Posts: 37
  • Country: us
  • Floof-O-Meter: 0
  • Tiny lamb noises.
    • View Profile
Back at it again with another preset question.
« on: August 05, 2018, 08:24:20 am »
Hello! Yes, I'm back here again with another preset problem.

So, let's just get right in to it. I'm making a transparent/scrolling preset, and I have the scrolling part down properly, but I was wondering how I'd go about separating the spots on the head? I want the mouth/lips to be transparent, but the tongue to have scrolling, and I'm not sure how I'd do that. I've seen it done before so I know it's possible at least. (Or, at least, I think I have.)

Possibly an easy thing, but any help is appreciated!
I don't use the forum haha.

[Sits in the same corner, on the same character, doing the same nothing in Grounds 24/7]

Offline yourlocalcrow

  • Dedicated Supporter
  • ***
  • Posts: 412
  • Country: us
  • Floof-O-Meter: 43
  • they/them
    • View Profile
    • my deviantArt
Re: Back at it again with another preset question.
« Reply #1 on: August 06, 2018, 12:10:09 am »
There is no real way to make the lips transparent without seeing the scroll through it. What I can suggest is applying the ghost code found here and using it only for the lips section to offer the illusion of transparency.

Lucius

  • Guest
Re: Back at it again with another preset question.
« Reply #2 on: August 06, 2018, 12:28:04 am »
It's possible, let me get my code in order and I'll show you how.

Alright, so first we have a transparent head.

Then, we overlay a mask to let us know where we want the scrolling texture.

And finally, we have the scrolling texture.

The code to make this work is this:
Code: [Select]
material preset_12_headMatL
 {
    technique
    {
       pass
       {
 scene_blend alpha_blend
 alpha_rejection greater 128
 texture_unit
 {
 texture TRANSPARENT HEAD.png
 }
 }
 pass
 {
 scene_blend alpha_blend
 alpha_rejection greater 128
 texture_unit
 {
 texture HEAD MASK (BLACK AREAS WHERE YOU WANT SCROLLING).png
 }
 texture_unit
 {
 texture HEAD MASK (BLACK AREAS WHERE YOU WANT SCROLLING).png             
 colour_op alpha_blend
 }
 texture_unit
 {
 texture SCROLLING TEXTURE.jpg
 colour_op_ex blend_current_alpha src_texture src_current
 tex_address_mode wrap
 filtering trilinear
 scroll_anim 0.0 0.1
          }
       }
    }
 }

The result is this:


Just make the black mask over the tongue instead of the swirls that I did in the example, and obviously only erase the areas where you want transparency on the main head texture.
« Last Edit: July 19, 2020, 10:07:54 pm by Lucius »

Offline RottenLemon

  • Curious Wanderer
  • *
  • Posts: 37
  • Country: us
  • Floof-O-Meter: 0
  • Tiny lamb noises.
    • View Profile
Re: Back at it again with another preset question.
« Reply #3 on: August 06, 2018, 10:49:57 am »
It's possible, let me get my code in order and I'll show you how.

Alright, so first we have a transparent head.

Then, we overlay a mask to let us know where we want the scrolling texture.

And finally, we have the scrolling texture.

The code to make this work is this:
Code: [Select]
material preset_12_headMatL
 {
    technique
    {
       pass
       {
 scene_blend alpha_blend
 alpha_rejection greater 128
 texture_unit
 {
 texture TRANSPARENT HEAD.png
 }
 }
 pass
 {
 scene_blend alpha_blend
 alpha_rejection greater 128
 texture_unit
 {
 texture HEAD MASK (BLACK AREAS WHERE YOU WANT SCROLLING).png
 }
 texture_unit
 {
 texture HEAD MASK (BLACK AREAS WHERE YOU WANT SCROLLING).png             
 colour_op alpha_blend
 }
 texture_unit
 {
 texture SCROLLING TEXTURE.jpg
 colour_op_ex blend_current_alpha src_texture src_current
 tex_address_mode wrap
 filtering trilinear
 scroll_anim 0.0 0.1
          }
       }
    }
 }

The result is this:


Just make the black mask over the tongue instead of the swirls that I did in the example, and obviously only erase the areas where you want transparency on the main head texture.


Thank you thank you! Seems to be working.
I don't use the forum haha.

[Sits in the same corner, on the same character, doing the same nothing in Grounds 24/7]

Offline Warriorstrike

  • . "The truth is often what we make of it; you heard what you wanted to hear, believed what you wanted to believe."
  • Ancient Silver Mane
  • *****
  • Posts: 4,221
  • Country: us
  • Floof-O-Meter: 346
  • . Remember… the Force will be with you. Always.
    • warriorstrike
    • warriorstrike
    • View Profile
    • My Tumblr
Re: Back at it again with another preset question.
« Reply #4 on: August 07, 2018, 07:29:36 pm »
Locking this up as the issue appears to have been solved.~

If you define yourself by the power to take life, the desire to dominate, to possess… then you have nothing.