02-01-2024, 02:20 AM
(01-30-2024, 04:43 PM)jenna1222 Wrote: [ -> ]How do I turn on Material View?
The icon to the right of the solid sphere in the little bar towards the right hand corner. It's highlighted in the following image.
(01-30-2024, 04:43 PM)jenna1222 Wrote: [ -> ]How do I turn on Material View?
(11-04-2023, 10:47 PM)nailuj843 Wrote: [ -> ](06-23-2023, 07:08 PM)Luctaris Wrote: [ -> ](06-23-2023, 01:26 AM)vod1003 Wrote: [ -> ]Thank you for this amazing tool. Any tips for exporting from Blender to programs like Unity or Maya? The textures don't seem to embed when exported as fbx.
I saw that you opened up an issue on the github regarding this too. I'll post my answer here for anyone wondering in the future.
Quote:Support for external exporters and file formats is somewhat out of the scope of this project. I can't control how scenes using my tool are imported and interpreted by other software.
This project sets up a custom shader node layout for each material used in the scene.
I couldn't find a suitable file format that can support texture blending, vertex color information, texture mirroring, fog information, etc... which is why I opted to create my own custom .glr file format and associated importer for Blender.
If you want an importer for Maya, 3ds Max, 4D cinema, etc... a custom importer addon/plugin/script will need to be made to interpret the .glr file format for that tool.
If there is enough interest, I might look into creating an addon for Unity/Maya to handle my file format, but I primarily chose to use Blender because it's 100% free and easily accessible.
TL;DR: Sorry... I won't go out of my way to purchase $1000+ software like Maya just so a few people can use my addon.
A fix for the FBX export not linking to the textures is to use this script, which will associate the textures to the materials
Code:# Get access to Blender Python API
import bpy
#Loop over all materials
for mat in bpy.data.materials:
# Get the name of each material (this name is what will be used to find the .png texture file)
matName = mat.name
# Cut off the last 4 characters of the material name '(XX)'
matSubName = matName[:-4]
# Create a new_texture to be assigned to the material
tex = bpy.data.textures.new(matSubName, 'IMAGE')
# Add a reference to a newly created texture_slot on the material
slot = mat.texture_slots.add()
# Assign the new_texture to the new_texture_slot on the material
slot.texture = tex
# Make the file path to the Scene Rip output folder to find the image to assign to the texture
filePath = "PATH TO TEXTURE DUMP OUTPUT FOLDER/GLideNHQ/scene_rips/"
# Create the file name based on the material name
fileName = filePath + matSubName + ".png"
# load in the file from the scene_rips folder
image = bpy.data.images.load(fileName, check_existing=False)
# Assign the image to the Texture
tex.image = image
Then export the FBX making sure to use
Path Mode : Copy
You may have to manually correct the Transparency when importing the FBX to other applications such as Unity
Cheers!
(09-22-2024, 01:37 PM)MrElephant Wrote: [ -> ]Can you confirm where we are supposed to add in this piece of code? Without it, textures are not applied when exported.
(09-22-2024, 03:13 PM)scurest Wrote: [ -> ]Hello Scurest,(09-22-2024, 01:37 PM)MrElephant Wrote: [ -> ]Can you confirm where we are supposed to add in this piece of code? Without it, textures are not applied when exported.
I think that code is for Blender 2.79. Instead, you can use this script to modify the shaders for export (tested in Blender 3.6). Put that script in the Text editor, select the objects you want to change, then hit the Run script button.
Note that it only preserves a single texture as the diffuse texture, which is highly lossy. How much it damages the appearance will depend on the game.
Also note that the script should work for practically any material, not just ones from GLideN64 Scene Ripper, but if there are multiple textures it might not pick the best one as the "diffuse" texture.