Questions about physics in GameDemo

Feb 21, 2009 at 8:09 AM
Hi, I just downloaded the engine source last night and started messing around with some of the constant values in the ExamplePlayer.cs and was wondering about the physics and how I would go about affecting the strength of gravity. I figured the best way would be to just increase the mass constant, but that didn't seem to make the player sphere object fall any faster, just made it harder to push.

I was also wondering about the shadowing solution you have implemented and how expensive it is. I'm actually not a programmer by trade, but an artists so my understanding of things is pretty basic. Ideally I'm looking for an engine that can push a fair amount of mesh detail with a static lighting solution (just using baked lightmaps) and using point lights for dynamic objects. Also, does your engine have some way of culling objects such as view frustum culling, portals or visibility triggers?

Btw, I don't know if your looking for feedback on the editor, but from an artists standpoint, the controls are quite frustrating to use. The best control scheme that I've come across for navigation in an editor would have to be Unreal's. All the camera navigation can be done through the mouse without any modifer keys and translating objects is done the same, but only with the Ctrl key used as a modifier.

Unreal Camera & Object Manipulation.

Left Mouse Button + Up / Down = Move the camera forward and back. (The camera is constrained to whatever current elevation it's at, it's not the same as a zoom or a truck. The camera shouldn't move forward in the look axis, but instead move forward along the ground plane. The idea is to simulate the viewpoint from somebody walking.)

Left Mouse Button + Left / Right = Rotate left and right. (Again, when rotating, the camera rotation should rotate around the z-axis and not rotate up and down. Ideally when using the left mouse button movement mode, the viewer should feel like there driving or walking through the space.)

Right Mouse Button = Freelook Mode. (This is the same as any fps look controles.)

LMB + RMB = Pan the camera up / down / left / right (Pan mode is used to change the elevation of the camera.)

Ctrl + LMB = Move object along x-axis.

Ctrl + RMB = Move object along y-axis.

Ctrl + RMB + LMB = Move object along z-axis. (Just as a note, because I am an artist I refer to the z-axis as up and down and not forward and back.)


I was looking at the SceneEditorController.cs to see if I could implement this myself, but I wasn't sure of the best place to put this as you already do input handeling for moving objects and a context menu.
Coordinator
Feb 21, 2009 at 8:41 PM
Hi Jared!

Since Ox uses the JibLibX physics library, your best place to look for physics questions is http://www.codeplex.com/JigLibX.

The shadowing solution is not terribly expensives as far as shadowing solutions go. Maybe it's 20-25% of GPU time. You could implement baked-in shadow maps, but the implementation will naturally be quite technical. As far as mesh detail goes, that's one thing Ox does extremely fast and well. So I wouldn't start worrying about cutting back on rendering features until you actually experience GPU bottleneck problems on your target machine.

Ox uses view frustum culling as well as optional cube or quadtree scene partitioning.

You know that the WASD keys are used in the Scene Editor, right?

The editors are relatively new and still need a lot of work. I'll consider implementing your suggested control scheme. I am planning to implement view transformation via the middle mouse button with the current set-up. Perhaps a hybrid of some sort is possible. Either way, the control scheme is quite ripe for improvement.
Feb 21, 2009 at 8:50 PM
Edited Feb 21, 2009 at 8:55 PM
Thanks for the speedy reply, I'll look more into the cube an quadtree partitioning, sounds interesting.

Yeah, I was able to use the current control scheme just fine, I've used other editors with similar control schemes so it's just a matter of getting used to it. But the main thing I like about unreal's is that it allows you to do all the navigation with one hand and the other is free for modifier keys. It makes a big difference in your workflow when constructing environments.

Oh yeah, I just wanted to mention I bought Torque X awhile ago and I've been pretty disappointed with the lack of support and updates (not even xna 3.0 compatiable yet.) I have to say in comparison your engine in the 3D department is kicking it's butt.
Coordinator
Feb 22, 2009 at 11:21 AM
Hi again!

Just wanted to let you know that I'm improving the heck out of the editor control scheme for the next release. The next release was supposed to be out today but I figured this issue was more than important enough for a delay :)

Basically what we will have is the middle mouse button doing most of the view manipulation. I totally eliminated the the use of the WASD keys :P Now you can have one hand on the arrows / modifiers and one hand on the mouse. The old control scheme was very thrown together.

Essentially I'm modeling the controls after 3DS Max. I find it pretty natural to use, though maybe it's because it's my home modeler :) Down the road I am going to have a Max-like widget for manipulating objects. It all takes time though.

When you download the new release, please give me an idea as to how natural you find the controls to be.

It's actually quite surprising to hear someone compare Ox to a commercial engine :) Hopefully this doesn't inspire GG to rise up and uber-kick my engine's arse too hard in return :)