Wings3D models

General discussion about JPatch

Wings3D models

Postby sascha » Fri Mar 02, 2007 4:43 pm

I'd need some low-poly models to test my SDS code. Since most .obj files I found on the internet are useless (i.e. contain lots of errors, so the SDS algorithm won't work correctly on them) I'm looking for models in Wings3D format.

If anybody has
* Links to some (low-poly) Wings 3D models (characters, cars, etc.)
* A link to an explaination of the Wings3D file format (to write a Wings3D importer)
please let me know.

Thanks!
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Fri Mar 02, 2007 6:28 pm

This thread says the file is just an Erlang expression:
I never had any idea that Wings would become so widely used as it is now when I designed the file format, so my primary objectives was to make it flexible AND easy to implement.

Therefore, a Wings files is simply a huge Erlang term, converted to the external format and compressed (with a header prepended).

It has never been high on my list of priorities to document the file format or make it easy for applications to read. I think it is better to use Import/Export for exchange of models with other applications. However, I could spend some of my spare time documenting the file format if I delay bug fixes and addition of other features.
I'll see if I can dig a bit deeper, though. I think it might also support the Nendo format.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby Paolo » Fri Mar 02, 2007 7:07 pm

Perhaps this link ( http://www.ogre3d.org/index.php?option= ... t=category ) brings to a set of python scripts of some help.
Paolo
 
Posts: 19
Joined: Tue Feb 20, 2007 10:12 pm
Location: Italy

Postby dcuny » Fri Mar 02, 2007 8:11 pm

The code for parsing out the Wings file looks pretty straight forward.

It looks like the Nendo 1.0 (.ndo) file format might also be pretty simple to support. (Wings3D also exports to that format). I found a Python script for importing a .ndo into Blender, and the file format looks pretty straight forward. Here's the block for reading the file:
Code: Select all
   for object in xrange(numobjs):
      good, = struct.unpack(">B",  file.read(1))
      if not good: continue   # an empty object
      objname = read_object_flags(file)
      edge_table = read_edge_table(file, version)
      face_table = read_face_table(file)
      vert_table = read_vert_table(file)
      uv = read_uv(file)
      verts = make_verts(vert_table)
      faces = make_faces(edge_table)
      meshtools.create_mesh(verts, faces, objname)
Then again, people are more likely to want to import from Wings3D.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby pndragon » Fri Mar 02, 2007 8:22 pm

Then again, people are more likely to want to import from Wings3D.

But until you import directly from Wings3d, exporting from Wing3d into .ndo and importing that into JPatch becomes a viable alternative.

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby pndragon » Fri Mar 02, 2007 8:36 pm

until you import directly from Wings3d

For example:
Currently you can import .obj or .wings files into the current (0.5.2) version of JPatch by using Wings3d 0.98.22 to export a file to .mdl (a:m patch)...

That plugin was not maintained for very many versions but it is still accessible from the downloads page.

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby sascha » Fri Mar 02, 2007 9:51 pm

Ok, thanks, I'll have a look.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Fri Mar 02, 2007 10:51 pm

pndragon wrote:That [.MDL] plugin was not maintained for very many versions but it is still accessible from the downloads page.
Great! So Sascha won't need to write a converter for our patch-based models, we can just use Wings3d! It'll be a simple process:
  1. Export from JPatch as an .mdl
  2. Import into Wings3D.
  3. Export as .ndo.
  4. Import into JPatch as an SDS.
Simple! ;)
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby pndragon » Sat Mar 03, 2007 3:42 am

1. Export from JPatch as an .mdl
2. Import into Wings3D.
3. Export as .ndo.
4. Import into JPatch as an SDS.

No.
  1. Export from JPatch_0.5.x as an .obj
  2. Import into Wings3D.
  3. Export as .ndo.
  4. Import into JPatch as an SDS.

You can't import .mdl files into Wings3d. And with a new .obj importer, steps 2 and 3 might become unnecessary.

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby dcuny » Sat Mar 03, 2007 9:25 am

Ooops, my bad.

(I was trying to be sarcastic! Thanks for ruining it! ;))
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Sat Mar 03, 2007 12:10 pm

Therefore, a Wings files is simply a huge Erlang term, converted to the external format and compressed

*shudder*

Ok, all I need are models that are manifold, so I guess I can simply use any Wings model an export it as .obj.
Any links to some Wings models?
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby Paolo » Sun Mar 11, 2007 1:41 pm

I've udapted some java code I've written to work with your Sds code. It should be easy to load wings model objects in your project. I've done that, starting from your last SVN snapshot quickly with some success.
If it is interesting I can upload or send you the code.
Paolo
 
Posts: 19
Joined: Tue Feb 20, 2007 10:12 pm
Location: Italy

Postby sascha » Sun Mar 11, 2007 9:48 pm

Yes sure, I'd gladly take a look at your code. Is it accessible online somewhere?

Note that I'm not quite finished with my SDS code - the HalfEdge structure works, but only last week I've changed the Vertex implementation to allow topologies where faces ajacent to a vertex don't have to share common edges.
I'm currently also adding 2nd level vertices to the HalfEdge structure. I need this to support hierarchical modeling, but also for some performance tunings I have in mind.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby Paolo » Sun Mar 11, 2007 10:36 pm

Note that I'm not quite finished with my SDS code

Anyhow I've seen many improvements in very short time. :)

Currently I've tested my code extending the Sds class but writing no specific sds code. To test it successfully I've only had to change the private attribute of some methods (validateVertices(), addFace(), createEdge()) in the Sds class. I send you an e-mail, so you can give it a try in your spare time.
Feel free to upload it in this topic or use/integrate it at your will.
Paolo
 
Posts: 19
Joined: Tue Feb 20, 2007 10:12 pm
Location: Italy


Return to General discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron