Feral Heart

Help & Guidance => Game Help => Topic started by: RottenLemon on August 05, 2018, 08:24:20 am

Title: Back at it again with another preset question.
Post by: RottenLemon 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!
Title: Re: Back at it again with another preset question.
Post by: yourlocalcrow 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 (https://feral-heart.com/smf/index.php?topic=26062.0) and using it only for the lips section to offer the illusion of transparency.
Title: Re: Back at it again with another preset question.
Post by: Lucius 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.
Title: Re: Back at it again with another preset question.
Post by: RottenLemon 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.
(https://i1380.photobucket.com/albums/ah190/Cruuxis/preset_1headNew_zpskuvknkos.png)

Then, we overlay a mask to let us know where we want the scrolling texture.
(https://i1380.photobucket.com/albums/ah190/Cruuxis/preset_1head_Mask_zpsvrose8pz.png)

And finally, we have the scrolling texture.
(https://i1380.photobucket.com/albums/ah190/Cruuxis/Lava_zpsfzxejoym.jpg)

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:
(https://i1380.photobucket.com/albums/ah190/Cruuxis/screenshot_09082017_210246076_zpsphxvoxtp.png)


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.
Title: Re: Back at it again with another preset question.
Post by: Warriorstrike on August 07, 2018, 07:29:36 pm
Locking this up as the issue appears to have been solved.~