zbm2obj

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

Moderator: ScummVM Team

Cervian
Posts: 17
Joined: Fri Feb 06, 2015 12:01 am

Re: zbm2obj

Post by Cervian »

After a bunch of research about Z-buffer and our disposable output (I refer to scummrev3 and GrimEdi solutions), I decided to take a very long launch using GLIntercept and OGLE in order to extract something useful from the game from Grim Remastered.

SURPRISE!
Besides having access to all new local textures (remember the new MATERIALS.LAB?), I just found this:
Image
Nothing more than a Z-buffer in 24 bits with only Red channel!!
As in GF:R, developers said that original zb was 16 bits.
I extracted a .zbm and after some hexadecimal magic, I can proudly present to you:

GrimEdi now supporting z-buffer.
ZBM2OBJ with some fixes about RGB weights.

Here some comparisons between scummrev3, previous GrimEdi, new GrimEdi and GF:R:
Image

And here the result:
Image

PERFETTO!
kavehth
Posts: 36
Joined: Sat Jan 24, 2015 7:36 pm

Re: zbm2obj

Post by kavehth »

thank you so much, it looks perfect now. i tried to combine a couple of angles of a room and now they fit perfectly with a little scaling.

i updated the first post with your links.
Cervian wrote:After a bunch of research about Z-buffer and our disposable output (I refer to scummrev3 and GrimEdi solutions), I decided to take a very long launch using GLIntercept and OGLE in order to extract something useful from the game from Grim Remastered.
actually using GLIntercept was the first thing i did but i was not able to get any results from it.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: zbm2obj

Post by JohnnyWalker2001 »

This is great stuff. What do you think we might be able to do with this new information?
Cervian
Posts: 17
Joined: Fri Feb 06, 2015 12:01 am

Re: zbm2obj

Post by Cervian »

I think we have the opportunity to recreate better quality backgrounds. They can be used for example as a perspective and enviroment-coherent guideline for photoshop pipeline. Than there is a remote possibility to make a full 3d GF, but this is another problem.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: zbm2obj

Post by JohnnyWalker2001 »

This is really quite special! How long does it take to create one background, though?
Cervian
Posts: 17
Joined: Fri Feb 06, 2015 12:01 am

Re: zbm2obj

Post by Cervian »

You mean by software or redesignig?
In any case, drawing a full room (right now I only did untextured Manny's Office) should take no more than a day. If it is only required to design guide volumes for photoshop, I think that 2-3 hours are enough.
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: zbm2obj

Post by JohnnyWalker2001 »

Cool. I'm just wondering how realistic is might be to re-render each of the 150+ rooms. Definitely a very cool thing that's been uncovered!
Cervian
Posts: 17
Joined: Fri Feb 06, 2015 12:01 am

Re: zbm2obj

Post by Cervian »

Yes! Truly awesome stuff! And the best has to come!
User avatar
sallim
Posts: 7
Joined: Wed Jul 15, 2015 8:04 pm

Re: zbm2obj

Post by sallim »

Really love this, it really seems to be a great starting point if you want to recreate the backgrounds.
Will try it out and post it.

Thanks
User avatar
JohnnyWalker2001
Posts: 405
Joined: Mon Oct 16, 2006 1:27 pm
Location: London, UK

Re: zbm2obj

Post by JohnnyWalker2001 »

You know what would be amazing would be have an alpha channel so that the foreground objects don't have harsh lines visible when Manny stands behind them :-/
ohsirrah
Posts: 2
Joined: Thu Apr 28, 2022 2:09 am

Re: zbm2obj

Post by ohsirrah »

kavehth wrote: Mon Feb 23, 2015 10:21 am
you can download the latest version here
https://www.dropbox.com/s/zqr4gg03mg63b ... 2.zip?dl=0

and you can get the updated GrimEdi here
https://www.dropbox.com/s/gh41fcr1r5l92 ... 2.rar?dl=0
Can you update these links? They seem to be dead as of Apr 2022.
User avatar
sallim
Posts: 7
Joined: Wed Jul 15, 2015 8:04 pm

Re: zbm2obj

Post by sallim »

I found ZBM2OBJ_v0.2in my archives! Also found grimedi.jar from the same date on my harddrive.
Might be related, so I put it up there.

https://www.mediafire.com/file/wadct7vh ... i.zip/file
https://www.mediafire.com/file/pjpq6ivr ... 2.zip/file

backup link:
https://files.fm/u/rfkzgtsy3

edit: added a missing dll file to the grimedi.zip

Greets!
ohsirrah
Posts: 2
Joined: Thu Apr 28, 2022 2:09 am

Re: zbm2obj

Post by ohsirrah »

Thanks for these sallim. After trying these out, zbm2obj probably works fine, but this version of grimedi is outdated. It seems this is an earlier copy of grimedi which improperly interprets the zbm greyscale as RGB. From what I can see, Cervian modified grimedi to fix this problem, but didnt post specifically on how this issue was fixed. He left a clue that maybe if the colors were converted back to hexadecimal they could be put back together in a way that displays the colors correctly, but I don't know how to do that.

Three options remains
1. Find Cervian's modified grimedi.
2. Use GLIntercept and OGLE to extract the corrected zbm.
3. ScummVM seems to interpret the zbm files correctly, so the solution exists in the code for ScummVM, I'm just not a programer and wouldn't know what to do with it.
jlaw90
Posts: 12
Joined: Sun Sep 28, 2014 8:59 pm

Re: zbm2obj

Post by jlaw90 »

Hi all,

I've updated GrimEdi to correctly handle the byte flipping required for these remastered ZBM files, and also changed it to interpret them as a 16-bit greyscale image.
mo_3_cornr.png
mo_3_cornr.png (243.17 KiB) Viewed 9337 times
The source code is available on GitHub here: https://github.com/jlaw90/Grimja/tree/master ( just in case anyone is interested in the changes that fixed it, that's here: https://github.com/jlaw90/Grimja/commit ... f31R79-R97 )

There is a JAR file available for download on the releases page: https://github.com/jlaw90/Grimja/releases and new JAR files will be published whenever new code is committed to master.

If anyone has any issues, feel free to email or open an issue on GitHub.
Post Reply