Hi Shakotay, I coded a script to extract the obj from a model file.Problem is,the output obj (02_test.obj)'s position in space is different from the right obj(which is object0.obj) when preview with a 3D tool.Do you know why this happen and what can I do to fix it?

Attachments:

You do not have the required permissions to view the files attached to this post. Register to gain access.

I seeIn an obj file there are 3 sections : v: vertex position, vn: normals, vt: uvCan you tell me what section affects the y and the z(and the x) coordinate in space of an object?

Edit: When I don't export the normal,the position change when viewing with Online 3D Viewer(my obj got the normal data from the file ).And Blender generated the normal as well,which is saved in that correct file.So every 3D tool generates normal differently I guess

I wrote a function that does the rotation (given x,y,z and degree).I tried rotating Normal coordination but the model's direction stayed the same

Thanks Shakotay2 and ERI619,actually,after the last driver update(which is in 2007,latest one) I can run Blender once.But after I restarted my PC,I couldn't run it again,it said "Unsupport Graphic Driver",this is the same with most OBJ Viewer tool that uses OpenGL,I can run it once.The problem is now solved, I added the following calculations before exporting the obj (to the v section and vn section as well)- Rotate x,y,z by x-axis 180 degree- Swap y and z- Multiply y by -1Edit: I am writing a program that will support exporting the obj from the yobj and also importing the obj as well,I ran into an issue,in a document about the offset of the program.There is a weight data section,I don't know what it means.Basically the v sections are stored like this v x y z 1.0 so I think it has a weight of its own.The normal section doesn't accept weight parameter.And the vt section accepts weight parameter but there are 161 of them,while the weight's total amount of item is 122.I think the weight items are stored like this (float1) (float2) 0.0 0.0 so there are 122*2 = 244.It isn't evenly divisible to any of the amount of items.(Basically this file stores the bone data as well)Do you know what the weights are for,is it okay to ignore it when parsing obj and putting them into the yobj?We'll only replace face object to another face object,arm object to another arm,... but the number of vertices will be increased or decreased

Attachments:

You do not have the required permissions to view the files attached to this post. Register to gain access.

Looks like double faces (maybe foreside and backside?).Swapping means the winding is changed.

You can check such problems in a very simple way:create a copy of the whole wavefront obj file.In the original one delete all odd faces (line 1, 3, and so on in the faces' list).In the copy delete all even faces (line 2, 4 and so on).

Then load the two obj files into your 3D app and apply the texture(s) to them.

(If there are thousand faces it might be sufficient to delete only 50 of them.)

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum