Grim Fandango Deluxe - Original Thread [Locked]

Discussions regarding the development of the mod "Grim Fandango Deluxe"

Moderator: ScummVM Team

Locked
cplhenshaw
Posts: 54
Joined: Wed Aug 10, 2011 9:17 pm

Post by cplhenshaw »

I've updated my programs to handle textures now.
http://www.mediafire.com/download.php?lo1cpzlzrn17tw4

I don't know what modelling programs people will want to use but I've been using Blender 3d for trying this out (I don't have anything else) and so there may be a different set of quirks and whatnot for getting it working in other programs.

Basic usage:

'3doobj mannysuit.3do manny.obj .png' will output the file manny.obj and manny.mtl. manny.mtl will have simple materials which will specify the textures to use, so bone.mat becomes bone.png or whatever image format you specify on the command line. (if you don't specify one it will just use .png)

Place these two in a folder along with all the textures you want the modelling program to use.

Then (for Blender) when you import the .obj it will search the folder for the textures specified in the .mtl and apply them to the model appropriately. You can then change the model and adjust the texture mapping etc, and export again as a .obj

'obj3do mannysuit.3do mannyNEW.obj m.3do'
This will go through the .obj file and update the appropriate parts of the original .3do file and write out the result as m.3do or whatever the third argument to the program is. This can then be placed in the .lab file and used in ResidualVM.


Notes: When you export out of your modelling program the resulting .mtl is not needed for the reverse trip. The program assumes that the material names used in the .obj file will have (for example) m_bone.mat somewhere in it.

These programs do not seem to handle the normals correctly or maybe some of the face options are being set incorrectly. Even converting to .obj then straight back, the result in game is strange lighting on the model so I will need to have a play around to see what is wrong there and fix it.

Also these programs still do not do any of the rotations that are present in later model files.

So try it out and let me know how it works. Hopefully it does :wink:
cplhenshaw
Posts: 54
Joined: Wed Aug 10, 2011 9:17 pm

Post by cplhenshaw »

Very cool seeing what Grim Fandango would look like in widescreen, well done ultraneonoirantihero.

As to the suggestion of modelling the locations, the z-buffer is not just a few layers of masking but is literally the distance from the camera of each pixel in the background image. So every background image in the game essentially gives you a cloud of 300 000 points in the scene, which would give you a good idea of the shape of some things, and let you position them in the scene close to perfectly, rather than just doing it by eye. Further the set files give you the orientation and positions and whatnot of the cameras which would theoretically allow you to join all these point clouds into one large one. i.e 4 views of manny's office ~ 1.2 million 3d points.

All that said I don't think it would be particularly useful to the project, but if anyone ever wants to do a Grim 3d :o it could be quite useful to know.
User avatar
ultraneonoirantihero
Posts: 106
Joined: Mon Sep 05, 2011 5:13 pm

Post by ultraneonoirantihero »

Thanks for the compliments, I'm glad you liked the video :) And kudos on your 3d decompiler/recompiler. How do you do it, how did you crack Lucasarts' internal 3d fileformat and made a converter to Blender!?!
cplhenshaw wrote:The z-buffer is not just a few layers of masking but is literally the distance from the camera of each pixel in the background image. Further the set files give you the orientation and positions and whatnot of the cameras which would theoretically allow you to join all these point clouds into one large one. i.e 4 views of manny's office ~ 1.2 million 3d points.
Something like ray-casting? But that data (if I understood correctly) only gives you distance to points of visible surfaces? So you could make a 3d model of already visible room objects, but to make additional elements you'd need an alternative view angle of the room for full 3d picture?

And I guess there is no application that can reverse engineer all that "distance-data" to an actual 3d model using that 3d-cross-reference-point technique?

So if a location has multiple angels the z-buffer data can be used to reconstruct the room in full 3d, but if a location has only one viewing angle then it can do something like this:
http://www.youtube.com/watch?v=PPaH8oIJd7g

P.S. I always thought they made invisible 3D objects in an also invisible 3D room, so that Many can actually walk in a 3D space and bump into real things... not z-buffer image where every point represents the distance to the camera?!? So that is how Many can go in front and behind some objects that are actually just one 2D background - based on the "depth" information? Or did I understood something wrong...
cplhenshaw
Posts: 54
Joined: Wed Aug 10, 2011 9:17 pm

Post by cplhenshaw »

The idea would be that a room with one view of a room would give you the information about what is off the edge of another view.

And no, there would be no automatic way to turn them into the original scene models, but they could be used fairly effectively as a "blueprint" which you could build a model underneath.

You're right, the z-buffer does not control where a character can walk or not. I would assume while the game is running that if the distance to a pixel of Manny is less than the distance to the background it draws it, and if the background is closer than Manny then it draws the background. If you play the game with the debug options you can turn off all the bounding boxes and walk "into" objects and they will display correctly as though the object were really there, and not just a background image.


All that aside it is often simpler for someone skilled in the appropriate area to redo it by eye, as you did with the widescreen and that other guy when he remade Manny's office.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Great job on that tool, cpl. I can't wait to try it out!
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Wow, it's been a really busy week. Hopefully I can dedicate some time to this next week.
Jon N/A
Posts: 15
Joined: Tue Aug 23, 2011 9:05 pm

Post by Jon N/A »

I think we should work on a Syberia-esque Point and Click interface for it as well. I say Syberia-esque since it was a 2.5D adventure as well and it worked really well. The WASD controlls are still annoying...
User avatar
ultraneonoirantihero
Posts: 106
Joined: Mon Sep 05, 2011 5:13 pm

Post by ultraneonoirantihero »

Jon N/A wrote:I think we should work on a Syberia-esque Point and Click interface for it as well. The WASD controlls are still annoying...
I don't mind the WASD controlls, I find them kinda unique, without them Manny wouldn't "use his head" :)

But if we're gonna "add & enhance" the features of GF, then I suggest good old Lucasarts verb coin:

Image

This is a quick mockup in Mayan style.

But these things were talking about here: 32-bit textures, P&C interface, widescreen, higher resolution... all these things need to be supported by the engine. Is anyone working on ResidualVM to make this things happen? Or are we just daydreaming here?
User avatar
giucam
Posts: 139
Joined: Mon Mar 21, 2011 9:20 am

Post by giucam »

Well, some things like 32 bit textures may be introduced relatively soon since EMI needs them. But, as a general rule of thumb, we're working on stabilyzing and finishing the base engine before introducing new things.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Yes, great as these ideas are, the GF Deluxe project is specifically about addressing short-comings in the game's presentation.

1. Texture resolution
2. Polygon count
3. Game resolution

We've pretty much got the first one licked (although there's still some question about adding 32-bit colours).

We're getting there with the other two, as well, which is great.

I'm open to new suggestions, but I think there's more than enough to be getting on with. I'm going to publish a guide to increasing the texture resolution for those with skills who want to help out (UltraNeo? :)).
mogul
Posts: 19
Joined: Mon Jul 25, 2011 6:21 pm

Post by mogul »

P.S. I always thought they made invisible 3D objects in an also invisible 3D room, so that Many can actually walk in a 3D space and bump into real things... not z-buffer image where every point represents the distance to the camera?!? So that is how Many can go in front and behind some objects that are actually just one 2D background - based on the "depth" information? Or did I understood something wrong...
No, you've got it exactly right. The per-pixel z-buffer was conveniently available as a byproduct of rendering the scenes in Softimate/Mental Ray. I did very little with them other than quantize down to 16-bit. Per previous posts, it was future iterations of the engine (EFMI) before someone got smart and compressed all that rich information down to just what was needed, and used masks rather than z-buffer info to handle occluding characters as they walk behind things.
gsm
Posts: 9
Joined: Tue Jan 31, 2012 6:29 am

Post by gsm »

All this talk about remastering got me thinking... How difficult would it be to create a stereoscopic 3D mode for residual? Creating left/right image pairs for the character models would be easy (render the models twice per frame, shifting the camera for left and right eyes) but the backgrounds would still be flat... unless you used the per-pixel depth map to deform the background image using a technique like this one. It would take some tweaking to get it to work, even though it would never look perfect. But how cool would it be to see the overly-detailed depth map get put to good use!

Oh, and when a video has to play over some element, just flatten it back to 2D. :P

edit:
Any dev folk have a few extracted grayscale depth maps and matching color backgrounds laying about? I'd kind of like to have a go at making some stereo pairs using a modified version of that processing script...
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Post by JohnnyWalker2001 »

Ha. It's amazing the amount of ways that people are thinking of expanding Grim Fandango. I hope to get back into this project soon. I've started a new job and also been a bit ill, but everything seems to be settling down now, so I'll be more active again soon.

I wonder if the mods of this forum would object to me starting a separate thread for each of the three "upgrades"? It's hard to keep track of the progress of each of them in one thread... If not, I can try harder.
User avatar
ultraneonoirantihero
Posts: 106
Joined: Mon Sep 05, 2011 5:13 pm

Post by ultraneonoirantihero »

Sorry for the late response, I'm in a middle of my exams, and I see Johnny is bussy too.

I would be glad to help out with the texture improvement, what about that guide Johnny? I have some Scumm Revisited and BGbennyboy's tools, but those are old as hell and don't work very well with GF. So maybe you can e-mail me the required textures, since I don't know how to properly re-pack the LAB files.

Is there a way to distribute those new textures as a "patch", with some custom installer, which would replace textures in the source files? Or: make ResidualVM detect additional packages (like Quake3 engine with *.pak files, SW:JK2 fan here) and load the updated textures from there?

Anyone working on re-modelling those 3D characters and objects?

Also, is someone with enough programming skills going to try and make ResidualVM work in hi-res with widescreen, or should I stop making those widescreen backgrounds?

Cheers
User avatar
bgbennyboy
Posts: 24
Joined: Wed Nov 30, 2005 1:35 pm
Contact:

Post by bgbennyboy »

Old as hell? How dare you sir! (Yes they are a bit)
They should still work fine though.
Locked