mirror of
https://github.com/festivities/Blender-miHoYo-Shaders.git
synced 2025-08-25 16:18:34 +00:00
feat: 3.0 update
This commit is contained in:
Binary file not shown.
BIN
HoYoverse - Genshin Impact - Goo Engine v3.blend
Normal file
BIN
HoYoverse - Genshin Impact - Goo Engine v3.blend
Normal file
Binary file not shown.
BIN
HoYoverse - Genshin Impact Outlines v3.blend
Normal file
BIN
HoYoverse - Genshin Impact Outlines v3.blend
Normal file
Binary file not shown.
BIN
HoYoverse - Genshin Impact v3.blend
Normal file
BIN
HoYoverse - Genshin Impact v3.blend
Normal file
Binary file not shown.
20
README.md
20
README.md
@@ -1,4 +1,4 @@
|
||||
# miHoYo Shaders for Blender/Goo Engine 3.3 and above
|
||||
# HoYoverse Shaders for Blender/Goo Engine 3.3 and above
|
||||
|
||||
## Trailer
|
||||
|
||||
@@ -9,18 +9,19 @@
|
||||
|
||||

|
||||
|
||||
## ~~Tutorial~~/Overview made by No_Tables *(thank you!)*
|
||||
## Overview made by No_Tables *(thank you!)*
|
||||
|
||||
[](https://youtu.be/97G7LqFoTdY)
|
||||
](https://youtu.be/97G7LqFoTdY)
|
||||
|
||||
## Usage
|
||||
1. Either download a release [here](https://github.com/festivize/Blender-miHoYo-Shaders/releases), or download from the [source](https://github.com/festivize/Blender-miHoYo-Shaders/archive/refs/heads/main.zip) for the latest commit.
|
||||
2. In a new project with your desired character mesh, append whatever materials the .blend file you downloaded will contain.
|
||||
3. Replace the original materials of the mesh with the materials from the .blend file you just appended.
|
||||
4. Import the textures into their corresponding image nodes/texture slots.
|
||||
5. Constrain the empty object named *Head Driver* to the head bone of your character with a **Child Of** constraint.
|
||||
7. A [video](https://youtu.be/97G7LqFoTdY) made by [No_Tables](https://twitter.com/No_Tables) showcases the actual shader without any post-processing, and provides an overview as well.
|
||||
8. Check out this [Blender add-on](https://github.com/michael-gh1/Addons-And-Tools-For-Blender-miHoYo-Shaders) for automating the set-up of the character shading.
|
||||
5. Constrain the empty object named *Head Origin* to the head bone of your character with a **Child Of** constraint.
|
||||
7. This [video](https://youtu.be/97G7LqFoTdY) made by [No_Tables](https://twitter.com/No_Tables) showcases the actual shader without any post-processing, and provides an overview as well.
|
||||
8. This [video](https://youtu.be/vWfd3NIezpQ) made by [Bonny](https://twitter.com/BonnyTweetsOFF) is a (slightly outdated) tutorial on how to setup the shader
|
||||
9. Check out this [Blender add-on](https://github.com/michael-gh1/Addons-And-Tools-For-Blender-miHoYo-Shaders) by Mken for automating the set-up for the shader.
|
||||
|
||||
## Contact
|
||||
- [Discord server](https://discord.gg/85rP9SpAkF)
|
||||
@@ -35,12 +36,15 @@
|
||||
## Special thanks
|
||||
All of this wouldn't be possible if it weren't for:
|
||||
- Arc System Works
|
||||
- miHoYo
|
||||
- HoYoverse
|
||||
- [Aerthas Veras](https://github.com/Aerthas/)
|
||||
- [Manashiku](https://github.com/Manashiku/)
|
||||
- The folks over at [知乎专栏](https://zhuanlan.zhihu.com/)
|
||||
- JTAOO
|
||||
- Zekium and RumblingRose for the scripts
|
||||
- [BonnyAnimations](https://twitter.com/BonnyTweetsOFF)
|
||||
- [Mken](https://twitter.com/Mken_TechArt)
|
||||
- [Enthralpy](https://www.youtube.com/@Enthralpy)
|
||||
- [Llama](ttps://twitter.com/Llama3D)
|
||||
- [No_Tables](https://twitter.com/No_Tables)
|
||||
|
||||
For that, I'd like to give back to the community with what I've learned. With that said, I hope you learn a thing or two. Enjoy!
|
||||
|
Binary file not shown.
@@ -1,112 +0,0 @@
|
||||
# Contributed by Zekium and Modder4869 from Discord - huge thanks to him!
|
||||
|
||||
import bpy
|
||||
|
||||
# ImportHelper is a helper class, defines filename and
|
||||
# invoke() function which calls the file selector.
|
||||
from bpy_extras.io_utils import ImportHelper
|
||||
from bpy.props import StringProperty, BoolProperty, EnumProperty
|
||||
from bpy.types import Operator
|
||||
import os
|
||||
|
||||
|
||||
class GI_OT_GenshinImportTextures(Operator, ImportHelper):
|
||||
"""This appears in the tooltip of the operator and in the generated docs"""
|
||||
bl_idname = "file.genshin_import" # important since its how bpy.ops.import_test.some_data is constructed
|
||||
bl_label = "Genshin: Import Textures"
|
||||
|
||||
# ImportHelper mixin class uses this
|
||||
filename_ext = "*.*"
|
||||
|
||||
import_path: StringProperty(
|
||||
name = "Path",
|
||||
description = "Path to the folder containing the files to import",
|
||||
default = "",
|
||||
subtype = 'DIR_PATH'
|
||||
)
|
||||
|
||||
filter_glob: StringProperty(
|
||||
default="*.*",
|
||||
options={'HIDDEN'},
|
||||
maxlen=255, # Max internal buffer length, longer would be clamped.
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
directory = os.path.dirname(self.filepath)
|
||||
|
||||
for name, folder, files in os.walk(directory):
|
||||
for file in files :
|
||||
# load the file with the correct alpha mode
|
||||
img_path = directory + "/" + file
|
||||
img = bpy.data.images.load(filepath = img_path, check_existing=True)
|
||||
img.alpha_mode = 'CHANNEL_PACKED'
|
||||
|
||||
# declare body and face mesh variables
|
||||
body_var = bpy.context.scene.objects["Body"]
|
||||
# face_var = bpy.context.scene.objects["Face"]
|
||||
|
||||
# Implement the texture in the correct node
|
||||
if "Hair_Diffuse" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Hair').material.node_tree.nodes['Hair_Diffuse_UV0'].image = img
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Hair').material.node_tree.nodes['Hair_Diffuse_UV1'].image = img
|
||||
elif "Hair_Lightmap" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Hair').material.node_tree.nodes['Hair_Lightmap_UV0'].image = img
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Hair').material.node_tree.nodes['Hair_Lightmap_UV1'].image = img
|
||||
elif "Hair_Normalmap" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Hair').material.node_tree.nodes['Hair_Normalmap_UV0'].image = img
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Hair').material.node_tree.nodes['Hair_Normalmap_UV1'].image = img
|
||||
elif "Hair_Shadow_Ramp" in file :
|
||||
bpy.data.node_groups['Hair Shadow Ramp'].nodes['Hair_Shadow_Ramp'].image = img
|
||||
elif "Body_Diffuse" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Body').material.node_tree.nodes['Body_Diffuse_UV0'].image = img
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Body').material.node_tree.nodes['Body_Diffuse_UV1'].image = img
|
||||
elif "Body_Lightmap" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Body').material.node_tree.nodes['Body_Lightmap_UV0'].image = img
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Body').material.node_tree.nodes['Body_Lightmap_UV1'].image = img
|
||||
elif "Body_Normalmap" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Body').material.node_tree.nodes['Body_Normalmap_UV0'].image = img
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Body').material.node_tree.nodes['Body_Normalmap_UV1'].image = img
|
||||
elif "Body_Shadow_Ramp" in file :
|
||||
bpy.data.node_groups['Body Shadow Ramp'].nodes['Body_Shadow_Ramp'].image = img
|
||||
elif "Body_Specular_Ramp" in file or "Tex_Specular_Ramp" in file :
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.data.node_groups['Body Specular Ramp'].nodes['Body_Specular_Ramp'].image = img
|
||||
elif "Face_Diffuse" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Face').material.node_tree.nodes['Face_Diffuse'].image = img
|
||||
elif "Face_Shadow" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.context.object.material_slots.get('miHoYo - Genshin Face').material.node_tree.nodes['Face_Shadow'].image = img
|
||||
elif "FaceLightmap" in file :
|
||||
bpy.context.view_layer.objects.active = body_var
|
||||
img.colorspace_settings.name='Non-Color'
|
||||
bpy.data.node_groups['Face Lightmap'].nodes['Face_Lightmap'].image = img
|
||||
elif "MetalMap" in file :
|
||||
bpy.data.node_groups['Metallic Matcap'].nodes['MetalMap'].image = img
|
||||
else :
|
||||
pass
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(GI_OT_GenshinImportTextures)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(GI_OT_GenshinImportTextures)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user