TG2 Crashes when...

Started by TheBadger, August 28, 2012, 07:44:18 AM

Previous topic - Next topic

TheBadger

Hi jo,

Last thing on this from me. I wanted to say that I got the models into TG2 by first importing them into Blender and then importing the new .obj from blender to TG2.
This method seems to fix things, just about all of the issues I was seeing out of hexagon have been fixed this way. The models look just as they should in TG2.
I read in the forums that other people have had to do this for other reasons. All the reasons seem to have nothing really to do with TG2. Something about how the different modelers deal with coding?

My question is did you happen to check the model that was working, can you explain why it does work? Are the number (values) you mentioned corrected?
Just wondering.

Thanks for all your help and attention on this.
It has been eaten.

jo

Hi Badger,

I can't tell you why the fixed files work apart from the fact that they have proper values in them. My guess is that Blender isn't "fixing" the files as such, it's simply ignoring the bad values or changing them so they're reasonable when it loads the file. It writes the file out with proper values. I would suspect that the file generated by Blender is not exactly like the original model in some small way though.

I'll tell you what the problem was. OBJ files working by having lists of all the vertices, normals and tex coords. When a polygon is defined in the file it's done using numbers which refer to an item in one of those lists. For example, a polygon might be defined like this:

face 34 35 36

That means there is a 3 sided face or polygon made of vertices that are the 34th, 35th and 36th items in the vertex list. The problem in the files that crashed was that one or more of those numbers was more or less than the  number of vertices in the list. Lets say you have 4000 vertices. The bad values in the file were numbers like 103821 (for example :-), way more than the actual number of vertices. TG2 should not have crashed due to this however, it should having ignored those problematic values.

BTW, anyone who knows the OBJ format will realise my description above is not really accurate, but it explains the basic idea.

Regards,

Jo