Jump to content

How to make only part of a texture transparent?


Recommended Posts

I want to make the pink top on Fiona transparent without affecting the ribbons on the hip, but since this is the same texture hash, this is causing all parts of the texture to be transparent.

What is the procedure for making only the top portion of the texture transparent?

 

[TextureOverrideTop]
hash = 42d49bad
match_first_index = 8052
vb0 = ResourcePinkTopVB
ib = ResourcePinkTopIB
handling = skip
drawindexed = auto
run = CustomShaderTransparency

[CustomShaderTransparency]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.1
blend_factor[1] = 0.1
blend_factor[2] = 0.1
blend_factor[3] = 1
drawindexed = auto

 

 

Spoiler

image.thumb.png.edf9c1be4de8b42944157254257b18d0.png

 

Edited by xenofactor07
Link to comment
2 hours ago, xenofactor07 said:

I want to make the pink top on Fiona transparent without affecting the ribbons on the hip, but since this is the same texture hash, this is causing all parts of the texture to be transparent.

What is the procedure for making only the top portion of the texture transparent?

 

[TextureOverrideTop]
hash = 42d49bad
match_first_index = 8052
vb0 = ResourcePinkTopVB
ib = ResourcePinkTopIB
handling = skip
drawindexed = auto
run = CustomShaderTransparency

[CustomShaderTransparency]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.1
blend_factor[1] = 0.1
blend_factor[2] = 0.1
blend_factor[3] = 1
drawindexed = auto

 

 

  Reveal hidden contents

image.thumb.png.edf9c1be4de8b42944157254257b18d0.png

 

If the texture already has an alpha channel, it is enough to paint the part that is to be transparent in it

If not, maybe split this part into 2 elements, one with transparency and the other without:

 

[TextureOverrideTopA]
hash = 42d49bad
match_priority = 0
match_first_index = 8052
vb0 = ResourcePinkTopAVB
ib = ResourcePinkTopAIB
handling = skip
drawindexed = auto
run = CustomShaderTransparency

 

[TextureOverrideTopB]
hash = 42d49bad
match_priority = 1
match_first_index = 8052
vb0 = ResourcePinkTopBVB
ib = ResourcePinkTopBIB
handling = skip
drawindexed = auto
 

nothing else comes to mind

Edited by Yorom
Link to comment
  • 4 months later...
On 2021/11/19 at AM1点47分, Yorom said:

如果纹理已经有一个 alpha 通道,则在其中绘制要透明的部分就足够了

如果不是,则可能将此部分拆分为 2 个元素,一个具有透明度,另一个不具有:

 

[TextureOverrideTopA]
hash = 42d49bad
match_priority = 0
match_first_index = 8052
vb0 = ResourcePinkTopAVB
ib = ResourcePinkTopAIB
处理 = 跳过
drawindexed = 自动
运行 = CustomShaderTransparency

 

[TextureOverrideTopB]
hash = 42d49bad
match_priority = 1
match_first_index = 8052
vb0 = ResourcePinkTopBVB
ib = ResourcePinkTopBIB
处理 = 跳过
drawindexed = auto
 

没有别的想法

If making jewelry, does every girl need to adjust the position of jewelry? Is there an easy way?

Link to comment

IF you are interested, you can find this mod. There is another way to custom transparency,

 

[CustomShaderTransparencyA]
ps = transparent.hlsl
blend[0] = ADD SRC_ALPHA INV_SRC_ALPHA
handling = skip
drawindexed = auto
;Draw = from_caller

 

and you can find  transparent.hlsl in the folder, but I don't know how to get this file.

Link to comment
13 hours ago, Tychedy said:

Yes, head, I want to replace a part, I put it on ELISE's head, other girls can't wear it.

QQ截图20220409094947.png

I don't want to mislead you, but I will try to answer.
As I started, I made the Lala Bikini mod plus an accessory for it. I used an ordinary N or R for this and tried them on Hitomi's head, but it turned out that on another character, or even when I changed Hitomi's hair, the accessory did not change its position, which led to the fact that one time it was in the head, another time it appeared "a meter" from it. But while creating Anime Cosplay, I tried again, this time I used a different accessory as a base, it fell on Cat Ears. It turned out that in this case what I created appeared quite well on every weird or hair type. Apparently with some accessories this can be achieved (usually SR) and others are not suitable for it (or I didn't know enough then and drew the wrong conclusions). Once I got to that, the rest was fairly simple. First, in Blender, I turned the head down so that the replaced accessory was like in the game, and then I adjusted my ornament to such a positioned head (including hair), the rest is minor adjustments to make it display the best in the game.

1.png.4e0eb473d1e0d2b293fc2f6386155718.png

As for the weights, there is only one group 0, all in red.

I hope that's what you meant.

Link to comment
剧透
10 小时前,Yorom 说:

我想要制作它们,但我会尝试回答。角色上,甚至当我改变了角色的头发时,配件并没有改变另一个的位置,这导致了另一个事实,它在距离它“一米处”的角色扮演角色。的时候,我又试了一次,这次我用了一次不同的不同配件,它用了一次不同的耳朵上的事实证明,在这种情况下,我创造的东西在每一种奇怪的或上样的东西上。都表达得清楚,使用某些零件实现(通常是 SR,而配件则不适合)(或者当时了解的)很好。得出的结论是,我可以得到其他的结果。的就很简单了。首先,在搅拌机中,

1.png.4e0eb473d1e0d2b293fc2f6386155718.png

重,只有一组0,都是权红色的。

我希望这就是你的英文。

 

OK, how did you determine the position of the headgear? My idea is: 1. Don't change the position of the headgear, move the head to the correct position of the headgear 2. Move the custom model to the correct head position.
There is a second question, how to make the lace of the hair band transparent?

Link to comment
4 hours ago, Tychedy said:
  Hide contents

 

OK, how did you determine the position of the headgear? My idea is: 1. Don't change the position of the headgear, move the head to the correct position of the headgear 2. Move the custom model to the correct head position.
There is a second question, how to make the lace of the hair band transparent?

I did this:

1.thumb.png.1e6be1902980e5bb69991333f5dc81c7.png

1. Load costume to blender

2. Delete all but head and gear

3. I don't know what it's called, you delete a pose or something and then the objects center on the center

 

4. Move the head down to gear

5. Set your accessory on your head

 

As for transparency, you have to use this:

 

[TextureOverride]
hash =
handling = skip
vb0 = ResourceVB
ib = ResourceIB
run = CustomShaderTransparency

 

[CustomShaderTransparency]
ps = Transparency.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
drawindexed=auto

 

Transparency.hlsl

 

It should work, although it doesn't always work well

 

Link to comment
Spoiler
On 4/10/2022 at 4:29 PM, Yorom said:

我这样做了:

1.thumb.png.1e6be1902980e5bb69991333f5dc81c7.png

1.将服装加载到搅拌机

2.删除除头部和装备外的所有内容

3.不知道叫什么,你删除一个pose什么的然后物体居中居中

 

4. 将头部向下移动到档位

5. 将您的配饰戴在头上

 

至于透明度,你必须使用这个:

 

[TextureOverride]
哈希 =
处理 = 跳过
vb0 = ResourceVB
ib = ResourceIB
运行 = CustomShaderTransparency

 

[CustomShaderTransparency]
ps = Transparency.hlsl
blend = ADD SRC_ALPHA INV_SRC_ALPHA
drawindexed=auto

 

透明度.hlsl 8.67 KB · 2 次下载

 

它应该可以工作,虽然它并不总是很好

 

 

Yes, I found that the headband is better made, it will have its own weight. Maybe a hat would have the same effect, Thank you ~But transparency I still don't know, how does this code place textures?

But there seems to be something black around?And my headband isn't black?Can you take a look for me?

QQ截图20220413221602.png

Maid band.zip

Edited by Tychedy
Link to comment
8 hours ago, Tychedy said:
  Reveal hidden contents

 

Yes, I found that the headband is better made, it will have its own weight. Maybe a hat would have the same effect, Thank you ~But transparency I still don't know, how does this code place textures?

But there seems to be something black around?And my headband isn't black?Can you take a look for me?

QQ截图20220413221602.png

Maid band.zip 23.56 MB · 3 downloads

The code looks ok. As for that something black around the headband, you mean something like here

2.jpg.7955fcf9c359977398d40cb19a45d03b.jpg

Because I don't know how to get rid of that either. When the texture has, let's say, such laces, then usually everything else in the alpha channel is black, i.e. nothing should be visible there (the mesh itself is not 1: 1 the same as a given lace) but for that you need a .hlsl file suitable for of the given element (I don't know how to create .hlsl files), otherwise the black something will be punctured. Therefore, for example, for the All-in-One mod, I used a ragdoll R that has transparent elements in the outfit and then it doesn't need a .hlsl file. I am not 100% sure, but I think that is how it works. Look at your texture:

1.png.d042b245d53eca4ceafd92f05b1cc5a1.png

This dotted square mark the mesh and as you can see the lace does not cover it all, there is a piece of black in there

Link to comment
Spoiler
5 hours ago, Yorom said:

The code looks ok. As for that something black around the headband, you mean something like here

2.jpg.7955fcf9c359977398d40cb19a45d03b.jpg

Because I don't know how to get rid of that either. When the texture has, let's say, such laces, then usually everything else in the alpha channel is black, i.e. nothing should be visible there (the mesh itself is not 1: 1 the same as a given lace) but for that you need a .hlsl file suitable for of the given element (I don't know how to create .hlsl files), otherwise the black something will be punctured. Therefore, for example, for the All-in-One mod, I used a ragdoll R that has transparent elements in the outfit and then it doesn't need a .hlsl file. I am not 100% sure, but I think that is how it works. Look at your texture:

1.png.d042b245d53eca4ceafd92f05b1cc5a1.png

This dotted square mark the mesh and as you can see the lace does not cover it all, there is a piece of black in there

 

Maybe you can use this code and resize the number to make it transparent.

[TextureOverrideTop]
hash = 42d49bad
match_first_index = 8052
vb0 = ResourcePinkTopVB
ib = ResourcePinkTopIB
handling = skip
drawindexed = auto
run = CustomShaderTransparency

[CustomShaderTransparency]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.1
blend_factor[1] = 0.1
blend_factor[2] = 0.1
blend_factor[3] = 1
drawindexed = auto
Link to comment
3 hours ago, Tychedy said:
  Reveal hidden contents

 

Maybe you can use this code and resize the number to make it transparent.

[TextureOverrideTop]
hash = 42d49bad
match_first_index = 8052
vb0 = ResourcePinkTopVB
ib = ResourcePinkTopIB
handling = skip
drawindexed = auto
run = CustomShaderTransparency

[CustomShaderTransparency]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.1
blend_factor[1] = 0.1
blend_factor[2] = 0.1
blend_factor[3] = 1
drawindexed = auto

you can use it, it will only make the whole element it was used on transparent, no matter how it is in the alpha channel

Link to comment
Spoiler
8 minutes ago, Yorom said:

你可以使用它,它只会使使用它的整个元素透明,无论它在 alpha 通道中如何

 

Yes, I found it, but he has no black edge. I think we can ask CC how the author removes the black edge.

Link to comment

There should be some kind of command syntax to make the shadow of the mesh disappear, and let the finished product only show the coloured parts of the texture.
I think the polygons are visible because they have shadows, perhaps.

I'm not familiar with these instructions so I can't fully refer to what I've said

Link to comment
Spoiler
On 2022/4/15 at AM4点02分, starash said:

应该有某种命令语法,让网格的阴影消失,让成品只显示纹理的彩色部分。
我认为多边形是可见的,因为它们可能有阴影。

我不熟悉这些说明,所以我不能完全参考我所说的

 

On 2022/4/14 at PM4点07分, Yorom said:

你可以使用它,它只会使使用它的整个元素透明,无论它在 alpha 通道中如何

 

You can read the CC author's reply. I don't know much about code.

Link to comment
6 hours ago, Tychedy said:

I have read it, honestly I have already tried it, with the advice from Massim, and either I did something wrong or it does not help.

shader_type made the whole element disappear and only a shadow remained, and ps-cb2 did nothing when finally I was able to load the .buf file, because at the beginning I had a loading error all the time

 

 

Link to comment
3 hours ago, Tychedy said:

I know this, but my English is not very good, so I didn't download many plug-ins, so could you please give me your reshade-Shaders folder?

QQ截图20220416212746.png

I did not download any plugins by hand, when installing Reshade there was an option to select a few, so I indicated that it should download everything ;)

 

Link to comment
11 hours ago, Yorom said:

我没有手动下载任何插件,安装Reshade时有一个选项可以选择几个,所以我表示它应该下载所有内容;)

 

Sorry, I'm just afraid I'm missing something and it doesn't feel as good as your picture. So can you give me the files in this folder?

Link to comment
On 2022/4/17 at AM12点38分, Yorom said:

我没有手动下载任何插件,安装Reshade时有一个选项可以选择几个,所以我表示它应该下载所有内容;)

 

If the same clothes are just different colors and they have the same HASH, how should they be prevented from being modded at the same time?I tried vB-hash ib-hash, but it didn't work.image.png.dcba532e005162380a714b5e70a46723.pngimage.png.8adcafd4c5a87cf46e2e3ca56857a94e.png

Link to comment
3 hours ago, Tychedy said:

If the same clothes are just different colors and they have the same HASH, how should they be prevented from being modded at the same time?I tried vB-hash ib-hash, but it didn't work.image.png.dcba532e005162380a714b5e70a46723.pngimage.png.8adcafd4c5a87cf46e2e3ca56857a94e.png

if the vB-hash and ib-hash on both is the same, I don't know if it can be done differently

Link to comment
  • 3 months later...
剧透
On 4/22/2022 at 1:36 AM, Yorom said:

如果上面的 vB-hash 和 ib-hash 一样,我不知道是否可以做不同的事情

 

Could you please tell me these codes are to remove shadows? I didn't find this HASH in fiona's [F8] TXT file;I want to remove shadows from hair when I use reshade

122892640_QQ20220804124728.png.d135320d8d95d3d5c9f7d661ed8739d9.png

[ShaderOverrideHairFiona]
hash = 2d6fa97beffe2f18 allow_duplicate_hash = overrule
if
$costume_mods
    checktextureoverride = ps-t0
    checktextureoverride = ps-t2
endif

 

[ShaderOverrideHairFiona]
hash = 2d6fa97beffe2f18 allow_duplicate_hash = overrule
if
$costume_mods
    ResourceBakVB = ref vb0
    ResourceBakIB = ref ib
    checktextureoverride = vb0
    checktextureoverride = ib
    vb0 = ref ResourceBakVB
    ib = ref ResourceBakIB
endif

This is the mod for hair, the code is from here

头发.Fiona.V2.4.zip

Edited by Tychedy
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use