k82l0804 / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

LoadHierarchyFromX No returning MeshContainer #453

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all! I'm loading a *.x model that have an animation. I create the classes:

CustomFrame : SlimDX.Direct3D9.Frame
CustomMeshContainer : SlimDX.Direct3D9.MeshContainer
AllocateHierarchy : SlimDX.Direct3D9.IAllocateHierarchy

But when LoadHierarchyFromX call to create the MeshContainerin for the Frame:

AllocateHierarchy.CreateMeshContainer

And return the MeshContainer, the Frame.MeshContainer and Skininfo is null,
even when SlimDX.Configuration.EnableObjectTracking = true; say both are alive.

I create a manual set to get access to both. I include my source code, I
don't know if I'm wrong or if there is a miss code when the "return
meshContainer" line return the control to directx/slimdx. 

Also I look at the "skinning example", the "[SlimDX] Skinning questions" at
gamedev.net forum, the "Frame::LoadHierarchyFromX throws an
AccessViolationException" issue and found this web page
"http://www.cnblogs.com/donkeywugui/archive/2009/02/05/1384824.html", but
the problem persist and/or the source code from slimdx is different due the
version. 

Do you have a slimdx forums? apart of gamedev.net

Thanks.

Original issue reported on code.google.com by ragnar...@gmail.com on 20 Mar 2009 at 5:45

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not sure I understand the problem. I downloaded the project and it compiled 
and
ran fine. I saw a box on the screen, and after the program had completed I 
checked
the output window, which confirmed that all objects had been properly disposed.

What exactly is wrong here?

Original comment by Mike.Popoloski on 22 Mar 2009 at 3:38

GoogleCodeExporter commented 9 years ago
I've taken a look at your project and got the same effect as Mike. It is hard 
to tell
what you hope to accomplish. 

1. What type of mesh are you loading, static or skinned?
2. What does your mesh look like.
3. You are missing some very important code for rendering a static or skinned 
mesh.

I can't go into all of them here, so I've attached a working file.

Original comment by Grasshop...@gmail.com on 25 Mar 2009 at 4:23

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the answer!

Sorry for my bad explain. let me try again.

I submit the code, but whit out the variable code to get access to dispose the
MeshData and SkinInfo, and add a break point. 2 object's still alive.

http://img128.imageshack.us/img128/3321/framemeshcontainernull.jpg
same image 
http://img128.imageshack.us/my.php?image=framemeshcontainernull.jpg

the question is. 

MeshData and SkinInfo is create and set in the Frame class 
(Frame.MeshContainer),
when the Frame class is create by AllocateHierarchy.CreateMeshContainer. 

Isn't it?

When the control return to the static function 
SlimDX.Direct3D9.Frame.LoadHierarchyFromX, the function set MeshData to NUll, 
and
this result in no access to SkinInfo

Original comment by ragnar...@gmail.com on 25 Mar 2009 at 4:34

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've run it in debug mode and everything looks ok.

http://i190.photobucket.com/albums/z44/JackFandom/ArmatureDebugging.jpg

What build of SlimDX are you using?

Original comment by Grasshop...@gmail.com on 25 Mar 2009 at 6:38

GoogleCodeExporter commented 9 years ago
I'm going to close this as a non-issue. Once March is released, update your 
project
and if there is still a problem, file a new issue here.

Original comment by Mike.Popoloski on 25 Mar 2009 at 5:33

GoogleCodeExporter commented 9 years ago
Hello, there is a possibility that I am having the same issue here.  I can load 
an 
animated mesh (.x) file into my MDX engine fine but when I try and load the 
same .x 
file into the slimdx sample (change tiny.x to my file) I get a skininfo = null 
problem.  Should the sample that is supplied in the documentation load any .x 
file 
with a single animation ?

Thanks.

Original comment by daveemm...@hotmail.com on 9 Dec 2009 at 11:00

GoogleCodeExporter commented 9 years ago
If you are using an old version of slimdx, update to August 2009. Also you can 
download the slimdx sample skinned animation at:

http://www.google.com/codesearch/p?hl=es#jZI2frAhW-
g/trunk/samples/Direct3D9/SkinnedMesh/SkinnedMesh.cs&q=skinned%20package:http://
slimdx%5C.googlecode%5C.com&sa=N&cd=2&ct=rc&l=59&d=2 

You will need to download/copy SkinnedMesh and SampleFramework source code. Can 
add/upload your model for test?

Original comment by ragnar...@gmail.com on 9 Dec 2009 at 4:25