Tool Unity [BepInEx][plugin] Texture Replacer v1.0.6.7

bat0x0

New Member
Feb 23, 2019
4
2
Your sequence is right. And there are somethings to check.
  • Dump function is not stable. Use it just check the filename and MD5. dump original images with another tools(ex. AssetStudio or AssetRipper). if filename is unique, no needed use MD5. in this case, filename is "texture_00". It's duplicated name. You must use MD5.
  • You must(?) edit the texture_00_c2685de5059f21c81cc667d7a5ec02ed.png file too. your position of first edit zone is wrong. edit another zone. may be right-beside object?
  • MD5's value is can be different with another system(belong to GPU). If you want share to another people, check the MD5 values on another system.
  • You may be know about that UniversalUnityDemosaics plugin. This game has the mosaic filter. use that plugin too.
Thanks for use this.

I try plug on game and observe some mosaics on of sharedassets0.assets ,
Is there any good way to solve leftover mosaics?

thank you
 

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
I try plug on game and observe some mosaics on of sharedassets0.assets ,
Is there any good way to solve leftover mosaics?

thank you
ignore warnings of log.
edit texture_00_0e3f38c9b5f1eeae54a367aa27997b0e.png file.
1680796944929.png
 

ErgoVis

Member
Jul 1, 2017
216
287
Hello kumarin , I've been trying to use your TextureReplacer on WaifuHub season 6 & 7 with some success. The texture does get replaced but as soon as the game starts using any transitions it goes back to the original images.

Based on a screenshot from AssestStudio I'm posting below, I'm guessing the reason is the fact that every Texture is stored two times with different PathIDs or possibly Sprites reset the image back to default? Only one image came out when I used image dump feature.

Is there anyway to make TextureReplacer work in this case?

You don't have permission to view the spoiler content. Log in or register now.
 

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
Hello kumarin , I've been trying to use your TextureReplacer on WaifuHub season 6 & 7 with some success. The texture does get replaced but as soon as the game starts using any transitions it goes back to the original images.

Based on a screenshot from AssestStudio I'm posting below, I'm guessing the reason is the fact that every Texture is stored two times with different PathIDs or possibly Sprites reset the image back to default? Only one image came out when I used image dump feature.

Is there anyway to make TextureReplacer work in this case?

You don't have permission to view the spoiler content. Log in or register now.
I download the 'Waifu_hub_S6_-_Windows_Version' and test simply. It's works.
Replacing images is once worked, but not works on the second or after appearances on some games.
Basically scene is changed, images are reset(loads from original). Texture_replacer is checking if scene is changed. but some games are works on not change the scene.

Can I get some sample for test ? I'm just simply edit the stand image and test. It's work on MTL plugin.
This game is uncensored. May be you want to translate the image texts.
 

ErgoVis

Member
Jul 1, 2017
216
287
I download the 'Waifu_hub_S6_-_Windows_Version' and test simply. It's works.
Replacing images is once worked, but not works on the second or after appearances on some games.
Basically scene is changed, images are reset(loads from original). Texture_replacer is checking if scene is changed. but some games are works on not change the scene.

Can I get some sample for test ? I'm just simply edit the stand image and test. It's work on MTL plugin.
This game is uncensored. May be you want to translate the image texts.
Actually this isn't about uncensoring. There are errors in the original game where in the images characters don't do the things they say they do.

So my goal is to replace the original Texture with a new one that fits the text. I'll draw the new images myself.

For that I need to figure out how to make sure that replaced Textures show at all times.

I have no clue if that's possible using TextureReplacer, I have no idea how Unity works.
 

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
Actually this isn't about uncensoring. There are errors in the original game where in the images characters don't do the things they say they do.

So my goal is to replace the original Texture with a new one that fits the text. I'll draw the new images myself.

For that I need to figure out how to make sure that replaced Textures show at all times.

I have no clue if that's possible using TextureReplacer, I have no idea how Unity works.
Tell me the image name(what to replace) and save file for test.
 

ErgoVis

Member
Jul 1, 2017
216
287
Tell me the image name(what to replace) and save file for test.
I don't have the new images complete at the moment because I can't be sure if I can figure out how to put them inside the game so I didn't want this to end up a waste of time (it can take a couple hours for each pose).

For now I'm using all my time drawing images for earlier versions of the game which run in Ren'py Engine and so can be modded easily.

In season 7 (season7 only has one character for now which makes it much easier to dig in the assets) I have a total of 12 Textures to replace (3 base with 4 variants each).

One example would be the pose_008 type files which the image dump function gave the names:

  • cgi_yunyun_pose_008_a_71e3f0604eb58fdf53917f431f54005f.png
  • cgi_yunyun_pose_008_b_553b9e77717f15c53f23a0efb9a6e8e5.png
  • cgi_yunyun_pose_008_c_65ae64b95dbee4b4b84bc07c0db3042b.png
  • cgi_yunyun_pose_008_d2d19a0e71448980a8a5a9c4015ee008.png
 

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
I don't have the new images complete at the moment because I can't be sure if I can figure out how to put them inside the game so I didn't want this to end up a waste of time (it can take a couple hours for each pose).

For now I'm using all my time drawing images for earlier versions of the game which run in Ren'py Engine and so can be modded easily.

In season 7 (season7 only has one character for now which makes it much easier to dig in the assets) I have a total of 12 Textures to replace (3 base with 4 variants each).

One example would be the pose_008 type files which the image dump function gave the names:

  • cgi_yunyun_pose_008_a_71e3f0604eb58fdf53917f431f54005f.png
  • cgi_yunyun_pose_008_b_553b9e77717f15c53f23a0efb9a6e8e5.png
  • cgi_yunyun_pose_008_c_65ae64b95dbee4b4b84bc07c0db3042b.png
  • cgi_yunyun_pose_008_d2d19a0e71448980a8a5a9c4015ee008.png
I can't find the WaifuHub Season 7 (PC ver).
BTW, do you use the MTL plugin( ) ? AutoTranslator plugin has the function of .
 

ErgoVis

Member
Jul 1, 2017
216
287
I can't find the WaifuHub Season 7 (PC ver).
BTW, do you use the MTL plugin( ) ? AutoTranslator plugin has the function of .
Forgot s7 isn't on the main page. One kind soul posted links to for it later in the thread here.

I had no clue about the existence of I'll look into it.
 

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
Forgot s7 isn't on the main page. One kind soul posted links to for it later in the thread here.

I had no clue about the existence of I'll look into it.
It may be load the image from original rapidly. I check the source of game simply. Game prepare the 2 images for animated(?). org1, org2. and 2 image for use. variable name is image1, image2.
texture_replace is replacing image at once. (when scene is changed, flag reset for replace again) but this game is not use scene-change way. reload image from org1, org2.(may be)
So I changed the source(texture_replace) simply 1 line for FORCE-replace again.
delete the Texture_Replacer.dll and use this. It will be works.

About file names.
You will edit the files likes "cgi_yunyun_pose_008_a_71e3f0604eb58fdf53917f431f54005f.png".
Those files are may be have a unique name. So I recommend that use file name as "cgi_yunyun_pose_008_a_.png".
It's not using MD5. You can use file comments on MD5 area. count of characters after last "_" is not 32, It's ignored. looks like this. "cgi_yunyun_pose_008_a_Ride position 1.png".
count of "a_Ride position 1"'s characters is not 32. so It's ignored and not use the MD5 check.
It's ok to use like just "cgi_yunyun_pose_008_a_.png".
 
  • Like
Reactions: Zippix and ErgoVis

ErgoVis

Member
Jul 1, 2017
216
287
It may be load the image from original rapidly. I check the source of game simply. Game prepare the 2 images for animated(?). org1, org2. and 2 image for use. variable name is image1, image2.
texture_replace is replacing image at once. (when scene is changed, flag reset for replace again) but this game is not use scene-change way. reload image from org1, org2.(may be)
So I changed the source(texture_replace) simply 1 line for FORCE-replace again.
delete the Texture_Replacer.dll and use this. It will be works.
Okay, thanks a ton for really coming through and even modifying the plugin for me.

I've tested it just now and it works. It looks like the original image still shows up for a tiny bit as the animation is triggered, but this is easily good enough for my purposes.

So once again, mad props and many thanks. I'll give you one more shutout once my modded version comes out, I'm estimating in about ~two weeks.
 
  • Like
Reactions: kumarin

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
Okay, thanks a ton for really coming through and even modifying the plugin for me.

I've tested it just now and it works. It looks like the original image still shows up for a tiny bit as the animation is triggered, but this is easily good enough for my purposes.

So once again, mad props and many thanks. I'll give you one more shutout once my modded version comes out, I'm estimating in about ~two weeks.
I will try that replace image on source level. If I success, more smooth on replace and fast. But don't expect too much.
 
  • Like
Reactions: ErgoVis

ErgoVis

Member
Jul 1, 2017
216
287
I will try that replace image on source level. If I success, more smooth on replace and fast. But don't expect too much.
If you manage to make it work that'd be awesome, but as I said the current version is fine, so don't stress over it too much.

I'm not much of a coder but I know enough to have an idea about what the issue is, and why it's difficult to make the texture swap seamless.
 
  • Like
Reactions: kumarin

kumarin

Well-Known Member
Feb 19, 2022
1,534
2,087
If you manage to make it work that'd be awesome, but as I said the current version is fine, so don't stress over it too much.

I'm not much of a coder but I know enough to have an idea about what the issue is, and why it's difficult to make the texture swap seamless.
Strange... I tried that using harmony and added post process to texture replace. like a function named as "set_MainTexture" in "TransitionalRenderer" class. It's working on 2 images flip(?) animated scene.
It's working.. but textures are reset on next click wait. (It's same as original texture_replacer plugin)
So I woking as replace it again. but it's slow... 'cause do load texture from png file every time.
I compare with forced-texture_replacer. result is forced-texture_replacer is more smooth and fast..
I will try again someday(?). But as you said that it's not bad to using forced version.
 
  • Like
Reactions: ErgoVis