Users browsing this thread: 1 Guest(s)
[RELEASE] GLideN64 Scene Ripper
#1
3D Modelling 
Howdy everyone!

I'm new here, although not really new to ripping/porting from games. One thing that I think has been missing from the available N64 ripping tools is accurate vertex coloring / lighting information.

There have been certain graphics plugins in the past (LemD3D8, LemD3D9, TR64) which have allowed to rip model geometry and textures from N64 games, but they either fell short on features or straight up just didn't work. Most modern GPU rippers like 3DRipperDX or NinjaRipper also do not support vertex lighting (atleast yet). I decided to change that and investigate any modern approaches.

I took the existing GLideN64 plugin which apparently supports all 400 N64 games and modified it to spit out a custom binary file containing triangle position, color values, associated textures, scene fog color information, etc... A Blender addon can then be used to import these scenes into an editable mesh. I also added an option to generate frame-by-frame scene rips, which can aid in ripping and creating N64 animations.

Here's a scene rip from The Legend of Zelda: Majora's Mask final boss room, a scene making extensive use of vertex colors.

[Image: majoras_mask.png]

Please Note: I have stopped developing this after a long hiatus and absence. In my absence, @scurest has taken over development in their own fork. I recommend you use their fork and have replaced my links with theirs below.

Scene Ripper: GLideN64 Scene Ripper
Blender Addon: Blender Import GLR
Tutorial: Tutorial

Hopefully this will be useful for someone out there... Try it out and let me know what you think Wink
Reply
#2
I was literally just thinking about doing this! Thank God I don't have to now lol Cute I'm going to try it out.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#3
Can you help let people know what specific emulator to use this on? I'd like to try this but don't know what to use
The entire Madagascar trilogy >>>>>>>>>>> Toy Story 4
Reply
Thanked by:
#4
Try RMG.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#5
I cant make this plugin work with mupen or Project64 3.0/2.3. Those options the 'How to' on github is mentioning will not show up, or i cant find them. I'm really frustrated.

(02-23-2023, 01:59 PM)scurest Wrote: Try RMG.

It worked, thanks!  Smile sadly, extreme-G will crash the emulator. I was hoping to rip the models without those bad UV texture problems.
Reply
Thanked by:
#6
Awesome, just what I was looking for, thanks a bunch... Just when I was diving into what made N64 games unique for my new Unity project.

Anyone here in the know of a decent sound plugin for RMG? I couldn't get any dll to work and the audio stutters and creaks a lot while the video is just fine. messing around with the settings didn't help so far.

edit: plugin and ripper seems to be working fine! Now what would be the most efficient way to rip the entire area?

For anyone concerned here are some comparisons I made: (top row in-game, bottom row Blender)

The only things that seem strange now are the way the trees are rendered, and the missing textures(?) of the gem-eyes and the low lighting of the 2D flower sprites in the area with the tree stumps.
[Image: Banjo-Kazooie.png]
Reply
Thanked by:
#7
(03-10-2023, 12:16 PM)Yavga Wrote: Awesome, just what I was looking for, thanks a bunch... Just when I was diving into what made N64 games unique for my new Unity project.

Anyone here in the know of a decent sound plugin for RMG? I couldn't get any dll to work and the audio stutters and creaks a lot while the video is just fine. messing around with the settings didn't help so far.

edit: plugin and ripper seems to be working fine! Now what would be the most efficient way to rip the entire area?

For anyone concerned here are some comparisons I made: (top row in-game, bottom row Blender)

The only things that seem strange now are the way the trees are rendered, and the missing textures(?) of the gem-eyes and the low lighting of the 2D flower sprites in the area with the tree stumps.

(image)
Very late, but the plugin seems to struggle with things like lighting objects and HUD placements.  (And various Paper Mario objects of all things.)  It's possible the swirls are there, but are placed wildly incorrectly.
Reply
Thanked by:
#8
(03-10-2023, 12:16 PM)Yavga Wrote: Awesome, just what I was looking for, thanks a bunch... Just when I was diving into what made N64 games unique for my new Unity project.

Anyone here in the know of a decent sound plugin for RMG? I couldn't get any dll to work and the audio stutters and creaks a lot while the video is just fine. messing around with the settings didn't help so far.

edit: plugin and ripper seems to be working fine! Now what would be the most efficient way to rip the entire area?

For anyone concerned here are some comparisons I made: (top row in-game, bottom row Blender)

The only things that seem strange now are the way the trees are rendered, and the missing textures(?) of the gem-eyes and the low lighting of the 2D flower sprites in the area with the tree stumps.
[Image: Banjo-Kazooie.png]

Apologies for the late response. The blender import plugin is still experimental and not perfect.

There are some games and scenes that will not be able to accurately re-create correct lighting / UV-scaling, but for the most part most games 'should' import correctly. I've had the most issues with games that utilize scaled multi-textures and vertex coloring (Zelda series, CBFD, etc...). Geometry for the most part should rip fine, but if you run into issues where models seem warped or squashed, try using a different rip mode in RMG. (By default, most games use rip mode 0).

Occasionally you will run into issues with UV data not being scaled correctly or not in the correct wrap mode (tree picture referenced above). You may be able to fix the wrapping issues by swapping out the node setups with another UV wrap mode (mirrored vs wrapped), but that would have to be done on a case-by-case basis.

The last time I was working on this, I was waiting for the Blender Foundation to actually fix a bug a contributor (scurest) found in Blender that would cause imported scenes to be fully black on certain games. I might return to work and fix up the plugin once it's resolved.
Reply
Thanked by:
#9
Quote: The last time I was working on this, I was waiting for the Blender Foundation to actually fix a bug a contributor (scurest) found in Blender that would cause imported scenes to be fully black on certain games. I might return to work and fix up the plugin once it's resolved.

It's fixed in Blender 3.5.
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by: Luctaris
#10
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.
Reply
Thanked by:
#11
(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.
Reply
Thanked by:
#12
(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!
Reply
Thanked by:
#13
When I imported Linda from Snowboard Kids 2, her hair texture didn't show up. Can someone help me?

https://i.imgur.com/iujT4UK.png
Reply
Thanked by:
#14
(01-27-2024, 10:44 AM)jenna1222 Wrote: When I imported Linda from Snowboard Kids 2, her hair texture didn't show up. Can someone help me?

Linda's hair doesn't use textures. The color comes from the Environment Color, which is imported as a Color Attribute.

[Image: soD7OCH.jpeg]
3D Screenshot Tools (NDS / N64 / PS1 / PS2)
Other Tools (apicula / Vagrant Story / Star Ocean Blue Sphere)
Reply
Thanked by:
#15
How do I turn on Material View?
Reply
Thanked by:


Forum Jump: