Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: RazorsKiss on January 22, 2007, 05:03:10 pm
-
Assert: is_valid_vec(&pi->rotvel)
File: J:\src\cvs\fs2_open_3_6_9.final\code\Physics\Physics.cpp
Line: 562
{This filename points to the location of a file on the computer that built this executable}
Call Stack:
-------------------------
physics_sim() obj_move_call_physics() obj_move_all() game_simulation_frame() game_frame() game_do_frame() game_do_state() gameseq_process_events() game_main() WinMain() WinMainCTStartup() kernel32.dll 7c816fd7()
This was with 3_6_9 standard, not debug, so I don't have a spew for it. It poitns to, it looks like, this block of code:
Assert(is_valid_vec(&new_vel));
pi->rotvel = new_vel;
tangles.p = pi->rotvel.xyz.x*sim_time;
tangles.h = pi->rotvel.xyz.y*sim_time;
tangles.b = pi->rotvel.xyz.z*sim_time;
// If this is the viewer_object, keep track of the
// changes in banking so that rotated bitmaps look correct.
// This is used by the g3_draw_rotated_bitmap function.
if ( pi == Viewer_physics_info ) {
switch(Physics_viewer_direction){
case PHYSICS_VIEWER_FRONT:
Physics_viewer_bank -= tangles.b;
break;
case PHYSICS_VIEWER_UP:
Physics_viewer_bank -= tangles.h;
break;
case PHYSICS_VIEWER_REAR:
Physics_viewer_bank += tangles.b;
break;
case PHYSICS_VIEWER_LEFT:
Physics_viewer_bank += tangles.p;
break;
case PHYSICS_VIEWER_RIGHT:
Physics_viewer_bank -= tangles.p;
break;
default:
Physics_viewer_bank -= tangles.b;
break;
}
if ( Physics_viewer_bank < 0.0f ){
Physics_viewer_bank += 2.0f * PI;
}
if ( Physics_viewer_bank > 2.0f * PI ){
Physics_viewer_bank -= 2.0f * PI;
}
}
Any pointers on what it's trying to tell me? (and feel free to ask any questions you like)
-
I've actually gotten this one, but it was serveral months ago and I don't remember how I fixed it.
I do recall that it tended to happen when a certain ship died.
-
Yes, it is a particular ship dying - our "Manta".
-
I think I remember a work-around for this... but I'm not sure.
What I did was I got the ship completely set up through Max->pof. Then, I took just the hull and ran it Max->3ds->cob->pof.
Then, I did a global data import from the first one into the second one. Then, the second one worked fine.
I don't know if this will work for you, or even if this is the best way to fix it. It worked for me, and I didn't take the time to look for a better way of doing it.
NOTE: This entire post is based on my memories of the model conversion I did several months ago. As such, take anything in it with a grain of salt. If BtRL decides they want me as a model converter, then I'll be able to help you better.
-
my guess is that something is a zero that shouldn't be.
I'm thinking radius, but I don't have anything concrete to base that off of.
if that is a release build then it should not be throwing assertions.
-
The max converter creates unstable shield meshes for one reason or another...... from what ive read.
-
Is_valid_vec() checks for NaN values. The most likely cause of this error is from some invalid model data. I've seen it numerous times when one or more of the MOI values for the model is NaN. If even one value is NaN, and it gets through the loading code, it will propagate to all other parts of the relavant code and create other NaN values.
So just verify in ModelView32 or something that none of the values that you can find are something like "-nan(0x??????)". If you find one, change it to a proper value (or just 0.0) and see if that fixes it in-game.
-
"-1.#QNAN000000000000000" was the MOI in question. You were absolutely right.
taylor = the bomb :D
Thanks folks.
-
BTW MOI is a matrix so if you are going to give it a default value, all zeros is NOT the best idea, a diagnal of 1s I think would be best from upper left to lower right.
-
BTW MOI is a matrix so if you are going to give it a default value, all zeros is NOT the best idea, a diagnal of 1s I think would be best from upper left to lower right.
So, say...
1.000... | 0.000... | 0.000...
0.000... | 1.000... | 0.000...
0.000... | 0.000... | 1.000...
?
-
Any particular reason for this?
-
Any particular reason for this?
It's just the way matrix math works.
-
What I mean is, why shouldn't I use all zeros, and what advantages will using this diagonal 1 thing get me?
-
Actually, all zeros is probably the safest option unless it's a fighter. The MOI controls the rotational component of the knockback effect from weapons and making it zero will prevent the ship from spinning when hit (although it can still move).
-
All my so-far-modded ships are fighters, so, yeah :D