Jump to content

LEGO Island .wdb Extractor


Hamhock666
 Share

Recommended Posts

I don't know if anyone is still interested, or this has already been done, but I made a ripper for the WORLD.WDB file. It extracts most of the models and textures and outputs them in .obj format. I think it's just the models with animations that don't extract. Also the normals for the model faces will need to be inverted.

 

Github source: https://github.com/LiamBrandt/WDBRipper

Github binary download: https://github.com/LiamBrandt/WDBRipper/releases/download/v0.2.0/wdb-ripper-v.0.2.0-binary.zip

RRU download: https://www.rockraidersunited.com/files/dl-r30/

 

The tool extracts 451 out of the 592 models, whereas the old one only did around 300.

 

The minifig models have also been extracted, although the wdb ripper has not been updated to reflect it. I wanted to get this implemented into the extractor, but I honestly haven't had time. Instead, I found a messy way to get the models out, so I have them for anyone that wants them. Although most people already have minifig models, these are the original ones. Make sure to read the README file.

 

Minifig models:  

Dropbox: https://www.dropbox.com/s/ygssmf0lwwrey2c/extra_li_models.zip?dl=0

RRU: https://www.rockraidersunited.com/files/dl-r438/

Edited by Slimy Slug
Updated post with new information and various links scattered through the topic
Link to comment
Share on other sites

Fluffy Cupcake
18 hours ago, Hamhock666 said:

I don't know if anyone is still interested, or this has already been done

Always, and not really. At least not the models part.

 

That's interesting. The World.wdb file you included is 1763[dec] bytes larger than mine.

 

Anyhow, this is great, here's a screenshot of the island:

LEGO_Island_Render.png

 

Edited by Xiron
Uploaded better image
Link to comment
Share on other sites

I'm not sure if you saw, but there are separate hi def textures for the island, it was sort of an exception in world.wdb. The higher resolution texures are prefixed with "hide_^", which would probably fix the problem of all the rock textures in the picture being black.

 

I might try to make a tool to reverse the process and put models back into the world.wdb, but im not sure how well Lego Island would accept it.

Link to comment
Share on other sites

Fluffy Cupcake

I'm aware, also, I didn't finish setting the hi-def textures because I was in a bit of a hurry. ;P Also, some of the black was caused by horrible lighting.

 

A reverse way would be awesome. Although in the island's case it would be handy to know how world boundaries work in this game.

Are walk-ables defined by textures, or by other means, etc.

 

I get several models giving an "invalid texture index" error on import (at least in 3dsMax, Blender can handle it).

Link to comment
Share on other sites

  • 2 months later...
On 27/12/2015 at 3:51 AM, Xiron said:

Anyhow, this is great, here's a screenshot of the island:

LEGO_Island_Render.png

I must be doing something wrong... If I import the island (or any other mesh) into blender, the lighting is... how do I say this?... reversed? It's also upside down. :?:

Link to comment
Share on other sites

9 minutes ago, mumboking said:

I must be doing something wrong... If I import the island (or any other mesh) into blender, the lighting is... how do I say this?... reversed? It's also upside down. :?:

I think that is because the normals are inverted. I'm not sure why but when I was figuring out the file format, the normals for the faces were all pointing in from the faces. So you need to invert the normals to get the faces facing the right way. In blender, you want to select everything, go into edit mode, then hit W and click Flip Normals.

Link to comment
Share on other sites

28 minutes ago, Hamhock666 said:

I think that is because the normals are inverted. I'm not sure why but when I was figuring out the file format, the normals for the faces were all pointing in from the faces. So you need to invert the normals to get the faces facing the right way. In blender, you want to select everything, go into edit mode, then hit W and click Flip Normals.

I tried flipping the normals, the reversed lighting still remains.  :-/

Link to comment
Share on other sites

Fluffy Cupcake

Hmmmm, I'll have to double check what I did when I get home.

 

@hamhock666 Any chance on an update? I think a lot of people would like one.

Link to comment
Share on other sites

9 minutes ago, Xiron said:

Any chance on an update? I think a lot of people would like one.

Yea, I was taking a look at the files, and I realized that my program did not extract all of the files that it could have. There are some files that contain more than one model, and I just didn't know how to read them, but I have made progress on extracting them, its pretty similar to the other ones. I will probably get it working soon and upload it.

 

And then theres the whole putting these models back into the game, im not sure whether people are more interested in modding the game or just extracting the models for their own use.

Link to comment
Share on other sites

bphillips09
5 hours ago, Hamhock666 said:

Yea, I was taking a look at the files, and I realized that my program did not extract all of the files that it could have. There are some files that contain more than one model, and I just didn't know how to read them, but I have made progress on extracting them, its pretty similar to the other ones. I will probably get it working soon and upload it.

 

And then theres the whole putting these models back into the game, im not sure whether people are more interested in modding the game or just extracting the models for their own use.

I noticed when I was going through them that some models were missing but the materials were there. I think the main ones were the racetrack, police station, jail, cave, and hospital. 

Link to comment
Share on other sites

On 3/18/2016 at 7:54 PM, Xiron said:

@mumboking

So is this your problem? Flat textures? If not, I'm not sure exactly what you mean by "reversed lighting" (screenshot?)

No. Hmm...

Okay.

 

This is the island freshly imported with a sun light and the viewport shading set to "Material".

Screenshot-28.png

You'll notice that the island is pretty much completely black.

 

This is the underside of the island... Lit up by the sun...

Screenshot-29.png

Now you see that the island is inverted/mirrored/whatever.

Edited by Slimy Slug
Replaced image embeds with not photobucket reupload
Link to comment
Share on other sites

Fluffy Cupcake

I don't have a sun or any light source in my scene shown above.

 

I know this is going to sound very stupid, but have you tried rotating the island 180° to face up and moved the light source to be above it?

Needed to check that image again, so the sun is above hmm? Hmm.

Link to comment
Share on other sites

  • 1 month later...
Hamhock666
On 5/9/2016 at 5:21 AM, bphillips09 said:

@hamhock666 Any update on the extractor?

I have made a little progress. The files that do not extract are similar to the files that do extract, only more complicated. I would say about only half of the models can actually be interpreted and converted to .obj at this point. If anyone wants to take a shot at it or wants to know more about the format, just ask.

 

I have also made a github repo for the wdb ripper, so you can find all of the source code and current documentation there:

https://github.com/LiamBrandt/WDBRipper

 

I am sorry it has been so long, I have been busy, and the format is complicated, but really if anyone wants I will post the details of the extraction so far, and explain what I have done. I don't know how much of the stuff I wrote makes sense, the file that is most descriptive of the format is format.txt in the main folder. Inside of the format.txt, there are #SECTION[x] headings, each representing a section of the file that is repeated x number of times.

Link to comment
Share on other sites

  • 5 months later...
Fluffy Cupcake

Nothing shows? I'm not sure anything about that, I'm using the latest Blender version and it imports just fine for me. I do notice they import VERY LARGE though, so I either have to scale them down or increase the viewport culling range to see them properly.

As for where the buildings are, they are in various folders like "Bank", "Store" and "infocen". Your best chance to find most models for the island is under \ACT1\sub1\.

Link to comment
Share on other sites

Have you tried scrolling out, looking around, doing what Xiron said with the viewport culling range or scaling them down? Have you tried flipping the normals? Otherwise I don't think there is a whole lot we can do. Make sure you are importing the .obj files from the OBJ folder, and not the MTL or BIN files in the other folders. You might try reinstalling blender or resetting to default settings in case you messed up a setting and cant import models anymore.

Link to comment
Share on other sites

  • lol username featured this topic
  • ShadowDraikana pinned this topic
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.