XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue May 30, 2017 8:41 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 265 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17, 18  Next
Author Message
 Post subject: Re: Extracting simple models
PostPosted: Tue Nov 29, 2016 6:36 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2025
Has thanked: 372 times
Have thanks: 1011 times














You can make the ads go away by registering

from "r_eye" and "l_eye" it looks to me as if it were a skeleton file with matrices.
(too busy to care for now)

_________________
Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue Nov 29, 2016 8:41 pm 
Offline
advanced
User avatar

Joined: Wed May 16, 2012 6:36 am
Posts: 77
Location: India
Has thanked: 9 times
Have thanks: 0 time
shakotay2 wrote:
from "r_eye" and "l_eye" it looks to me as if it were a skeleton file with matrices.
(too busy to care for now)


They are armature/skeleton

Mesh details comes after that.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue Dec 06, 2016 11:25 am 
Offline
n00b

Joined: Tue Dec 06, 2016 10:51 am
Posts: 13
Has thanked: 4 times
Have thanks: 2 times
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.



Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Tue Dec 06, 2016 11:51 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2025
Has thanked: 372 times
Have thanks: 1011 times
looks like y and z are swapped

_________________
Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed Dec 07, 2016 4:34 am 
Offline
n00b

Joined: Tue Dec 06, 2016 10:51 am
Posts: 13
Has thanked: 4 times
Have thanks: 2 times
shakotay2 wrote:
looks like y and z are swapped

I see
In an obj file there are 3 sections : v: vertex position, vn: normals, vt: uv
Can 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


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Thu Dec 08, 2016 3:35 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2025
Has thanked: 372 times
Have thanks: 1011 times
the position is handled in v section.

I'd suggest to refrain from wild guessing and use a textured square in blender (not a cube) to understand
how things work.

(press 'n' in blender's 3D view, in properties panel scroll down to 'normals' and press button "display face normals as lines")

Export he square as obj, copy the file, swap y and z in there and reimport it.
See how position is affected, also pay attention to the face winding.

_________________
Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Thu Dec 08, 2016 4:03 am 
Offline
advanced
User avatar

Joined: Wed May 16, 2012 6:36 am
Posts: 77
Location: India
Has thanked: 9 times
Have thanks: 0 time
The problem is his PC cannot run blender or any other 3d app due to driver issues.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Thu Dec 08, 2016 8:50 am 
Offline
n00b

Joined: Tue Dec 06, 2016 10:51 am
Posts: 13
Has thanked: 4 times
Have thanks: 2 times
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 -1
Edit: 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.



Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sat Dec 10, 2016 2:53 am 
Offline
advanced
User avatar

Joined: Wed May 16, 2012 6:36 am
Posts: 77
Location: India
Has thanked: 9 times
Have thanks: 0 time
i think we only need to worry about weights if we are injecting modified armature/bones back into the model files.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sat Dec 10, 2016 8:58 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2025
Has thanked: 372 times
Have thanks: 1011 times
yep.
@eatrawmeat391: "For every vertex (triangle point) in the model, we have to figure out which bones it should be attached to, and how strong each attachment should be."
read here for example: http://blog.wolfire.com/2009/11/volumet ... n-skinning

There may be up to 4 weights per vertex.

btw: this is not an "extracting simple models" discussion

You should take into consideration to open/join another thread on this.

_________________
Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sat Dec 10, 2016 9:08 am 
Offline
advanced
User avatar

Joined: Wed May 16, 2012 6:36 am
Posts: 77
Location: India
Has thanked: 9 times
Have thanks: 0 time
I think he posted it here because he can easily seek your help here.


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sat Dec 10, 2016 9:37 am 
Offline
n00b

Joined: Tue Dec 06, 2016 10:51 am
Posts: 13
Has thanked: 4 times
Have thanks: 2 times
Thanks you next time I will open a new topic


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Wed Dec 14, 2016 4:12 pm 
Offline
advanced
User avatar

Joined: Wed May 16, 2012 6:36 am
Posts: 77
Location: India
Has thanked: 9 times
Have thanks: 0 time
Could you please help us,this is the only missing data which we need to complete the import tool.
viewtopic.php?f=16&t=15579


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sat Dec 17, 2016 5:45 am 
Offline
n00b

Joined: Tue Dec 06, 2016 10:51 am
Posts: 13
Has thanked: 4 times
Have thanks: 2 times
Can I ask a dumb question?About the f sections,I think they are just 3 points that form a triangle.Is it okay if they are swapped?(It shouldn't be)

f 1 2 3
f 1 3 2
f 2 1 3
f 2 3 1
f 3 1 2
f 3 2 1
...


Top
 Profile  
 
 Post subject: Re: Extracting simple models
PostPosted: Sat Dec 17, 2016 11:00 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran
User avatar

Joined: Fri Apr 20, 2012 9:24 am
Posts: 2025
Has thanked: 372 times
Have thanks: 1011 times
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.)

_________________
Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip

"We are Microsoft. You will be assimilated. Resistance is Futile."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 265 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17, 18  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group