Mapping Ragdoll to Model (DirectX and .X file + PhysX) - directx

I'm trying to create ragdolls using an engine delivered by my teachers. We use DirectX 10, the .X format as mesh file (using assimp and a closed parser designed by the teachers) and Nvidia PhysX.
I've got working animations (mesh deforms oke) and I now I have to create a ragdoll figure in PhysX (references are the Nvidia Lessons). But I'm having issues binding my PhysX ragdoll to my Mesh so when I am in "Seed Mode" my ragdoll follows the animation.
I'm having issues with the positioning the PhysX actors (offset + orientation) and with the animation itself (x-axis rotations works fine, but z and y-axis don't). Maybe there is an issue with the coordinate system, but I'm staring blind at this issue. I hope someone could spot some mistakes with my code or point me in the right direction.
Here is the PhysX bone code that, normally, need to position the PhysX actor to the Mesh Bone: http://pastebin.com/QT8sxuUp
As a notice, the offsets and the transformationMatrices I get directly from the .x file (using the teachers parser offcourse) I also exported the mesh using a LH coordinate system.
This is the result on my screen:

The issue is resolved. The problem was located, as suspected, within the converter. The offset values where wrong.

Related

Placing objects below the ground in AR Quick Look on iOS

I am working on a project that will display objects below the ground using AR Quick Look. However, the AR mode seems to bring everything above the ground based on the bounding box of the objects in the scene.
I have tried using the USDZ directly and composing a simple scene in Reality Composer with the object or with a simple cube with the exact same result. AR preview mode in Reality Composer is showing the object below the ground or below an image anchor correctly. However, if I export the scene as a .reality file and open it in using AR Quick Look, it brings the object above the ground as well.
Is there a way to achieve showing an object below the detected horizontal plane or image (horizontal) using AR Quick Look?
This is still an issue a year later. I have submitted feedback to Apple. I suggest you do too. I have suggested adding a checkbox to keep Y axis persistent. My assumption is this behaves this way to prevent the object from colliding with the ground, but I don't think it's necessary. It's just a limitation right now.

Best way to create custom building's map for iOS

I see some ways to do it:
1) Draw using OpenGL programmatically.
2) Draw using QuartzCore and CoreAnimation programmatically.
3) Draw map in AutoCad and then somehow connect it to iOS.
4) Draw map using SVG.
Requirments are supporting pathfinding and gps navigation.
For first 2 ways I think that it's expensive in terms of performance way, redraw all elements on scaling; and I don't think that this way may have GPS-navigation support.
Using AutoCad pictured maps is hard to understand for me how to connect it with graphs\paths for pathfinding.
My colleagues will develop this app on web using SVG. I found it - https://github.com/SVGKit/SVGKit , but still have no idea how it will support pathfinding and navigation.
I would appreciate any help.
Generally there are two types of map application:
A) They display a map, (with or without a user position) without needing to calculate a path like a navigation system does (see point B)
B) Application that use the vectors of a map and calculate something: e.g to find a best path. The shortest connection, e.g A navighation system , etc.
Application for A) are usually less complex then that of B), because the vectors can be somewhat inacurate, have no conections, have small gaps, have no logic between the edges, etc.
1) To only display a building map, you would only need a list of edges. (An edge is pair of coordinates (x1,y1) - (x2,y2). How ever you get that. E.g MapInfo Professional format mif/mid.
Or even you could dispaly a pdf that contains the map of the builing. Right with the built in PDF View, (also with SVG but more difficult).
Things get much more complicated if it is not a relative map, but also a map that is positioned with an reference coordinate system, like latitude/longitude (WGS84).
In that case you would use a Tool (mapInfoProfessional, to import AutoCad DXF Files, and apply 3 GPS measured reference points at the corner of the house, and convert that to LatLong WGS84 coordinates system.
With ios you cannot measure that 3 Points because you cannot average a position, ios stops sending when you are standing still at one corner of the house.
You could try to extract the positions from a google earth satellite foto if you are living in a region where google Sattelite fotos have high resolution. (But this might violate the license conditions of that Satellite Foto provider (Topic: derived data))
Finally you now have a list of edges in Lat Lon coordinate System.
For Displaying I personally would either do with 1) OpenGL) or 2) Quartz2D.
Now the Path finding part.
Probaly you need a second "map" that defines the possible paths inside the building.
This structure must be a connect graph (points with connected neighbours).
Computer games do it that way. (Some even allow you to display that path in developper mode)
The path can be drawn, in a different layer of the floor plan. But this path
has higher requirements: No gaps are allowed, all must be perfect connected.
Call that layer "Path" and export it as own plan.
Now use only this path layer, and import, and create a graph of nodes with connect neighbours.
Use Dijkstra Algo to search for shortest path.

How to rotate FBX files in 90 degree while running on a path in iTween in unity 3d

I am doing one racing game,in which I used iTween path systems to smooth camera turning in turns,iTween path systems works fine(special thanks to Bob Berkebile) Here first I used one cube to follow path and it works fine in turning But my problem is instead of using cube I used FBX(character) to follow path here when turn comes character will not move This is my problem Image:
I want this type:
How to Slove this problem?

How to make my spider's leg move in XNA

I've done a 3D spider model in Blender, and currently I can export it as a .x(direct X) file and import this .x file into XNA gamestudio and make it shown there as a static model.
Now this project is coming to the final stage, that is, we need to make one of its legs move back and forth in the XNA, however,it only needs to move back and forth, so no keyboard response is required.
We already successfully made one leg of the spider in the Blender has bones and armature and ik constraint, so in Blender, I can drag the leg to move. But now we are really stuck on how to get this move automatically in XNA, we tried exporting it as .x file the same way as before, but this time it won't even show in XNA.
It would be really great if you could give us a little help here, or maybe refer us to some tutorials on how to animate Blender model in XNA, thanks in advance!
here is a pretty good thread in the XNA forums that talks about animating models
http://forums.create.msdn.com/forums/p/53155/322140.aspx

Problems with some textures in XNA

I have made a model using Sketchup, and have tested rendering it using Blender and it looks great.
However loading it in XNA has two problems.
1. One of the textures becomes see-thru not entierly transparent but items below on the inside of the model is visible (this is not the case in blender).
2. I have a rounded part on the model that is divided into smaller parts and the texture gets out of sync (the posisioning is all wrong).
I have tested exporting the model to 3ds and then use blender to save it as fbx (to eliminate any problems with Sketchup).
I have also tried using AutoDesks FBX Converter, same problems =(
I'm using myModel.Draw(World, View, Projection); to render the model.
Any suggestions?
/Jimmy
1)Sounds like a backface culling issue try this
device.RenderState.CullMode = CullMode.None; (try the CW and CCW variants)
also make sure the depth buffer is enabled
2) This may be similar problem to an issue I had with blender when you copy the bones try the gModel.CopyBoneTransformsTo(transforms); as well as gModel.CopyAbsoluteBoneTransformsTo(transforms);

Resources