Author Topic: Preset coding: How to make both translucent and scrolling?  (Read 1678 times)

Offline Windstrider

  • Familiar Grounds Dweller
  • **
  • Posts: 74
  • Country: us
  • Floof-O-Meter: 6
  • Soon-to-be college student!
    • Windstrider2017
    • windstrider2017@gmail.com
    • Windstrider2017
    • View Profile
Preset coding: How to make both translucent and scrolling?
« on: June 12, 2018, 09:59:18 pm »
So I got the scrolling codes to work just fine. I know it's possible to 'layer' codes, since I've seen the scroll-and-glow one, but I tried to do a similar thing with scroll-and-translucent and it didn't work. I'm fairly new to coding, so I probably did it wrong lmao, but could someone please tell me the right way to do it? Thanks.

Since this might help, I only want certain parts of the preset to scroll and be translucent. I made only the mane and tail scroll, and that worked totally fine. I assume I can do the same with every other preset 'special effect' code, including translucency.

If whoever answers this needs the preset code, I'll edit this post and add it.

Lucius

  • Guest
Re: Preset coding: How to make both translucent and scrolling?
« Reply #1 on: June 12, 2018, 10:14:29 pm »
By 'translucent' do you mean semi-transparent?

Also, is the scrolling texture meant to show under the transparent areas or not?

Offline Windstrider

  • Familiar Grounds Dweller
  • **
  • Posts: 74
  • Country: us
  • Floof-O-Meter: 6
  • Soon-to-be college student!
    • Windstrider2017
    • windstrider2017@gmail.com
    • Windstrider2017
    • View Profile
Re: Preset coding: How to make both translucent and scrolling?
« Reply #2 on: June 12, 2018, 11:13:09 pm »
Yeah, semi-transparent.

And idk if this is even possible but the scrolling texture is supposed to be semi-transparent, so it's almost like a ghost with scrolling effects. But I think it would also be nice to learn how to do a semi-transparent texture with a scrolling one underneath.
« Last Edit: June 12, 2018, 11:14:50 pm by Windstrider »

Offline D-ead7Dog

  • AFK NPC
  • Pack & Pride Representative
  • ****
  • Posts: 1,451
  • Country: us
  • Floof-O-Meter: 97
  • BUMPY SNOW
    • D-ead7Dog
    • d-ead7dog
    • View Profile

Artwork (c) Lynxbrush & CosmicFatality

Originally registered January 15, 2011

Lucius

  • Guest
Re: Preset coding: How to make both translucent and scrolling?
« Reply #4 on: June 12, 2018, 11:27:33 pm »
And idk if this is even possible but the scrolling texture is supposed to be semi-transparent, so it's almost like a ghost with scrolling effects. But I think it would also be nice to learn how to do a semi-transparent texture with a scrolling one underneath.

So if I'm understanding right, you want the scrolling texture to actually be the one that's translucent.

For that, you need this code:
Code: [Select]
material preset_1_bodyMatL
{
technique
{
pass
{
scene_blend alpha_blend
texture_unit
{
texture YOUR TEXTURE.png
  scroll_anim 0.1 0.1
}
}
}
}

For a semi-transparent over scrolling texture, this is the code you'd use:
Code: [Select]
material preset_1_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture SCROLLING TEXTURE.jpg
  scroll_anim 0.1 0.1
}
}
pass
{
scene_blend alpha_blend
texture_unit
{
texture TRANSLUCENT BODY.png
}
}
}
}

Offline Windstrider

  • Familiar Grounds Dweller
  • **
  • Posts: 74
  • Country: us
  • Floof-O-Meter: 6
  • Soon-to-be college student!
    • Windstrider2017
    • windstrider2017@gmail.com
    • Windstrider2017
    • View Profile
Re: Preset coding: How to make both translucent and scrolling?
« Reply #5 on: June 12, 2018, 11:30:11 pm »
Ok, thanks guys! Ima go try these out.

Edit:

@Lucius for the first one you posted, does the 'YOUR TEXTURE' part need to be made translucent in GIMP or Photoshop?
« Last Edit: June 12, 2018, 11:34:51 pm by Windstrider »

Lucius

  • Guest
Re: Preset coding: How to make both translucent and scrolling?
« Reply #6 on: June 12, 2018, 11:37:25 pm »
@Lucius for the first one you posted, does the 'YOUR TEXTURE' part need to be made translucent in GIMP or Photoshop?

Yes it does. Make it as opaque or transparent as you want.

Offline Windstrider

  • Familiar Grounds Dweller
  • **
  • Posts: 74
  • Country: us
  • Floof-O-Meter: 6
  • Soon-to-be college student!
    • Windstrider2017
    • windstrider2017@gmail.com
    • Windstrider2017
    • View Profile
Re: Preset coding: How to make both translucent and scrolling?
« Reply #7 on: June 12, 2018, 11:38:19 pm »
Ok, I'll try to make it a lot more translucent then (when it was opaque, and when it was 60% opaque, it didn't appear to change, so maybe it needs to be changed more). Also, does what I name the picture matter? (case-sensitive, etc. I know it's supposed to be png so that's not the issue).
« Last Edit: June 12, 2018, 11:39:54 pm by Windstrider »

Lucius

  • Guest
Re: Preset coding: How to make both translucent and scrolling?
« Reply #8 on: June 12, 2018, 11:42:17 pm »
Ok, I'll try to make it a lot more translucent then (when it was opaque, and when it was 60% opaque, it didn't appear to change, so maybe it needs to be changed more). Also, does what I name the picture matter? (case-sensitive, etc. I know it's supposed to be png so that's not the issue).

The file name doesn't matter, as long as it's the same as in the material code.

Example: My material file has "YOUR TEXTURE.png", so if I don't change it, then my image name has to be "YOUR TEXTURE.png" as well. If I change the "YOUR TEXTURE.png" to "preset_1body.png", then I'll have to name my image "preset_1body.png".

But I tested the code with a 50% transparency and I noticed a difference, so 60% should look translucent as well. May I take a gander at the rest of your material code?


Edited for clarity.
« Last Edit: June 12, 2018, 11:46:16 pm by Lucius »

Offline Windstrider

  • Familiar Grounds Dweller
  • **
  • Posts: 74
  • Country: us
  • Floof-O-Meter: 6
  • Soon-to-be college student!
    • Windstrider2017
    • windstrider2017@gmail.com
    • Windstrider2017
    • View Profile
Re: Preset coding: How to make both translucent and scrolling?
« Reply #9 on: June 12, 2018, 11:45:49 pm »
Oml I just realized what my mistake was!! When I got the scrolling codes to work earlier, I made a backup copy of the material file in case the other codes I was doing messed it up somehow, and I think having two of the text files in there (I assumed the 'preset_10 - Copy' would be counted as a different file but I guess not. Ohhh my gawd that explains it x'D Cause just before I was about to put the code in here and post it, I was like wait a minute... -deletes extra material file- -issue solved-

Sorry for any hassle, and thanks!