I still have to look at the code, but it appears both the
exporter and importer are performing a 'flip', since WorkSpace
is a left-handed coordinate system.
I'll have to check my code and comments, notes, conversations,
etc. because, I recall I had this concern for awhile, about
handedness, and how to deal with it. I may very well have
mis-handled it. It may be, that dealing with handedness is not
necessary at all. Another possibility is to see if I can determin
the 'winding' of the vertices, prior to processing. The winding
will tell me the handedness. I'll get it done.
OBJ Importer/Exporter Plug-in Oddities
-
- Captain
- Posts: 1555
- Joined: 21 May 2009, 19:26
- Type the number ten into the box: 0
- Location: Germany
Re: OBJ Importer/Exporter Plug-in Oddities
Hi froo,when you have this sorted iwould like to get it.dont make yourself
crazy with it like you do with your triangles
crazy with it like you do with your triangles
Re: OBJ Importer/Exporter Plug-in Oddities
Sounds good pugman.
I scanned through the code to remember what I was doing, and why.
There were some problems with the triangle count being correct, while
the data was being imported. I still don't know why this was the case.
But, if I loaded the triangles in the reverse order to the triangulator, the
count was correct. A valid triangle count is required. Otherwise tS crashes.
It is either my code, or a bug in the triangulator. Even Tomas stated, 'I shouldn't
have to do that', referring to ordering the triangle edges in reverse order to 'get
it to work'. Well, that's what I had to do.
I scanned through the code to remember what I was doing, and why.
There were some problems with the triangle count being correct, while
the data was being imported. I still don't know why this was the case.
But, if I loaded the triangles in the reverse order to the triangulator, the
count was correct. A valid triangle count is required. Otherwise tS crashes.
It is either my code, or a bug in the triangulator. Even Tomas stated, 'I shouldn't
have to do that', referring to ordering the triangle edges in reverse order to 'get
it to work'. Well, that's what I had to do.
Re: OBJ Importer/Exporter Plug-in Oddities
Found the header file I modified which includes the GUIDs for the 'texture' connectors:
Alpha, Color, etc. With that, I should be able to compile and debug. Find out what the
hell is wrong with this thing.
Let's see... I think Clinton made some model importers too. Maybe I can ask him how
he did it, in script/plugin.
Alpha, Color, etc. With that, I should be able to compile and debug. Find out what the
hell is wrong with this thing.
Let's see... I think Clinton made some model importers too. Maybe I can ask him how
he did it, in script/plugin.
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: OBJ Importer/Exporter Plug-in Oddities
You can ask , but I kept it deliberately simple, ie easy on myself. So none of my importers support concave faces like your obj importer.froo wrote:...
Let's see... I think Clinton made some model importers too. Maybe I can ask him how
he did it, in script/plugin.
Re: OBJ Importer/Exporter Plug-in Oddities
ah ok Clinton.
Do you have to handle orientation of the application (left vs. right handedness) on import?
Do you have to handle orientation of the application (left vs. right handedness) on import?
Re: OBJ Importer/Exporter Plug-in Oddities
Thanks for those pics also Steinie.
Looks like there is a 'mirror effect' going on. The sign of each vertex x-coordinate
is wrong, so it looks like we are looking at the object from the opposite side.
For what that's worth.
I'll check it.
Looks like there is a 'mirror effect' going on. The sign of each vertex x-coordinate
is wrong, so it looks like we are looking at the object from the opposite side.
For what that's worth.
I'll check it.
- Steinie
- Captain
- Posts: 2913
- Joined: 21 May 2009, 17:38
- Type the number ten into the box: 10
- Contact:
Re: OBJ Importer/Exporter Plug-in Oddities
Well I sure hope you can find a solution because it really is one of my most used plugins.
Thanks for putting in the effort for us Froo!
Thanks for putting in the effort for us Froo!
- clintonman
- Captain
- Posts: 5432
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: OBJ Importer/Exporter Plug-in Oddities
Yep, pretty much. In a lot of cases I end up taking the negative of the X positions. I think a lot depends on where it's coming from too. Y-up vs Z-up, right vs left handed. In fact I think there may be something weird with trueSpace in the handedness area. I tried to figure it out once but something was backward.froo wrote:ah ok Clinton.
Do you have to handle orientation of the application (left vs. right handedness) on import?
Re: OBJ Importer/Exporter Plug-in Oddities
No problem Bob.
I am very sorry that I didn't get to this sooner.
For testing, I did this:
While processing / reading the OBJ file, I multiply the x coordinate by -1.
That seems to work, but now each face of danperk's cube is facing the wrong
way. The good thing is, each letter is facing the right direction.
Sonofabitch. I just did what clinton did. haha!
I am very sorry that I didn't get to this sooner.
For testing, I did this:
While processing / reading the OBJ file, I multiply the x coordinate by -1.
That seems to work, but now each face of danperk's cube is facing the wrong
way. The good thing is, each letter is facing the right direction.
Sonofabitch. I just did what clinton did. haha!