Leaderboard
Popular Content
Showing content with the highest reputation on 08/23/2015 in all areas
-
Information Central [Modular MOC]
aidenpons and 6 others reacted to Ayliffe for a topic
Information Central [Modular MOC] As part of the great Mayhead City redevelopment, the town's old, dated information centre was completely renovated to provide a better experience for tourists wishing to find out more about the local area. The new building both manages to maintain the iconic interior of the old information centre and project the centre's design into the future with a state-of-the-art viewing platform. Look familiar? Thanks for looking!7 points -
Noesis script for ghg files
ProfessorBrickkeeper and 3 others reacted to Sluicer for a topic
I once started to work on a skript for noesis that can open ghg files from the game LEGO Star Wars The Complete Saga. I mentioned it in a comment in a blog and decided to create a new topic for it. By this, I hope that it will be easier to find for people, that did not read the blog. There are a lot of comments because it is in development / research state. So here is the unfinished script: from inc_noesis import * import noesis import rapi def registerNoesisTypes(): '''Register the plugin. Just change the Game name and extension.''' handle = noesis.register("LEGO TTGames Mesh (*pc.ghg)", ".ghg") noesis.setHandlerTypeCheck(handle, noepyCheckType) noesis.setHandlerLoadModel(handle, noepyLoadModel) return 1 def noepyCheckType(data): '''Verify that the format is supported by this plugin. Default yes''' bs = NoeBitStream(data) tmp = bs.readInt() if tmp == 0x3032554e: # NU20 #Batman return 1 bs.seek(tmp, NOESEEK_REL) tmp = bs.readInt() if tmp == 0x3032554e: # NU20 #Star Wars return 1 return 0 def noepyLoadModel(data, mdlList): bs = NoeBitStream(data) ctx = rapi.rpgCreateContext() stack = [] textures = [] materials = [] NU20 = bs.readInt() if NU20 == 0x3032554e: # NU20 #Batman print("NU20 first") else: print("NU20 @ 0x%x" % NU20) numberImg = bs.readShort() print("numberImg %d" % numberImg) bs.seek(NU20+4, NOESEEK_ABS) bs.seek(0x4, NOESEEK_REL) bs.seek(0xc, NOESEEK_REL) #HEAD fourCC = bs.readInt() chunkSize = bs.readInt() absOffsetPNTR = bs.tell() + bs.readInt() offsetGSNH = bs.readInt() absOffsetGSNH = bs.tell() + offsetGSNH #NTBL fourCC = bs.readInt() chunkSize = bs.readInt() bs.seek(chunkSize-8, NOESEEK_REL) fourCC = bs.readInt() if (fourCC == 1178948180): # TREF chunkSize = bs.readInt() bs.seek(chunkSize-8, NOESEEK_REL) fourCC = bs.readInt() if (fourCC == 810832724): # TST0 chunkSize = bs.readInt() bs.seek(chunkSize-8, NOESEEK_REL) fourCC = bs.readInt() #MS00 - Materials print("MS00 @ 0x%x" % (bs.tell()-4)) #fourCC = bs.readInt() chunkSize = bs.readInt() numberMaterials = bs.readInt() bs.seek(4, NOESEEK_REL) # 0 for i in range (0, numberMaterials): material = NoeMaterial("mat%03i"%i, "") #create a material bs.seek(0x38, NOESEEK_REL) # matId = bs.readInt() bs.seek(0x18, NOESEEK_REL) # material.setDiffuseColor(NoeVec4([bs.readFloat(), bs.readFloat(), bs.readFloat(), bs.readFloat()])) bs.seek(0x10, NOESEEK_REL) # texId = bs.readShort() if (texId != -1): material.setTexture("tex%03i"%texId) bs.seek(0x52, NOESEEK_REL) # colorRbga = bs.readBytes(4) # material.setDiffuseColor(NoeVec4([colorRbga[0]/255, colorRbga[1]/255, colorRbga[2]/255, colorRbga[3]/255])) bs.seek(0x1F8, NOESEEK_REL) # materials.append(material) bs.seek(absOffsetGSNH - 12, NOESEEK_ABS) #GSNH print("GSNH @ 0x%x" % bs.tell()) fourCC = bs.readInt() chunkSize = bs.readInt() bs.readInt() numberImages = bs.readInt() print("NumberImages %d" % numberImages) absOffsetImagesMeta = bs.tell() + bs.readInt() bs.seek(0x28, NOESEEK_REL) absOffsetMeshMeta = bs.readInt() - 4 + bs.tell() bs.seek(0x130, NOESEEK_REL) numberBones = bs.readInt() absOffsetBones = bs.readInt() - 4 + bs.tell() print("NumberBones %d" % numberBones) absOffsetBones2 = bs.readInt() - 4 + bs.tell() absOffsetBones3 = bs.readInt() - 4 + bs.tell() bs.seek(24, NOESEEK_REL) numberLayer = bs.readInt() absOffsetLayer = bs.readInt() - 4 + bs.tell() print("NumberLayer %d" % numberLayer) # goto image meta bs.seek(absOffsetImagesMeta, NOESEEK_ABS) size = 0 if NU20 == 0x3032554e: #Batman imageMetas = [] for i in range (0, numberImages): tmp = bs.readInt() stack.append(bs.tell()) bs.seek(tmp-4, NOESEEK_REL) width = bs.readInt() height = bs.readInt() bs.seek(0x10, NOESEEK_REL) bs.seek(0x2c, NOESEEK_REL) size = bs.readInt() print("Image{0}: width = {1:4d}; height = {2:4d}; size = {3:8d}".format(i, width, height, size)) imageMetas.append(ImageMeta(width, height, size)) bs.seek(stack.pop(), NOESEEK_ABS) bs.seek(absOffsetPNTR-8, NOESEEK_ABS) # goto PNTR #print("1 0x%x" % bs.tell()) fourCC = bs.readInt() #print("2 0x%x" % bs.tell()) chunkSize = bs.readInt() print("3 0x%x" % bs.tell()) bs.seek(chunkSize-4, NOESEEK_REL) # goto EndOfPNTR print("4 0x%x" % bs.tell()) for i in range (0, numberImages): data = bs.readBytes(imageMetas[i].size) texture = rapi.loadTexByHandler(data, ".dds") #NoeTexture(str(i), width, height, data, texFmt) texture.name = "tex%03i"%i textures.append(texture) #bs.seek(size, NOESEEK_REL) print("5 0x%x" % bs.tell()) else: numberRealImages = 0 for i in range (0, numberImages): tmp = bs.readInt() stack.append(bs.tell()) bs.seek(tmp-4, NOESEEK_REL) width = bs.readInt() height = bs.readInt() print("Image{0}: width = {1:4d}; height = {2:4d}".format(i, width, height)) if width != 0 and height != 0: numberRealImages += 1 bs.seek(stack.pop(), NOESEEK_ABS) bs.seek(6, NOESEEK_ABS) #goto beginOfFile + 6 for i in range (0, numberRealImages): pos = bs.tell() width = bs.readInt() height = bs.readInt() bs.readInt() bs.readInt() bs.readInt() size = bs.readInt() print("Image{0} @ {1:8x}: width = {2:4d}; height = {3:4d}".format(i, pos, width, height)) data = bs.readBytes(size) texture = rapi.loadTexByHandler(data, ".dds") #NoeTexture(str(i), width, height, data, texFmt) texture.name = "tex%03i"%i textures.append(texture) # bs.seek(size, NOESEEK_REL) #End DDS vertexLists = [] numberVertexLists = bs.readShort() for i in range (0, numberVertexLists): size = bs.readInt() vertexLists.append(bs.readBytes(size)) indexLists = [] numberIndices = bs.readShort() for i in range (0, numberIndices): size = bs.readInt() indexLists.append(bs.readBytes(size)) bs.seek(absOffsetMeshMeta, NOESEEK_ABS) bs.seek(0x14, NOESEEK_REL) numberParts = bs.readInt() print("NumberParts %d" % numberParts) bs.seek(0x08, NOESEEK_REL) partPos = bs.tell() bytesForPositions = [] stride = [] bytesForIndexBuffer = [] numIdx = [] for i in range (0, numberParts): offsetPart = bs.readInt() bs.seek(offsetPart - 4, NOESEEK_REL) bs.readInt() // 6 numberIndices = bs.readInt()+2 sizeVertex = bs.readShort() bs.seek(0x0a, NOESEEK_REL) offsetVertex = bs.readInt() numberVertex = bs.readInt() offsetIndices = bs.readInt() indexList = bs.readInt() vertexList = bs.readInt() bytesForPositions.append(vertexLists[vertexList][offsetVertex*sizeVertex:offsetVertex*sizeVertex+numberVertex*sizeVertex]) stride.append(sizeVertex) bytesForIndexBuffer.append(indexLists[indexList][offsetIndices*2:offsetIndices*2+numberIndices*2]) numIdx.append(numberIndices) partPos += 4 bs.seek(partPos, NOESEEK_ABS) bs.seek(absOffsetLayer, NOESEEK_ABS) layers = [] for i in range (0, numberLayer): layer = Layer(i) absOffsetText = bs.readInt() - 4 + bs.tell() tmp = bs.readInt() if (tmp != 0): layer.p1 = bs.tell() + tmp - 4 tmp = bs.readInt() if (tmp != 0): layer.p2 = bs.tell() + tmp - 4 tmp = bs.readInt() if (tmp != 0): layer.p3 = bs.tell() + tmp - 4 tmp = bs.readInt() if (tmp != 0): layer.p4 = bs.tell() + tmp - 4 layers.append(layer) for layer in (layers): if (layer.p1 != 0): bs.seek(layer.p1, NOESEEK_ABS) for j in range (0, numberBones): #parts = 0 tmp = bs.readInt() if (tmp != 0): stack.append(bs.tell()) bs.seek(tmp-4, NOESEEK_REL) bs.seek(8, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> matrix bs.seek(0xB0, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> number of parts parts = bs.readInt() bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> materials partMaterials = [] for p in range (0, parts): partMaterials.append(bs.readInt()) partMaterials = list(reversed(partMaterials)) bs.seek(stack.pop(), NOESEEK_ABS) bonePartPair = BonePartPair(0, j, parts, partMaterials) layer.bonePartPairs.append(bonePartPair) if (layer.p2 != 0): bs.seek(layer.p2, NOESEEK_ABS) bs.seek(8, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> matrix bs.seek(0xB0, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> number of parts parts = bs.readInt() bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> materials partMaterials = [] for p in range (0, parts): partMaterials.append(bs.readInt()) partMaterials = list(reversed(partMaterials)) #bs.seek(stack.pop(), NOESEEK_ABS) bonePartPair = BonePartPair(1, -1, parts, partMaterials) layer.bonePartPairs.append(bonePartPair) if (layer.p3 != 0): bs.seek(layer.p3, NOESEEK_ABS) for j in range (0, numberBones): #parts = 0 tmp = bs.readInt() if (tmp != 0): stack.append(bs.tell()) bs.seek(tmp-4, NOESEEK_REL) bs.seek(8, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> matrix bs.seek(0xB0, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> number of parts parts = bs.readInt() bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> materials partMaterials = [] for p in range (0, parts): partMaterials.append(bs.readInt()) partMaterials = list(reversed(partMaterials)) bs.seek(stack.pop(), NOESEEK_ABS) bonePartPair = BonePartPair(2, j, parts, partMaterials) layer.bonePartPairs.append(bonePartPair) if (layer.p4 != 0): bs.seek(layer.p4, NOESEEK_ABS) bs.seek(8, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> matrix bs.seek(0xB0, NOESEEK_REL) bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> number of parts parts = bs.readInt() bs.seek(bs.readInt() - 4, NOESEEK_REL) # --> materials partMaterials = [] for p in range (0, parts): partMaterials.append(bs.readInt()) partMaterials = list(reversed(partMaterials)) #bs.seek(stack.pop(), NOESEEK_ABS) bonePartPair = BonePartPair(3, -1, parts, partMaterials) layer.bonePartPairs.append(bonePartPair) bs.seek(absOffsetBones, NOESEEK_ABS) bones = [] bones0 = [] bones1 = [] bones2 = [] boneNames = [] bonePIndices = [] globalCounter = 0 for i in range (0, numberBones): boneMat = NoeMat44.fromBytes(bs.readBytes(0x40)).toMat43() bs.seek(0xc, NOESEEK_REL) boneIndex = i offsetText = bs.readInt() stack.append(bs.tell()) bs.seek(offsetText - 4, NOESEEK_REL) boneName = bs.readString() boneNames.append(boneName) bs.seek(stack.pop(), NOESEEK_ABS) bonePIndex = bs.readByte() bonePIndices.append(bonePIndex) bs.readByte() bs.readByte() bs.readByte() bs.readInt() bs.readInt() bs.readInt() print(boneName + ": " + repr(i) + "-->" + repr(bonePIndex)) bones0.append(boneMat) for i in range (0, numberBones): boneMat = NoeMat44.fromBytes(bs.readBytes(0x40)).toMat43() #print(boneMat) if (bonePIndices[i] != -1): boneMat = boneMat.__mul__(bones1[bonePIndices[i]]) bone = NoeBone(i, boneNames[i], boneMat, None, bonePIndices[i]) bones.append(bone) bones1.append(boneMat) for i in range (0, numberBones): boneMat = NoeMat44.fromBytes(bs.readBytes(0x40)).toMat43() #print(boneMat) bones2.append(boneMat) globalCounter = 0 for layer in (layers): print("Layer: %d" % layer.layer) if layer.bonePartPairs: for bonePartPair in (layer.bonePartPairs): print(" Pointer: " + repr(bonePartPair.pointer) + " Bone: " + repr(bonePartPair.bone) + " Parts: " + repr(bonePartPair.parts)) if (bonePartPair.bone != -1): rapi.rpgSetTransform(bones1[bonePartPair.bone]) else: rapi.rpgSetTransform(None) print(bonePartPair.partMaterials) for j in range (0, bonePartPair.parts): rapi.rpgBindPositionBuffer(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 0) if (stride[globalCounter] == 44): rapi.rpgBindUV1BufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 28) #rapi.rpgBindBoneIndexBufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_UBYTE, stride[globalCounter], 40, 4) #rapi.rpgBindBoneWeightBufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_UBYTE, stride[globalCounter], 36, 4) if (stride[globalCounter] == 40): rapi.rpgBindUV1BufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 24) #rapi.rpgBindBoneIndexBufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_UBYTE, stride[globalCounter], 36, 4) #rapi.rpgBindBoneWeightBufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_UBYTE, stride[globalCounter], 32, 4) if (stride[globalCounter] == 36): if NU20 == 0x3032554e: #Batman rapi.rpgBindUV1BufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 20) else: rapi.rpgBindUV1BufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 28) if (stride[globalCounter] == 32): rapi.rpgBindUV1BufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 24) if (stride[globalCounter] == 28): if NU20 == 0x3032554e: #Batman rapi.rpgBindUV1BufferOfs(bytesForPositions[globalCounter], noesis.RPGEODATA_FLOAT, stride[globalCounter], 20) rapi.rpgSetMaterial("mat%03i"%bonePartPair.partMaterials[j]) rapi.rpgCommitTriangles(bytesForIndexBuffer[globalCounter], noesis.RPGEODATA_SHORT, numIdx[globalCounter], noesis.RPGEO_TRIANGLE_STRIP, 1) globalCounter = globalCounter + 1 rapi.rpgClearBufferBinds() mdl = rapi.rpgConstructModel() mdl.setModelMaterials(NoeModelMaterials(textures, materials)) mdl.setBones(bones) mdlList.append(mdl) #important, don't forget to put your loaded model in the mdlList return 1 class Layer(object): def __init__(self, layer): self.layer = layer self.bonePartPairs = [] self.p1 = 0 self.p2 = 0 self.p3 = 0 self.p4 = 0 class BonePartPair(object): def __init__(self, pointer, bone, parts, partMaterials): self.pointer = pointer self.bone = bone self.parts = parts self.partMaterials = partMaterials class ImageMeta(object): def __init__(self, width, height, size): self.width = width self.height = height self.size = size You can create results like this with the script: I have updated the script, so that materials will also be respected now. You can get models like in the following posts.4 points -
Monster truck wheels (replaces the wagon wheels)
RacerRabbit reacted to TheStranger for a topic
I made this tiny mod that replaces the Wagon wheels with re-textured wheels from Baron von Barron's car, making it look a bit like a monster truck. I mostly just copied the data straight from BVB's car files in piecedb into the ones from the wagon (DA). I hope I didn't forget to include any file in the mod so if you try it and it doesn't work, please let me know. Screenshots: Download link: monster wheels.rar Edit: I just realized the thing in the back of Joan of Cart's car is a stake because Joan of Arc was burned at a stake.1 point -
New version of ROCK RAIDERS - update
Ayliffe reacted to Fluffy Cupcake for a topic
Hey if voices are ever needed (even if not lines and is something as simple as tripping over a spider =P) I (or Oboe Shoes?) can do that, I love voicing things. Although I ain't no professional yet.1 point -
Insane Raiders No. 22 - Idle Games
Ben24x7 reacted to Arthuriel for a gallery image
From the album: Insane Raiders
It was only a matter of time until the Rock Raiders would discover the thing, they are best at: eating sandwiches dying during badly timed TNT explosions playing Idle Games (or Incremental Game or however you may call them). They either require just a running computer or additional mouse clicking, which means, that the Rock Raiders with Idle-Syndrome are the best skilled Idle-Gamers out there.1 point -
Carmine Wheeler, Mob Boss of the Racing World
aidenpons reacted to Phantom Terror for a topic
In a world where racing is the only thing that matters, one robot controls it all. Carmine Wheeler, notorious race fixer and gambler, has the whole world in his pocket. CEO of the largest wheel and tire manufacturing company, he has enough money to keep the PD and Courts in the palm of his hand, as well as fuel his gambling. If you ever take out a loan from Wheeler to bet on a race, he'll probably end up with it back in his wallet, while still wanting the amount you borrowed. --------------- Imgur Gallery Flickr Gallery Really pleased with how this guy came out. He was a really big leap for me, but I think I pulled it off. He sports a custom mouth decal, cigar, and expressive eyes. Definitely a MOC I am very proud of.1 point -
Corrupted Demo/N64 Intro Animation
aidenpons reacted to lol username for a topic
The results of using a WIP corruption tool by Will on the demo of the game. Said tool led to a lot of hilarity in McJobless's stream earlier today, I'm not sure if the broadcast got saved though.1 point -
Porting vehicles from other TT games?
Alekz reacted to Quisoves Potoo for a topic
Could you please upload the relevant .CPJ and the vehicle folder? I've successfully transferred characters from LEGO Batman 3 to Worlds. I've also transferred vehicles, though the fact that the TPAGE files are different between games causes problems. To wit: I'm not sure if it's fixable. I haven't had much of a chance to try, having been out of state for the past week and a half.1 point -
Forum moderation is roughly comparable to __.
Lair reacted to lol username for a topic
cards against humanity meta jokes modding etc1 point -
LEGO Racers PS1 Demo
Rock Monster reacted to lol username for a topic
http://crimson-ceremony.net/demopals/eurodemo/index.php?img=uk050#SCED-01824 https://www.youtube.com/watch?v=idY8brAmZGQ (1:19) This is PAL, not sure if there's an NTSC equivalent. But it's a bit different from the PC demo.1 point
