#526
|
||||
|
||||
It is, and the obj parser should automatically apply textures. The one I tested with while developing that feature was GLC Player, and it has no problem parsing my exported objs, textures and all.
|
#527
|
||||
|
||||
Quote:
![]() |
#528
|
||||
|
||||
Yes, GLC player works the best for viewing the models. The mtl is still being imported into 3DS max but you have to manually apply the textures due to the plugin not working correctly.
|
#529
|
||||
|
||||
Here's a new build, and I decided to release the source code (VB .NET and OpenGL code). It's largely uncommented and a little bit messy, but anyone's welcome to do as they please with it, without accreditation.
![]() Updates: + All texture bugs confirmed to be gone. (Pic 1, Pic 2) + Tool bar with some quick toggles and model rotation options. + Option to associate *.bkm and *.btm files with Windows, so when you double click them they open automatically in BG. You can also drag the files from Windows onto the render Window in BG and they'll load up. + Started work on DK64. Nothing to show yet, purely code side. Download source code Download 32-bit binary Download 64-bit binary Last edited by cooliscool; 20th September 2009 at 03:50 AM. |
#530
|
||||
|
||||
nice update! It is a lot easier to look at the model as a whole and see what it is.
The only thing I can suggest is a zoom toggle (and character .obj exporting fixes ![]() |
#531
|
||||
|
||||
I'm happy, you released the source and its now parsing some files that looked like nothing at the time.
EDIT: I found some weird orbs that as you move closer to them they spread apart. Model 3C1C40 ![]() Model 746348 ![]() Model 749710 ![]() Also There is something wrong with Mumbos Huts from Mumbos Mountain ![]() Last edited by mojobojo; 20th September 2009 at 05:07 PM. |
#532
|
||||
|
||||
Downloading now.
__________________
From where you're kneeling, it must seem like an 18-carat run of bad luck. Truth is... the game was rigged from the start -Benny |
#533
|
||||
|
||||
Downloading source and binary now.
![]() |
#534
|
||||
|
||||
It's pretty beast. And that one item marked "?" is Mumbo's hand and arm.
__________________
From where you're kneeling, it must seem like an 18-carat run of bad luck. Truth is... the game was rigged from the start -Benny |
#535
|
||||
|
||||
Quote:
Last edited by cooliscool; 20th September 2009 at 10:24 PM. |
#536
|
||||
|
||||
Are you sure you're not missing a separate tri draw command? Sometimes there are 2 in ones, and it's possible there are solo tri draws in BK?
|
#537
|
||||
|
||||
Nope, I handle both TRI1 (0xBF), and TRI2 (0xB1). If I didn't handle them both, most models would look incorrect. The files I was referring to completely lack any display list commands at all, nor a pointer to one. It's really odd. I theorize that since they seem to be very simple geometry, there's some sort of interpolation algorithm that builds a dlist on the fly.
Code:
Private Sub TRI1() If Game = 0 Then V1 = ((n64dlist(0).Commands(curCMD).CMDDword(5)) \ 2) V2 = ((n64dlist(0).Commands(curCMD).CMDDword(6)) \ 2) V3 = ((n64dlist(0).Commands(curCMD).CMDDword(7)) \ 2) Else V1 = ((n64dlist(0).Commands(curCMD).CMDDword(1)) \ 2) V2 = ((n64dlist(0).Commands(curCMD).CMDDword(2)) \ 2) V3 = ((n64dlist(0).Commands(curCMD).CMDDword(3)) \ 2) End If If OBJMode Then V1 += vtxbegin V2 += vtxbegin V3 += vtxbegin With OBJData .vt(V1) = "vt " & CSng(Vertices.u(V1) * TextureWRatio) & " " & -CSng(Vertices.v(V1) * TextureHRatio) .vt(V2) = "vt " & CSng(Vertices.u(V2) * TextureWRatio) & " " & -CSng(Vertices.v(V2) * TextureHRatio) .vt(V3) = "vt " & CSng(Vertices.u(V3) * TextureWRatio) & " " & -CSng(Vertices.v(V3) * TextureHRatio) End With V1 += 1 V2 += 1 V3 += 1 With OBJData .g.Add("f " & V1 & "/" & _ V1 & " " _ & V2 & "/" & V2 & _ " " & V3 & "/" & V3) End With Exit Sub End If If EnableLighting Or Not EnableCC Then Gl.glBegin(Gl.GL_TRIANGLES) Gl.glColor3f(1, 1, 1) Gl.glNormal3f(VertCache.r(V1), VertCache.g(V1), VertCache.b(V1)) Gl.glTexCoord2f(VertCache.u(V1) * TextureWRatio, VertCache.v(V1) * TextureHRatio) Gl.glVertex3f(VertCache.x(V1), VertCache.y(V1), VertCache.z(V1)) Gl.glNormal3f(VertCache.r(V2), VertCache.g(V2), VertCache.b(V2)) Gl.glTexCoord2f(VertCache.u(V2) * TextureWRatio, VertCache.v(V2) * TextureHRatio) Gl.glVertex3f(VertCache.x(V2), VertCache.y(V2), VertCache.z(V2)) Gl.glNormal3f(VertCache.r(V3), VertCache.g(V3), VertCache.b(V3)) Gl.glTexCoord2f(VertCache.u(V3) * TextureWRatio, VertCache.v(V3) * TextureHRatio) Gl.glVertex3f(VertCache.x(V3), VertCache.y(V3), VertCache.z(V3)) Gl.glEnd() Else Gl.glBegin(Gl.GL_TRIANGLES) Gl.glColor4f(VertCache.r(V1), VertCache.g(V1), VertCache.b(V1), VertCache.a(V1)) Gl.glTexCoord2f(VertCache.u(V1) * TextureWRatio, VertCache.v(V1) * TextureHRatio) Gl.glVertex3f(VertCache.x(V1), VertCache.y(V1), VertCache.z(V1)) Gl.glColor4f(VertCache.r(V2), VertCache.g(V2), VertCache.b(V2), VertCache.a(V2)) Gl.glTexCoord2f(VertCache.u(V2) * TextureWRatio, VertCache.v(V2) * TextureHRatio) Gl.glVertex3f(VertCache.x(V2), VertCache.y(V2), VertCache.z(V2)) Gl.glColor4f(VertCache.r(V3), VertCache.g(V3), VertCache.b(V3), VertCache.a(V3)) Gl.glTexCoord2f(VertCache.u(V3) * TextureWRatio, VertCache.v(V3) * TextureHRatio) Gl.glVertex3f(VertCache.x(V3), VertCache.y(V3), VertCache.z(V3)) Gl.glEnd() End If End Sub Private Sub TRI2() V1 = (n64dlist(0).Commands(curCMD).CMDDword(1) \ 2) V2 = (n64dlist(0).Commands(curCMD).CMDDword(2) \ 2) V3 = (n64dlist(0).Commands(curCMD).CMDDword(3) \ 2) V4 = (n64dlist(0).Commands(curCMD).CMDDword(5) \ 2) V5 = (n64dlist(0).Commands(curCMD).CMDDword(6) \ 2) V6 = (n64dlist(0).Commands(curCMD).CMDDword(7) \ 2) If OBJMode Then V1 += vtxbegin V2 += vtxbegin V3 += vtxbegin V4 += vtxbegin V5 += vtxbegin V6 += vtxbegin With OBJData .vt(V1) = "vt " & CSng(Vertices.u(V1) * TextureWRatio) & " " & -CSng(Vertices.v(V1) * TextureHRatio) .vt(V2) = "vt " & CSng(Vertices.u(V2) * TextureWRatio) & " " & -CSng(Vertices.v(V2) * TextureHRatio) .vt(V3) = "vt " & CSng(Vertices.u(V3) * TextureWRatio) & " " & -CSng(Vertices.v(V3) * TextureHRatio) .vt(V4) = "vt " & CSng(Vertices.u(V4) * TextureWRatio) & " " & -CSng(Vertices.v(V4) * TextureHRatio) .vt(V5) = "vt " & CSng(Vertices.u(V5) * TextureWRatio) & " " & -CSng(Vertices.v(V5) * TextureHRatio) .vt(V6) = "vt " & CSng(Vertices.u(V6) * TextureWRatio) & " " & -CSng(Vertices.v(V6) * TextureHRatio) End With V1 += 1 V2 += 1 V3 += 1 V4 += 1 V5 += 1 V6 += 1 With OBJData .g.Add("f " & V1 & "/" & _ V1 & " " _ & V2 & "/" & V2 & _ " " & V3 & "/" & V3) .g.Add("f " & V4 & "/" & _ V4 & " " _ & V5 & "/" & V5 & _ " " & V6 & "/" & V6) End With Exit Sub End If If EnableLighting Or Not EnableCC Then Gl.glBegin(Gl.GL_TRIANGLES) Gl.glColor3f(1, 1, 1) Gl.glNormal3f(VertCache.r(V1), VertCache.g(V1), VertCache.b(V1)) Gl.glTexCoord2f(VertCache.u(V1) * TextureWRatio, VertCache.v(V1) * TextureHRatio) Gl.glVertex3f(VertCache.x(V1), VertCache.y(V1), VertCache.z(V1)) Gl.glNormal3f(VertCache.r(V2), VertCache.g(V2), VertCache.b(V2)) Gl.glTexCoord2f(VertCache.u(V2) * TextureWRatio, VertCache.v(V2) * TextureHRatio) Gl.glVertex3f(VertCache.x(V2), VertCache.y(V2), VertCache.z(V2)) Gl.glNormal3f(VertCache.r(V3), VertCache.g(V3), VertCache.b(V3)) Gl.glTexCoord2f(VertCache.u(V3) * TextureWRatio, VertCache.v(V3) * TextureHRatio) Gl.glVertex3f(VertCache.x(V3), VertCache.y(V3), VertCache.z(V3)) Gl.glNormal3f(VertCache.r(V4), VertCache.g(V4), VertCache.b(V4)) Gl.glTexCoord2f(VertCache.u(V4) * TextureWRatio, VertCache.v(V4) * TextureHRatio) Gl.glVertex3f(VertCache.x(V4), VertCache.y(V4), VertCache.z(V4)) Gl.glNormal3f(VertCache.r(V5), VertCache.g(V5), VertCache.b(V5)) Gl.glTexCoord2f(VertCache.u(V5) * TextureWRatio, VertCache.v(V5) * TextureHRatio) Gl.glVertex3f(VertCache.x(V5), VertCache.y(V5), VertCache.z(V5)) Gl.glNormal3f(VertCache.r(V6), VertCache.g(V6), VertCache.b(V6)) Gl.glTexCoord2f(VertCache.u(V6) * TextureWRatio, VertCache.v(V6) * TextureHRatio) Gl.glVertex3f(VertCache.x(V6), VertCache.y(V6), VertCache.z(V6)) Gl.glEnd() Else Gl.glBegin(Gl.GL_TRIANGLES) Gl.glColor4f(VertCache.r(V1), VertCache.g(V1), VertCache.b(V1), VertCache.a(V1)) Gl.glTexCoord2f(VertCache.u(V1) * TextureWRatio, VertCache.v(V1) * TextureHRatio) Gl.glVertex3f(VertCache.x(V1), VertCache.y(V1), VertCache.z(V1)) Gl.glColor4f(VertCache.r(V2), VertCache.g(V2), VertCache.b(V2), VertCache.a(V2)) Gl.glTexCoord2f(VertCache.u(V2) * TextureWRatio, VertCache.v(V2) * TextureHRatio) Gl.glVertex3f(VertCache.x(V2), VertCache.y(V2), VertCache.z(V2)) Gl.glColor4f(VertCache.r(V3), VertCache.g(V3), VertCache.b(V3), VertCache.a(V3)) Gl.glTexCoord2f(VertCache.u(V3) * TextureWRatio, VertCache.v(V3) * TextureHRatio) Gl.glVertex3f(VertCache.x(V3), VertCache.y(V3), VertCache.z(V3)) Gl.glColor4f(VertCache.r(V4), VertCache.g(V4), VertCache.b(V4), VertCache.a(V4)) Gl.glTexCoord2f(VertCache.u(V4) * TextureWRatio, VertCache.v(V4) * TextureHRatio) Gl.glVertex3f(VertCache.x(V4), VertCache.y(V4), VertCache.z(V4)) Gl.glColor4f(VertCache.r(V5), VertCache.g(V5), VertCache.b(V5), VertCache.a(V5)) Gl.glTexCoord2f(VertCache.u(V5) * TextureWRatio, VertCache.v(V5) * TextureHRatio) Gl.glVertex3f(VertCache.x(V5), VertCache.y(V5), VertCache.z(V5)) Gl.glColor4f(VertCache.r(V6), VertCache.g(V6), VertCache.b(V6), VertCache.a(V6)) Gl.glTexCoord2f(VertCache.u(V6) * TextureWRatio, VertCache.v(V6) * TextureHRatio) Gl.glVertex3f(VertCache.x(V6), VertCache.y(V6), VertCache.z(V6)) Gl.glEnd() End If End Sub Last edited by cooliscool; 20th September 2009 at 10:42 PM. |
#538
|
||||
|
||||
Quote:
EDIT: Are you ever going to add the ability to export the shaders too? The models look too plain without the shaders, and some scenes need it to blend the textures. Last edited by mojobojo; 5th October 2009 at 06:52 AM. |
#539
|
||||
|
||||
So after a while in a hex editor I happened to move some geometry around in the test map. I made a slope smaller.
![]() |
#540
|
||||
|
||||
One step closer.
![]()
__________________
From where you're kneeling, it must seem like an 18-carat run of bad luck. Truth is... the game was rigged from the start -Benny |
![]() |
Thread Tools | |
|
|