Important information: this site is currently scheduled to go offline indefinitely by end of the year.

[request] convert GRIN Engine .diesel models

Post questions about game models here, or help out others!
Szkaradek123
mega-veteran
mega-veteran
Posts: 292
Joined: Wed May 05, 2010 8:21 pm
Location: Poland Głogów
Has thanked: 21 times
Been thanked: 742 times

Re: [request] convert GRIN Engine .diesel models

Post by Szkaradek123 »

The contents of this post was deleted because of possible forum rules violation.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1027
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 269 times
Been thanked: 154 times
Contact:

Re: [request] convert GRIN Engine .diesel models

Post by Tosyk »

The contents of this post was deleted because of possible forum rules violation.
Thank you for all you do here
my blog | my forum
luxox18
mega-veteran
mega-veteran
Posts: 176
Joined: Fri Jul 29, 2011 9:18 pm
Has thanked: 54 times
Been thanked: 46 times

Re: [request] convert GRIN Engine .diesel models

Post by luxox18 »

I just checked that in the files .bundle are not all models and textures (in the case of some games)

your work is genial Szkaradek123

thanks
SLIFallen
advanced
Posts: 67
Joined: Tue Sep 28, 2010 4:26 pm
Been thanked: 3 times

Re: [request] convert GRIN Engine .diesel models

Post by SLIFallen »

Thanks for helping w/some old requests. Jsut because it's old doesent mean it's not useful or appreciated! Thanks!
demolos
advanced
Posts: 65
Joined: Mon Mar 12, 2007 3:38 pm
Has thanked: 5 times
Been thanked: 4 times

Re: [request] convert GRIN Engine .diesel models

Post by demolos »

Hi Szkaradek123
Can you try to read this .DIESEL files it's from an old game Bandit Phoenix Rising ?
rmezatang
advanced
Posts: 40
Joined: Mon Jun 21, 2010 3:32 am
Has thanked: 2 times
Been thanked: 6 times

Re: [request] convert GRIN Engine .diesel models

Post by rmezatang »

MP Model and Weapons


Image
rmezatang
advanced
Posts: 40
Joined: Mon Jun 21, 2010 3:32 am
Has thanked: 2 times
Been thanked: 6 times

Re: [request] convert GRIN Engine .diesel models

Post by rmezatang »

BioMech and Spencer (retro outfit) from Single Player Campaign

Image
dragbody
veteran
Posts: 126
Joined: Tue Sep 20, 2011 4:33 am
Has thanked: 137 times
Been thanked: 10 times

Re: [request] convert GRIN Engine .diesel models

Post by dragbody »

Those models look good, but if you didn't know, luxox18 has already extracted the models from that game. :)
XLAX
ultra-n00b
Posts: 8
Joined: Tue Oct 04, 2011 1:18 am

Re: [request] convert GRIN Engine .diesel models

Post by XLAX »

3dripper 1.5a works fine with this game
dragbody
veteran
Posts: 126
Joined: Tue Sep 20, 2011 4:33 am
Has thanked: 137 times
Been thanked: 10 times

Re: [request] convert GRIN Engine .diesel models

Post by dragbody »

The blender script by Szkaradek123 works great for these samples. How about the textures? What format do they come in?
luxox18
mega-veteran
mega-veteran
Posts: 176
Joined: Fri Jul 29, 2011 9:18 pm
Has thanked: 54 times
Been thanked: 46 times

Re: [request] convert GRIN Engine .diesel models

Post by luxox18 »

dragbody wrote:The blender script by Szkaradek123 works great for these samples. How about the textures? What format do they come in?
dds format , with the specular maps in the diffuse map (alpha channel )
User avatar
SoldierTODD
beginner
Posts: 35
Joined: Fri Oct 24, 2014 10:15 pm
Has thanked: 7 times

Re: [request] convert GRIN Engine .diesel models

Post by SoldierTODD »

Szkaradek123 wrote:Blender249 importer for Bionic models from samples:
-import geometry and uv
-open script in Blender249 text editor

Code: Select all

#MARIUSZ SZKARADEK GLOGOW POLAND 2011-10-17
#BIONIC BLENDER249 IMPORTER(.DIESEL MODEL)
#GEOMETRY+UV
#PRESS ALT+P TO RUN SCRIPT AND SELECT DIESEL MODEL

import bpy,struct,os
import Blender
from Blender import *
from struct import *
from Blender.Mathutils import *
import math


def find_0(): 
    s=''
    while(True):
        litera =  struct.unpack('c',plik.read(1))[0]
        if  litera=='\x00':
            break
        else:
            s+=litera
    return s


def word(long): 
   s=''
   for j in range(0,long): 
       lit =  struct.unpack('c',plik.read(1))[0]
       if ord(lit)!=0:
           s+=lit
           if len(s)>100000:
               break
   return s


def b(n):
    return struct.unpack(n*'b', plik.read(n))
def B(n):
    return struct.unpack(n*'B', plik.read(n))
def h(n):
    return struct.unpack(n*'h', plik.read(n*2))
def H(n):
    return struct.unpack(n*'H', plik.read(n*2))
def i(n):
    return struct.unpack(n*'i', plik.read(n*4))
def f(n):
    return struct.unpack(n*'f', plik.read(n*4))


def vertexuv():
    mesh.vertexUV = 1
    for m in range(len(mesh.verts)):
        mesh.verts[m].uvco = Vector(uvlist[m])
    mesh.update() 
    mesh.faceUV = 1
    for fc in mesh.faces: fc.uv = [v.uvco for v in fc.verts];fc.smooth = 1
    mesh.update() 

def drawmesh(name):
        global mesh 
        mesh = bpy.data.meshes.new(name)
        mesh.verts.extend(vertexlist)
        mesh.faces.extend(faceslist,ignoreDups=True)
        if len(uvlist)!=0:
                vertexuv()
        scene = bpy.data.scenes.active
        obj = scene.objects.new(mesh,name)
        mesh.recalcNormals()
        Redraw()

def parser():
    global vertexlist,faceslist,uvlist
    print 
    data = H(10);print data
    plik.seek(12)
    for m in range(data[4]):
        print '-'*20,m,
        var0 = i(2);print var0,plik.tell()
        seek = i(1)[0]#;print 'seek',seek
        back = plik.tell()
        if var0[0]==1012162716:
            print find_0() 
        if var0[0]==268226816:
            print find_0() 
        if var0[0]==2058384083:
            vertexlist = []
            uvlist = []
            num = i(1)[0];print 'num =',num
            var = i(1)[0];print 'var =',var
            if   var == 5:i(10)
            elif var == 2:i(4) 
            elif var == 4:i(8) 
            elif var == 7:i(14) 
            elif var == 8:i(16) 
            elif var == 9:i(18) 
            elif var == 10:i(21)
            else: 
                print i(10)
                break 
            for n in range(num):
                vertexlist.append(f(3))
            for n in range(num):
                uvlist.append([f(1)[0],-f(1)[0]])
            print plik.tell()
            #print f(10) 
        if var0[0]==1280342547:
            faceslist = []
            var = i(2);print var
            for n in range(var[1]/var[0]):
                faceslist.append(H(3))
            drawmesh('model-'+str(m))
        plik.seek(back)
        plik.seek(seek,1)
    
    
def openfile(filename):
    global plik
    print sys.basename(filename)
    plik = open(filename,'rb')  
    parser()
    
Window.FileSelector(openfile)   
I beg your pardon.
This script can import an animation from the game Terminator Salvation?


P.S. Sorry for my English. I use a translator.
Post Reply