Page 16 of 74

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 5:49 am
by Isaac
Bek wrote:Toggle Human Scale reference: Similar to how Marmoset Toolbag's feature, it would be good if there was a toggleable human scale reference in the viewport, so you could tell if you object is scaled correctly. Perhaps for Grimrock it would make more sense to have scale in meters though, with 3m being the top of the roof and 0 being the floor.
The walls are 3 meters, humans are (typically) 1.77 meters; we could model mannequin to load as a 'background' model in the Toolkit.

** In step with your idea... that could even become an included feature of the app; to 'turn on' the mannequin; a second background model; (although it should really just be a textured plane).

Edit:
Here is a mannequin model that is scaled to about the size of the Uggardian mesh. This can be used as a background model to give a human size scale comparison.
ImageImage
(@Dr.John: Feel free to add this to the toolkit if you like. It might be neat to have a one click access to this as a built in model. 8-) )

**There may be texture problem that I don't know of, as I cannot run the 0.1.0.10 version of the toolkit to test it. :(

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 10:47 am
by JohnWordsworth
@Tomm, @Isaac: Ahh, I see why the Normal Maps aren't working, that's because OBJ files don't support tangent/bitangent data on vertices. I will have to regenerate them myself after an OBJ import - fortunately, this seems like a pretty straightforward task.

@Komag: I forgot to say "Alt+Print Scr", that's awesome. I never knew that!

@Isaac: Hrm, that's a bit annoying. You should be able to have the .Net 2 and .Net 4 versions side-by-side. This is clearly a SlimDX install issue. You do not appear to be the only one who has had this problem in the past though (but it does seem very rare!). Are you running Vitsa 64 by any chance? There is a thread here (http://www.gamedev.net/topic/536680-sli ... 09-update/) with someone having similar problems. It looks like the SlimDX installer fails to install a dependency from MS. Apparently installing DirectX 9.0c Redistributable for Software Developers to "C:\Users\David\AppData\Local\Temp\DirectX Redist" fixed it for that chap. Alternatively, I might be able to easily just build both SlimDX 4.0 and SlimDX 2.0 versions side-by-side. BTW, I love your little animated gifs!

@crisman: Glad that you got it installed OK :).

@Bek: Some awesome ideas there - many thanks for the feedback. You can add 'background models' to the scene (which allows you to add a floor mesh to the scene for scaling), but I like the idea of adding a mannequin too. I could very easily also add a button which builds a simple room using the asset pack too! Haha - you're right about the keyboard commands, I should document them. I'm going to add your suggestions to a public pivotal tracker system in just a second so that they are on the 'todo' list.

@Isaac: Haha, I like the mannequin. I'll grab that off you if you don't mind :). Very easy to make it something which can be toggled on/off to help with scale.

Public Pivotal Tracker for Grimrock Model Toolkit so that you guys can see what I'm working on / what I've added without me having to remember everything in my head for the changelog!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 12:54 pm
by Isaac
JohnWordsworth wrote:@Isaac: Haha, I like the mannequin. I'll grab that off you if you don't mind :). Very easy to make it something which can be toggled on/off to help with scale.
On the off chance that some didn't notice... I thought I'd mention that the mannequin image is a link to the .model file and texture. ;)

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 1:10 pm
by Bek
So I just noticed that the data view tells you the real (in game) vertex count - that is incredibly useful and not just for Grimrock. Ideally 3d packages would have a function that calculates this, but apparently not.

As an example a sword I have (That wasn't made for grimrock as it was designed for first person viewing) has an in editor vertex count of 1346, but a real count of 3020. (Unfortunately the most complex part of the geometry also requires the most UV and smoothing splits). On the other hand, a sword I've made for grimrock and tried to keep optimised has an in editor count of 212 and a real count of 329. So I'm finding it quite interesting to finally see the real vertex counts of my models. Can I ask what the index count (under vertex count) means?

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 2:47 pm
by Phitt
It's working for me now, thanks (and generally thanks for your work of course)!

But I have other problems now. At first after importing the models were completely messed up, but that fixed itself. I have absolutely no idea why. Anyway, hope it stays that way. But the normals on some parts of the models are still messed up, see here:

http://s66.photobucket.com/albums/h271/ ... eWrong.jpg

Do I need any special export options for the object file format? Did I do anything else wrong? I checked 'normals' on export.

One other problem is that one part of a mesh simply doesn't import (there should be small rocks scattered on the floor, but they don't show up), no matter what I try. When I re-import the obj into my modeling program everything is there, but in game it doesn't show up.

Finally as other people already mentioned normal maps aren't working.

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 2:53 pm
by Blichew
Did you make those tiles all by yourself ? Or they're re-imported :)?

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 3:24 pm
by Phitt
Ok, this is really weird. I got the messed up models again, it seems to happen randomly. Sometimes the walls are completely messed up, sometimes the pillars are messed up (which means vertices are where they're not supposed to be, stretching the mesh in all directions - similar to what you see with an overheated GPU (but that is not the case)). Exported the dungeon and in game everything looks fine, except for the even more noticeable messed up normals.

Now I also got a model with a faulty material. The material is set correctly, both in my modeling program and in the model viewer. But in game it is the wrong material.

If no one else experiences any problems then it has to be my fault, but I wonder what I'm doing wrong. Can anyone show the obj export settings he's using? Anything I need to pay attention to?
Blichew wrote: Did you make those tiles all by yourself ? Or they're re-imported :)?
What do you mean with re-imported? I made them, exported as obj and saved them as model.

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 3:27 pm
by JohnWordsworth
@Isaac: Haha, downloaded - many thanks! Have you had any joy getting SlimDX installed yet?

@Bek: Glad the data view is useful. The index count refers to 3x the number of triangles in the model. As the data has been 'flattened' by the time it's in Grimrock Model format, each mesh's triangles are literally defined as a flat list of indices - each index refers to a point on a triangle.

@Phitt: Your 'Mine' wall-set is looking awesome! Would you be able to send me your OBJ model for me to take a look at? I've not been able to test the GMT with many files yet, and OBJ support is only really 90% complete, so I'm still finding common edge cases that don't work properly / aren't quite done. However, having a sample model that fits that makes it much easier for me to fix / add those features!

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 4:02 pm
by Isaac
JohnWordsworth wrote:@Isaac: Haha, downloaded - many thanks! Have you had any joy getting SlimDX installed yet?
Nope. I can't get it to install.

I can run the recent Toolkit build, but it immediately crashes crashes out with an error.
SpoilerShow

Code: Select all

Event Type:	Error
Event Source:	.NET Runtime
Event Category:	None
Event ID:	1026
Date:		10/5/2012
Time:		8:56:04 AM
User:		N/A
Computer:
Description:
Application: GrimrockModelToolkit.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: SlimDX.Direct3D9.Direct3D9Exception
Stack:
   at SlimDX.Result.Throw[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Object, System.Object)
   at SlimDX.Result.Record[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Int32, Boolean, System.Object, System.Object)
   at SlimDX.Direct3D9.SwapChain.Present(SlimDX.Direct3D9.Present)
   at GrimrockModelToolkit.DirectXView.EndRender(Single)
   at GrimrockModelToolkit.DirectXView.Render(Single)
   at GrimrockModelToolkit.DirectXView.Program_ApplicationIdle(Single)
   at GrimrockModelToolkit.Program.OnApplicationIdle(System.Object, System.EventArgs)
   at System.EventHandler.Invoke(System.Object, System.EventArgs)
   at System.Windows.Forms.Application+ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
   at SlimDX.Windows.MessagePump.Run(System.Windows.Forms.Form, SlimDX.Windows.MainLoop)
   at GrimrockModelToolkit.Program.Main()

Re: [WIP] Grimrock Model Tookit

Posted: Fri Oct 05, 2012 4:51 pm
by Juppstein
Sorry for another stupid question, but did I understand it right in one of the last posts that at the moment the importer does not recognize different meshes in an obj (exported from Blender) file and throws them all together; which in turn would be the reason that there is only one single node/segment in the .model file?

If that would be the case then I could stop staring stupidly at the model viewer, trying to understand what I am doing wrong :roll: