xdaniel Posted August 28, 2011 Share Posted August 28, 2011 (edited) Current release: http://code.google.c...Ocarina-v06.rar Source code: http://code.google.c...se/#svn%2Ftrunk Requires .NET Framework 4.0, the Readme is there for a reason, program contains bugs. Edited January 19, 2012 by xdaniel Link to comment Share on other sites More sharing options...
DeathBasket Posted August 28, 2011 Share Posted August 28, 2011 I'm not sure what's causing it but sometimes the camera speed will randomly increase. Also files (at least for the demo) seem to be loaded from the program's directory rather than the XML's. Criticisms aside, I can't wait to try this tool out properly. Link to comment Share on other sites More sharing options...
SanguinettiMods Posted August 28, 2011 Share Posted August 28, 2011 Room 118 doesn't change at all. When I try and change the scene changed, I can only enter 4 digits of the injection offset. Nothing Changes. Help? Link to comment Share on other sites More sharing options...
Okami Amaterasu Posted August 28, 2011 Share Posted August 28, 2011 I don't know how to make XML files so I can't use this yet it seems. The demo works though. Also the same thing DeathBasket was talking about is happening to me. Link to comment Share on other sites More sharing options...
Arcaith Posted August 28, 2011 Share Posted August 28, 2011 Re-pinning done :3 Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 Emergency bugfix build thingy: http://magicstone.de/dzd/random/SharpOcarina-v01-b.rar I'm not sure what's causing it but sometimes the camera speed will randomly increase. Also files (at least for the demo) seem to be loaded from the program's directory rather than the XML's. Criticisms aside, I can't wait to try this tool out properly. The directory confusion should hopefully be fixed now; added some checks to the .obj parser (is path relative or absolute, etc.) No idea about the camera speed problems, tho. Room 118 doesn't change at all. When I try and change the scene changed, I can only enter 4 digits of the injection offset. Nothing Changes. Help? The injection offset bug has been fixed, bug in the respective control's setting (only allowed 4 digits, now does 8). I don't know how to make XML files so I can't use this yet it seems. The demo works though. Also the same thing DeathBasket was talking about is happening to me. The XML files are created by using the program, so once you've got a model for a map done, play around a bit. All other bugs - and it appears there'll be quite a few... - will have to wait until later, 2:18 isn't the time to fix them. Link to comment Share on other sites More sharing options...
SanguinettiMods Posted August 29, 2011 Share Posted August 29, 2011 It only injects over room 117. The BGM stays at 2, and My Room doesn't appear, I can't really test the collision out all that much, because Link Freezes when I move so far. Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 It only injects over room 117. The BGM stays at 2, and My Room doesn't appear, I can't really test the collision out all that much, because Link Freezes when I move so far. Did you press enter after changing the scene number, BGM, etc? If no, it says so in the Readme. Only thing I can imagine being the problem. As for the collision, I didn't have any problems with the maps I used for testing, but I guess it's still not producing perfect collision data then... Link to comment Share on other sites More sharing options...
Arcaith Posted August 29, 2011 Share Posted August 29, 2011 Sanguinetti, are you getting the collision problems with the included obj files, or your own? It might be a problem with the obj file. Link to comment Share on other sites More sharing options...
spinout Posted August 29, 2011 Share Posted August 29, 2011 https://bitbucket.org/ottehr/z64-tex-ext - should be ready. I'll try this out as soon as I'm in windows - which should be soon, potentially tonight. Link to comment Share on other sites More sharing options...
SanguinettiMods Posted August 29, 2011 Share Posted August 29, 2011 I'm not getting a problem with the collision, it's that the game freezes whenever I load the Room. >I load the room >Link Spawns >I move barely an inch >The Game Freezes Only the collision file loaded, if it was even the right one, The Textured Geometry doesn't load. Link to comment Share on other sites More sharing options...
Zeth Ryder Posted August 29, 2011 Share Posted August 29, 2011 Material reading location doesn't work, causes exception error. Sometimes materials(especially ones from sketchup) export the obj file and material file together then create a folder with the same name in the same directory for all the textures. Saving scene with XML, doesn't save the custom environment as well, for some reason, environment barely changes from what I can tell, especially since I want to change fog density(unless this hasn't been implemented yet) For some reason, the game crashes randomly if I go to a specific point in the map, not sure why o-O Despite the few bugs, its pretty spot on with a lot of stuff and seeing correct texture conversion makes me happy, especially 64x64 textures! Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 Material reading location doesn't work, causes exception error. Sometimes materials(especially ones from sketchup) export the obj file and material file together then create a folder with the same name in the same directory for all the textures. Saving scene with XML, doesn't save the custom environment as well, for some reason, environment barely changes from what I can tell, especially since I want to change fog density(unless this hasn't been implemented yet) For some reason, the game crashes randomly if I go to a specific point in the map, not sure why o-O Yeah, that's another bug in the material parser or rather texture loader. I fixed it - my test case has .obj and .mtl files in one folder, which has a subfolder named "Textures" where those are stored, which is similar to what you described -, but I will wait with another build until some more reports of bugs and the like come in. Hm? It does save environment changes. Also with regards to fog density, did you press enter after changing the fog value? I know it's annoying - and I'll look into changing the behaviour to also apply changes when those textboxes lose focus - but it's necessary for the time being. I have just tested both, saving environment setting changes to XML and increasing the fog density, and it works. The thing is - as mentioned in the Readme - the draw and fog distance values are kinda sensitive (in my opinion almost unpredictable), so you tend to have to experiment (ex. the lower the value, the closer the fog is, but don't set it too low, etc) Probably faulty collision, seeing how the code for collision normals isn't much different from spinout's (besides being rewritten in C#). Not much I can do at this point... Link to comment Share on other sites More sharing options...
Arcaith Posted August 29, 2011 Share Posted August 29, 2011 I'm having a couple of bugs. First off, I'm getting the non-loading textured geometry, but not the freezes. Second, with some of my model exports, the importer crashes when I load the obj file. Here's the error. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException() at SharpOcarina.ObjFile.DrawTriangle(Triangle Tri) in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\ObjFile.cs:line 677 at SharpOcarina.ObjFile.DrawHighlightedTriangle(Triangle Tri, Color4 Color, Boolean Outlined) in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\ObjFile.cs:line 658 at SharpOcarina.ObjFile.DrawTriangle(Triangle Tri, Material Mat) in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\ObjFile.cs:line 645 at SharpOcarina.ObjFile.PrepareDisplayLists() in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\ObjFile.cs:line 611 at SharpOcarina.ObjFile.ParseObj(String Filename) in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\ObjFile.cs:line 373 at SharpOcarina.ObjFile..ctor(String Filename, Boolean IgnoreMats) in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\ObjFile.cs:line 41 at SharpOcarina.MainForm.button4_Click(Object sender, EventArgs e) in C:\Dokumente und Einstellungen\Daniel\eigene dateien\visual studio 2010\Projects\MapDev\MapDev\MainForm.cs:line 916 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.1 (RTMRel.030319-0100) 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:///D:/Daniel/Desktop/SharpOcarina/MapDev.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel 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.1 built by: RTMRel 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.1 built by: RTMRel 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:///D:/Daniel/Desktop/SharpOcarina/OpenTK.DLL ---------------------------------------- OpenTK.GLControl Assembly Version: 1.0.0.0 Win32 Version: 1.0.278.44921 CodeBase: file:///D:/Daniel/Desktop/SharpOcarina/OpenTK.GLControl.DLL ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.1 built by: RTMRel 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 this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 Arcaith: Hrm, could you send your model over? I can see why it crashes - somehow going out of range while (most likely, because that's the only "unchecked" part in the DrawTriangle function) trying to select the vertices to render - and at least prevent the crash from the exception message alone, but I guess I need the model to properly debug and fix this. Link to comment Share on other sites More sharing options...
Arcaith Posted August 29, 2011 Share Posted August 29, 2011 I've discovered the reason behind the nonshowing gfx polygons; when there's only one group in the obj file. These files cause a crash. http://www.sendspace.com/file/jjhzhm Additional: If you have a spare moment, could you add the ability to disable backface culling for things like fences when you do the fix? Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 First, I suppose I fixed the crash, but I cannot say for sure where that texturing glitch comes from on the first screenshot: And second, I'll add an option to toggle backface culling per group later on, not much of a problem I guess. Link to comment Share on other sites More sharing options...
Arcaith Posted August 29, 2011 Share Posted August 29, 2011 I think that glitch is because the texture is 64x64. I'm more or less certain that 64x64 is only supported for indexed textures. Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 Yep, that's it. Halved the height and it imports correctly. 64x64 works as long as the texture has 16 colors or less (4-bit CI), but this one has I think 111 unique colors. The FAQ has one or two more hints about this under "What texture sizes and formats are supported?" (like trying to make use of grayscale textures, they can be rather big) Edit, backface culling now selectable: Link to comment Share on other sites More sharing options...
SanguinettiMods Posted August 29, 2011 Share Posted August 29, 2011 Alright, I got my map to load, Finally! (Thank you Arcaith!) But there still remains the problem, Why does it freeze when I got to far? Arcaith's test dungeon didn't. Link to comment Share on other sites More sharing options...
Zeth Ryder Posted August 29, 2011 Share Posted August 29, 2011 Alright, I got my map to load, Finally! (Thank you Arcaith!) But there still remains the problem, Why does it freeze when I got to far? Arcaith's test dungeon didn't. My guess is that its related to using sketchup then cause Arcaith builds his models via 3DSMax Link to comment Share on other sites More sharing options...
SanguinettiMods Posted August 29, 2011 Share Posted August 29, 2011 Is may be possible to import the SketchUp model into 3DS Max, and then Re-Export it? Link to comment Share on other sites More sharing options...
xdaniel Posted August 29, 2011 Author Share Posted August 29, 2011 1) SharpOcarina v0.2 released: http://magicstone.de/dzd/random/SharpOcarina-v02.rar (still binary only, as there's still too many bugs for my liking...) - Bugfixes in model and material parser, texture loader and a few other places - Backface culling can be disabled/enabled per group - Minor changes in Display List generation 2) SanguinettiMods, just for the record - because that threw me off before as well -, you did try to import your map into a fresh, unpatched Debug ROM and did not load a savestate ex. to get to the map select faster? I had weird collision issues with one of the problem maps Arcaith posted once, because I used a savestate from a different Debug ROM to access map select. The map worked, but it froze when I went to certain places, and some collision polygons were defined as exits which froze the game because there was no exit table defined. Link to comment Share on other sites More sharing options...
LEepicPOULET Posted August 29, 2011 Share Posted August 29, 2011 this may sound like a stupid question, but does the converter work with majora's mask? pleeeez reply. Link to comment Share on other sites More sharing options...
spinout Posted August 29, 2011 Share Posted August 29, 2011 It only directly supports Master Quest debug at this moment, though 99% of what it produces is compatible with Majora's Mask. Not capitalizing is one thing but this whole pleeeez business is getting to me. Link to comment Share on other sites More sharing options...
Recommended Posts