Rare Witch Roundtable Podcast
Go Back   The Rare Witch Project Forums > Gaming > Rare & Playtonic > Homebrew Games and Tools

Homebrew Games and Tools If you've created a trainer, texture editor, or a full-blown fangame we'd like to see it here. Show off your mad programming skills.

Reply
 
Thread Tools
  #526  
Old 4th September 2009, 04:55 AM
cooliscool's Avatar
cooliscool cooliscool is offline
Dingpot
 
Join Date: Aug 2007
Location: SC, USA
Total Awards: 2
You're Appreciated! INFECTED - B1K1 
Quote:
Originally Posted by Porygon View Post
Thanks for going through the trouble of making a video. I was under the impression the .mtl file was used to tell all the textures where to go. I was trying to import fairly large objects (level-sized things) which is why I wasn't doing the textures manually.
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.
Reply With Quote


  #527  
Old 4th September 2009, 02:28 PM
stickman's Avatar
stickman stickman is offline
Glowbo
 
Join Date: Aug 2008
Location: The Hood, NY
Quote:
Originally Posted by cooliscool View Post
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.
It's weird for me because Blender won't use the .mtl (or at least I haven't figured it out yet) and MeshLab will recognize the .mtl and say that the textures were imported, but nothing happens. I am just cursed with free 3D modeling software.
__________________
Blog | YouTube Channel | Power Nation
Reply With Quote


  #528  
Old 6th September 2009, 07:32 AM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
Quote:
Originally Posted by cooliscool View Post
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.
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.
Reply With Quote


  #529  
Old 20th September 2009, 04:44 AM
cooliscool's Avatar
cooliscool cooliscool is offline
Dingpot
 
Join Date: Aug 2007
Location: SC, USA
Total Awards: 2
You're Appreciated! INFECTED - B1K1 
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. Note that to compile it, you'll have to install the Tao Framework first.

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 04:50 AM.
Reply With Quote


  #530  
Old 20th September 2009, 05:05 AM
stickman's Avatar
stickman stickman is offline
Glowbo
 
Join Date: Aug 2008
Location: The Hood, NY
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 ) and it will be perfect. Great job, man.
__________________
Blog | YouTube Channel | Power Nation
Reply With Quote


  #531  
Old 20th September 2009, 08:07 AM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
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 06:07 PM.
Reply With Quote


  #532  
Old 20th September 2009, 07:56 PM
Breegullbeak's Avatar
Breegullbeak Breegullbeak is offline
Rare Witch Hero
 
Join Date: Apr 2009
Location: A Light House below a city
Total Awards: 10
You're Appreciated! Bashful Imagination Game On Reminiscence 
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
Reply With Quote


  #533  
Old 20th September 2009, 09:07 PM
runehero123's Avatar
runehero123 runehero123 is offline
DJ Jamjars
 
Join Date: Jan 2007
Location: Look behind you...
Total Awards: 1
INFECTED - B1K1 
Downloading source and binary now. And I'm eagerly awaiting DK64 functionality.
Reply With Quote


  #534  
Old 20th September 2009, 09:50 PM
Breegullbeak's Avatar
Breegullbeak Breegullbeak is offline
Rare Witch Hero
 
Join Date: Apr 2009
Location: A Light House below a city
Total Awards: 10
You're Appreciated! Bashful Imagination Game On Reminiscence 
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
Reply With Quote


  #535  
Old 20th September 2009, 11:20 PM
cooliscool's Avatar
cooliscool cooliscool is offline
Dingpot
 
Join Date: Aug 2007
Location: SC, USA
Total Awards: 2
You're Appreciated! INFECTED - B1K1 
Quote:
Originally Posted by mojobojo View Post
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
Yeah. The ones that showed nothing before did so because they lack any display lists, but contain vertices (which is very strange). In that case I just draw the vertices as points since I have no triangle commands to build triangles from.

Last edited by cooliscool; 20th September 2009 at 11:24 PM.
Reply With Quote


  #536  
Old 20th September 2009, 11:25 PM
SubDrag's Avatar
SubDrag SubDrag is offline
McLovin
 
Join Date: Apr 1999
Location: USA
Total Awards: 3
INFECTED - B1K1 Awesome Default Medal Random Award 
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?
Reply With Quote


  #537  
Old 20th September 2009, 11:31 PM
cooliscool's Avatar
cooliscool cooliscool is offline
Dingpot
 
Join Date: Aug 2007
Location: SC, USA
Total Awards: 2
You're Appreciated! INFECTED - B1K1 
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 11:42 PM.
Reply With Quote


  #538  
Old 21st September 2009, 01:20 AM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
Quote:
Originally Posted by cooliscool View Post
Yeah. The ones that showed nothing before did so because they lack any display lists, but contain vertices (which is very strange). In that case I just draw the vertices as points since I have no triangle commands to build triangles from.
Interesting, that explains why they were not showing up in the previous versions. Are you ever going to be able to make them into a viewable model?

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 07:52 AM.
Reply With Quote


  #539  
Old 6th October 2009, 12:00 PM
mojobojo's Avatar
mojobojo mojobojo is offline
Dingpot
 
Join Date: Oct 2008
Location: Georgia
Total Awards: 1
INFECTED - B1K1 
So after a while in a hex editor I happened to move some geometry around in the test map. I made a slope smaller.

Reply With Quote


  #540  
Old 6th October 2009, 10:13 PM
Breegullbeak's Avatar
Breegullbeak Breegullbeak is offline
Rare Witch Hero
 
Join Date: Apr 2009
Location: A Light House below a city
Total Awards: 10
You're Appreciated! Bashful Imagination Game On Reminiscence 
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
Reply With Quote


Reply


User Tag List

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 10:30 PM.


Forums powered by vBulletin® Copyright © Jelsoft Enterprises Ltd.
Website © 2000-∞ The RWP