Closed GoogleCodeExporter closed 9 years ago
If you post your code and the offending mesh I can try it out here to see what's
going wrong.
Original comment by Mike.Popoloski
on 9 Dec 2009 at 5:08
Here is a biped animation from max exported as a .x file.
Let me know how you get on.
Thanks.
Original comment by daveemm...@hotmail.com
on 9 Dec 2009 at 6:47
Attachments:
Sorry, forgot to mention that this .x file shows with the animation in the
directx
sdk .x viewer ok.
Original comment by daveemm...@hotmail.com
on 9 Dec 2009 at 6:48
Using the SlimDX DirectX 9 Skinned sample, show that the model doesn't have any
material.
The exeption throw is in the method of "DrawMeshContainer"
("i" is out of range)
Color4 ambient = extended[combinations[i].AttributeId].MaterialD3D.Ambient;
Color4 diffuse = extended[combinations[i].AttributeId].MaterialD3D.Diffuse;
Color4 emissive = extended[combinations[i].AttributeId].MaterialD3D.Emissive;
I successfully load the model and show the "Bug" or "Ant" ? adding color by
default
to the material.
ambient = System.Drawing.Color.White;
diffuse = System.Drawing.Color.Yellow;
emissive = System.Drawing.Color.Violet;
If you want I can upload the source code.
Sorry for my bad english.
Original comment by ragnar...@gmail.com
on 10 Dec 2009 at 3:58
I have tried using the c# example and it doesnt load the model successfully
(doesnt
get past any of the lines which reference the skininfo variable). I would very
much
appreciate it if you would zip the entire project you are using to show the
animation and attach to a post.
Original comment by daveemm...@hotmail.com
on 10 Dec 2009 at 9:12
Ok, just downloaded c# and ran the sample and it stops on the same line, this
one -
meshContainer.BoneOffsets = new Matrix[skinInfo.BoneCount];
Ragnarsun - you must have edited or changed the sample to get it to work. Can
you
show any changes you have made please ?
Thanks.
Original comment by daveemm...@hotmail.com
on 10 Dec 2009 at 9:26
I don't change any of the source code, only add one or two validation.
Sorry if me source code is a little messy. I add the original directx9 skinned
mesh
source code too.
Original comment by ragnar...@gmail.com
on 10 Dec 2009 at 11:44
Attachments:
Thanks for that.
The sample slimDX version stops and crashes at the same point. It works with
your .x files and the tiny.x file, but the temp.x file does not work with
slimDX.
null reference exception on the skininfo variable.
Your version works, so I will take a look and see whats different. There must
be
something ..... thanks again for this.
Original comment by daveemm...@hotmail.com
on 11 Dec 2009 at 4:51
Ok. If you add in the line to your app -
BoundingSphere bs = Frame.CalculateBoundingSphere(this.RootFrame);
after the SetupBoneMatrices(this.RootFrame) bit your application hangs and
doesnt
display the animation (not always but sometimes, corrupt memory ?). In my vb
app
(and if I trap the error on the above line in your app) you get the message -
Attempted to read or write protected memory. This is often an indication that
other
memory is corrupt.
Any ideas ?
Original comment by daveemm...@hotmail.com
on 11 Dec 2009 at 5:39
BoundingSphere bs = Frame.CalculateBoundingSphere (this.RootFrame);
Forget that line of source code... there was another post about that problem
(Attempted to read or write protected memory) about animations (Not the Skinned
one that
I post). I will try to check after work if I have enought time. Maybe the
slimdx team can enlighten here.
Original comment by ragnar...@gmail.com
on 11 Dec 2009 at 3:58
I took a look and it appears to just be an issue with the sample. The sample
never
checks that each SkinInfo isn't null, while rangarsun's does, so it avoids a
NullReferenceException there. Make similar changes and it will all work.
Original comment by Mike.Popoloski
on 11 Dec 2009 at 7:34
Its 2 things -
1. The sample needs reworking slightly to look after the skininfo == null
2. *But* even then it doesnt work with the model supplied by me. The only way
I
can get it to render and animate (like ragnarsun) is by creating the device
myself
and to not use the sampleframework.
Hope this helps.
Original comment by daveemm...@hotmail.com
on 11 Dec 2009 at 9:58
We aren't supporting that version of the sample framework any longer, so those
changes are unlikely to get made.
Original comment by josh.petrie
on 12 Dec 2009 at 10:37
Its ok, I have it working by creating the device myself, I was just letting you
know
that the sample framework doesnt work with it properly. Not sure why.
Cheers.
Original comment by daveemm...@hotmail.com
on 12 Dec 2009 at 10:46
Ok then, closing this issue.
Original comment by Mike.Popoloski
on 12 Dec 2009 at 11:04
Original issue reported on code.google.com by
daveemm...@hotmail.com
on 9 Dec 2009 at 11:31