Jump to content
  • 0

Map modelling tips and help


john_smith_account
 Share

Question

Recommended Posts

  • 0

Ok this is rather frustrating, "none" of the maps that export from Ozmav2 show up with textures in anything I've used in several programs, I even tried Ozmav r76 which is what JSA was using and absolutely nothing. I get the model(which shows up tiny) and still no textures. I've even tried using Tig's importer and nothing either. I even switched the map commands just incase, same thing.

 

I had this problem too, Zeth. Here's the fix I found and posted earlier (look a few posts up) in this same thread:

 

And again, nevermind... I've figured out a somewhat useful process to get OBJ dumps from OZMAV2 working with TIG's OBJ Importer for SketchUp. The imports are not flawless, though, there are quite a few texture errors but either program could be to blame. Anyways, after about an hour of research about the processes of TIG's importer and the format of OBJ and MTL files in general here's how I found a workaround:

 

Simply replace all instances of map_Ka in the MTL file produced by OZMAV2 with map_Kd. It turns out that TIG really likes parsing and creating OBJ and MTL files in a certain way, the usage of map_Kd being one of the commands (not really sure what to call it) he's most suited to.

 

Link to comment
Share on other sites

  • 0

I am sorry for the double post...

 

I just moved one of my older, ungrouped rooms (or room complexes) with one of its corners to 0,0,0 (it's not its extreme/outer corner but the room isn't a cube so...), then I made all of the groups and didn't move the room at all. There are still texture errors.

 

I think I have misunderstand something...

Link to comment
Share on other sites

  • 0

Sorry, that doesn't work. They have to be built at 0,0,0, then grouped and then you can move them.

 

If the error is small, like 1 or 2 walls, you can: Delete the poly with the error. Make a new wall at 0,0,0. Cut and paste the replacement wall into place.

 

Like I said, fixing errors in old maps is much harder than building new ones.

Link to comment
Share on other sites

  • 0

give it to who? and what do you mean when you say they should have caught it?

 

Give it to the people reading this thread, including the author of SharpOcarina (myself). And I presume haddockd means I should've caught it in the program's code, using a try-catch statement which can catch those exceptions and deal with them internally, so that the user doesn't get a mean dialog box like that. Which he's right about, I'm using try-catch far too little...

Link to comment
Share on other sites

  • 0

i did scale it down and it didnt really help at all :/(heres the error i get)

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.IndexOutOfRangeException: Index was outside the bounds of the array.   at SharpOcarina.ObjFile.ParseObj(String Filename) in C:Dokumente und EinstellungenDanielEigene DateienVisual Studio 2010ProjectsMapDevMapDevObjFile.cs:line 275   at SharpOcarina.ObjFile..ctor(String Filename, Boolean IgnoreMats) in C:Dokumente und EinstellungenDanielEigene DateienVisual Studio 2010ProjectsMapDevMapDevObjFile.cs:line 41   at SharpOcarina.MainForm.button4_Click(Object sender, EventArgs e) in C:Dokumente und EinstellungenDanielEigene DateienVisual Studio 2010ProjectsMapDevMapDevMainForm.cs:line 1050   at System.Windows.Forms.Control.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnClick(EventArgs e)   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ButtonBase.WndProc(Message& m)   at System.Windows.Forms.Button.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------MapDev    Assembly Version: 1.0.0.0    Win32 Version: 1.0.0.0    CodeBase: file:///C:/Users/dsfGldf'gdfgdfg/Documents/Everything/0E/tools/Hacks%20Tools/MapDev.exe----------------------------------------System.Windows.Forms    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1002 built by: RTMGDR    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1001 built by: RTMGDR    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.1001 built by: RTMGDR    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------OpenTK    Assembly Version: 1.0.0.0    Win32 Version: 1.0.278.44921    CodeBase: file:///C:/Users/dsfGldf'gdfgdfg/Documents/Everything/0E/tools/Hacks%20Tools/OpenTK.DLL----------------------------------------OpenTK.GLControl    Assembly Version: 1.0.0.0    Win32 Version: 1.0.278.44921    CodeBase: file:///C:/Users/dsfGldf'gdfgdfg/Documents/Everything/0E/tools/Hacks%20Tools/OpenTK.GLControl.DLL----------------------------------------System.Xml    Assembly Version: 4.0.0.0    Win32 Version: 4.0.30319.233 built by: RTMGDR    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration>    <system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.

 

 

Link to comment
Share on other sites

  • 0

I really do think it has something to do with your OBJ file and not a problem with the program. Would you mind uploading the SketchUp or OBJ file?

sure, heres the files. (contains both the sketchup and obj)

http://www.mediafire.com/?su44lli1b1t5452

 

the weird thing though is that before this, i imported a successful map. everything worked and i got no errors. after i tried to open this map, i got the error and it didnt work. i tried opening the old map i successfully imported and if gave me the error for that too

Link to comment
Share on other sites

  • 0

xDan,

 

IndexOutOfBounds...

 

Are you manually indexing or accessing arrays? Why not use Lists? They are easy to work with ;)

 

And yes I was referring to Try/Catch blocks but I was just being a smarty pants  :rolleyes:

well see im very VERY new to this, so i have no idea what indexing or accessing arrays does, how to use lists or anything. all i know is making the map, putting it in sharp ocarina, and injecting it. very yknow.. basic lol

Link to comment
Share on other sites

  • 0

xDan,

 

IndexOutOfBounds...

 

Are you manually indexing or accessing arrays? Why not use Lists? They are easy to work with ;)

 

And yes I was referring to Try/Catch blocks but I was just being a smarty pants  :rolleyes:

 

As he appears to be using SO v0.6 (thus r17), line 275 of ObjFile.cs should be:

 

StreamReader SR = File.OpenText(Filename);

 

What? :blink:  Not to mention, File.OpenText isn't even supposed to throw an IndexOutOfBoundsException!

 

EDIT: Alright, got the map, gonna try and debug this...

 

EDIT 2: Okay, two things: I have no idea what build of SO he's using. On my local source, it bails on line 362, which is also line 362 in r17 (= v0.6) on the SVN. Next, the .obj file does something that's apparently valid, but that I hadn't seen before:

 

f 95/121/3 96/122/3 97/123/3 98/124/3 99/125/3 100/126/3 101/127/3 102/128/3 103/129/3 104/130/3 105/131/3 106/132/3 107/133/3 108/134/3 109/135/3 110/136/3 26/137/3 25/138/3 28/139/3 27/140/3 30/141/3 32/142/3 31/143/3 34/144/3 36/145/3 35/146/3 38/147/3 40/148/3 39/149/3 42/150/3 44/151/3 43/152/3 46/153/3 48/154/3 47/155/3 50/156/3 52/157/3 51/158/3 54/159/3 56/160/3 55/161/3 57/162/3 59/163/3 58/164/3 60/165/3 61/166/3 6/167/3 4/168/3 111/169/3 112/170/3

 

...it's got a whole lot of indices on a single face definition line, which the triangulation code doesn't like; namely three temporary arrays with 16 elements each, used for vertex, texture coordinate and normal indices.

 

Haaa, I guess I'll see about pushing out one final "this isn't in development anymore!" SO update -.-

Edited by xdaniel
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.