Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: (Actor || Scene).Collision(ACCURATE) throws a null reference exception  (Read 744 times)
freckert
Customers
Community Member
*****
Posts: 26


WWW
« on: March 24, 2008, 12:43:23 PM »

It would be nice to know what the restrictions are on the types of .X files that the _Collision routines work with.  I had to strip several submeshes out of a complex .X file to fix my null reference exceptions.

Is there a cap on the total number of faces or vertices in an Actor?  Is there a cap on the number of faces or vertices in a Group?

I can provide both the problematic and fixed .X files for debugging.
« Last Edit: May 13, 2008, 04:57:16 PM by freckert » Logged
freckert
Customers
Community Member
*****
Posts: 26


WWW
« Reply #1 on: May 13, 2008, 04:56:50 PM »

Only the ACCURATE test throws an exception.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #2 on: May 15, 2008, 12:48:41 PM »

I think it was just a problem with the Actor CPU
It has been fixed and I have tested with several .x files.

Should be ok in the next dll.

Don't forget that if you use that, the engine has to compute the skinning and all that on CPU too Wink
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
freckert
Customers
Community Member
*****
Posts: 26


WWW
« Reply #3 on: May 15, 2008, 01:14:07 PM »

I do not call SetActorMode anywhere, I was under the impression that the default was not CPU.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #4 on: May 16, 2008, 06:38:14 AM »

The default is "fastest/shader"
However to compute "accurate" collision, the engine needs to perform CPU skinning.
(but rendering is still done via faster/shader mode)
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
freckert
Customers
Community Member
*****
Posts: 26


WWW
« Reply #5 on: May 17, 2008, 12:17:24 PM »

If I use ActorMode.CPU with the new build, Collision works.  If I don't set ActorMode, Collision still throws an exception.

Could this be because TV has yet to prepare the CPU-transformed vertices when I call Collision?

Also, disabling Collision groups does not work as expected with Actor.Collision
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #6 on: May 17, 2008, 12:21:03 PM »

Interesting. I have your model if I remember well.
I'm going to test that sometimes this week.

Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
freckert
Customers
Community Member
*****
Posts: 26


WWW
« Reply #7 on: May 17, 2008, 01:13:40 PM »

A clarification on the Collision Group oddity.

It appears that a ray cast (which would normally hit) against a Group which is disabled for Collision (and Rendering) does collide, but reports failure.  So testing stops as soon as it hits a disabled group and does not continue against further groups.

Crappy diagram follows:

ray 1
X--->   |group a|    Q|group b|
---->   |group a|    R|group b|
---->   |group a|    S|group b|
---->   |xxxx  x|    T|group b|
---->   |xxxx  x|    U|group b|
---->   |xxxx  x|    V|group b|
ray 2

If group A is disabled, ray 1 will not report collision at all.  Ray 2 will work properly. 

If xxxx x is empty space:
Picture a series of rays cast from X to Q, R, S, T, U, and V.
XQ, XR, XS, and XT will not hit, while, XU and XV will collide.
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #8 on: May 17, 2008, 01:47:48 PM »

So that issue in the CPU mode right?
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
freckert
Customers
Community Member
*****
Posts: 26


WWW
« Reply #9 on: May 17, 2008, 02:38:59 PM »

Yes, this is in CPU mode in the current build.  I saw this in SHADER mode in the previous build.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks