Jump to content
The Dark Mod Forums

3D tools under Linux


Tels

Recommended Posts

Just wanted to share this find:

 

* 3D Converter (shareware, 40€): http://web.axelero.hu/karpo/ can convert over 500 formats, and runs under Wine just fine.

* http://geuz.org/gmsh/ - A mesh tool, which runs under Linux, too

* http://jsomers.com/vipm_demo/meshsimp.html - a mesh simplification viewer

 

3D Converter could be used to convert between ASE and LWO, but only in the registered version, so could not try it it works for our models.

 

So far my task was to reduce the Aphrodite statue to create a new, very simple LOD stage.

 

  • First load it in 3D Converter, which already can show you a lot of info:
     
    post-144-129699616834_thumb.jpg
     
    It can also unwrap UV, and convert to a lot of formats. Unfortunately, it seems you cannot edit the mesh. (a shame :)
     
  • gmsh:
    So then save the file as ".igs" file, which gmsh can load:
     
    post-144-129699619531_thumb.jpg
     
    So far it seems gmsh imported points-on-lines, but no surfaces or volumes. I am not sure how to continue from here... the program's user-interface is very cryptic. :(
     
  • pmesh:
    So instead save the file as "PLY ASCII" and load it into pmesh:
     
    post-144-12969970905_thumb.jpg
     
    You can choose betwen four different methods, and dial the number of triangles down/up with "PageDown" and "PageUp". Unfortunately, it seems the program lacks a "save" :(
     
  • blender: So instead save the file as "PLY ASCII" and load it into blender. press F9]/b] to go into "edit mode". The select at the lower right "Add Modifier" and choose "Decimate". Select a ratio (in this case I select 0.15,e.g. 15% of tris should survive). Then click "Apply".
     
    post-144-129700121648_thumb.jpg
     
    Once done, re-export your model. I used the ".ply" format again.

 

The only thing I need to figure out now is how to get the ".ply" back to either "LWO" or "ASE". 3D Converter needs to be registered, and the "ASE exporter" for blender does not seem to run on my 2.49beta version. *sigh* Why are such simply things so complicated?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Meshlab is most likely the best for decimation and cleaning etc. 1.30 is meant to be released sometime in the next few days (it was pulled from last week due to some bug)

 

3D Converter does not support vertex normals, colours or anything like that, it also has trouble with some UV mapping.

 

My Assimp based python exporter supports ASE, OBJ and about 80% of LWO at the moment, I'll most likely be done with it in a few days. ASE exports with vertex normals currently have a slight issue in that Doom3 for some reason will not give them a Z dimention, instead I get duplicate XY vectors... but if you disable that they look fine in game for the most part.

Link to comment
Share on other sites

Meshlab is most likely the best for decimation and cleaning etc. 1.30 is meant to be released sometime in the next few days (it was pulled from last week due to some bug)

 

Just installed meshlab here, looks interesting. On my Kubuntu 10.04 I have 1.2.2. However, I cannot load any files at all, it simply lists the directories as empty and even if I pass a file on the commandline, it says it doesn't exist. Huh?

 

Edit: Ah, one has to clear the "Filter" box and enter "*.*" there. Then it works. Oh boy.

 

3D Converter does not support vertex normals, colours or anything like that, it also has trouble with some UV mapping.

 

It certainly shows vertex colors, normals etc. Do you mean it shows them but can't export them?

 

My Assimp based python exporter supports ASE, OBJ and about 80% of LWO at the moment, I'll most likely be done with it in a few days. ASE exports with vertex normals currently have a slight issue in that Doom3 for some reason will not give them a Z dimention, instead I get duplicate XY vectors... but if you disable that they look fine in game for the most part.

 

Well, I have spent at least 2h today to get a simple "reduce mesh" task done and failed - so I don't think it is wise to spent even more time with it. In the same time I could have done some real work, then payed someone like you or Arcturus to just make the damn LOD model for me....

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Just installed meshlab here, looks interesting. On my Kubuntu 10.04 I have 1.2.2. However, I cannot load any files at all, it simply lists the directories as empty and even if I pass a file on the commandline, it says it doesn't exist. Huh?

 

Edit: Ah, one has to clear the "Filter" box and enter "*.*" there. Then it works. Oh boy.

 

The problem is I cannot seem to find a way to actually decimate a mesh. And it can only load certain formats, too.

 

Does somebody have a quick tutorial?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

It depends on the type of decimation you want. The reason I like it is that you can give vertices values or colours and then use those as weighting for certain filters. For example the quadratic edge collapse decimation, you might want to preserve detail such as eyes or fingers on a statue, you can then painu those areas with different shades to give them a weighting value. This is also very handy when you look at extremely complex shapes, where you might not be interested in a lot of the area but you do want to keep some of the contrasting edges and such, you could then apply one of the methods of AO and store the result in either colour/value (angle weighted normal generation is also handy here). With AO you can also try to completely black out completely occluded geometry and then using the 'select' options select and delete it.

 

It's a bit like working in photoshop in that it's a whole lot of steps to get to a goal, its extremely powerful but it's something that isnt just a 'pick up and run' solution. There are a few tutorials and such that float around the web about it, but they mostly focus on extremely high res samples.

 

Play with the filters, they're in the 'filters' menu. Some of the tools are covered on the Meshlab blog in tutorial form. If a filter requires manifold edges and you try use it, you might get a runtime error in some cases. A lot of processes will need you to run various filters beforehand to generate the needed data. I mostly just use it as a cleanup tool and for importing extremely high res meshes/pointclouds for some research friends are doing, so I'm a bit sketchy with low-res game models and such.

 

You might not find it too handy at all :)

Link to comment
Share on other sites

@Serpentine: oh well that is all way over my head.

 

Hm, yeah, I wasted another hour today with that, with only mixed results:

 

post-144-129711128677_thumb.jpg

 

Middle: Our current "lowpoly", with 1570 or so polis. (way too many from >50m away)

 

Left: Forgot how I created it, I think it was converted to ".obj", loaded in Blender, used Decimate, then export as ASE, then manually fix the material (which didn't work). The mesh still needs a lot of cleaning, and it even has still to many polies.

 

Right: This was using "Mesh -> Scripts -> Poly Reduce" in Blender. Works a bit better than decimate. Also missing the material due to the export stages.

 

However, I think it might be easier to remodel it with patches in DR. Or throw in the towel and admit defeat. It might actually be faster to write a meshreducer that can reduce the model inside D3...

 

(So far I am cursing a lot who created the interface mess for Blender, nothing is intuitive. I can't even find out how to pan the viewport, and googling did not help....arg)

 

Anyway, that's enough time wasted for tonight. :)

 

In related news I registered 3D Object Converter, and the author is very helpful.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

You could always throw cash at me ;) That said he's a great guy and does go the extra mile if you need fixes or whatever.

 

Re: Materials, 3D Object Conv doesnt address materials correctly in the mesh geomobject, it should look something like this - note it's got pretty much everything cut out.

 

*SCENE {
*SCENE_FILENAME "wheelarea.ase"
*SCENE_FIRSTFRAME 0
}
*MATERIAL_LIST {
       *MATERIAL_COUNT 1
*MATERIAL 0 {
	*MATERIAL_NAME "material_0"
		*MAP_DIFFUSE {
		*BITMAP "//base/generator_d.tga"
	}
}
}
*GEOMOBJECT {
*NODE_NAME "3D_Object_1"
}
*MESH {
	*MESH_NUMVERTEX 450
	*MESH_NUMFACES 383
	*MESH_VERTEX_LIST {		}
	*MESH_FACE_LIST {		}
	*MESH_NUMTVERTEX 450
	*MESH_TVERTLIST {		}
	*MESH_NUMTVFACES 383
	*MESH_TFACELIST {		}
}
*MATERIAL_REF 0 <========== //Assigns the material from the material list (doom3 uses this value, not mtlid which is the submaterial)
*PROP_CASTSHADOW 1
*PROP_RECVSHADOW 1
}

Link to comment
Share on other sites

(So far I am cursing a lot who created the interface mess for Blender, nothing is intuitive. I can't even find out how to pan the viewport, and googling did not help....arg)

It looks like you mght be using Blender pre 2.5 so you really should upgrade as the newer versions are a bit easier. Also you pan with SHIFT+MMB.

Link to comment
Share on other sites

It looks like you mght be using Blender pre 2.5 so you really should upgrade as the newer versions are a bit easier.

 

Nothing @you, nosslak :)

 

But everytime I look at blender, I hate it more. Their *stable* release is 2.49b, and this is also what you get pre-compiled, and what their download page offers, and what I can install on my system.

 

However, the rest of the world, including the developers, the users and the people writing the scripts use 2.5x... And the API changed, so the scripts don't work on v2.49b. However, for a mere enduser like me there is no way to update blender except by compiling it yourself.

 

Er, no thanx, I have better things to do then to hunt down sources, compile software, then have it collide with the rest of my system etc...

 

Also you pan with SHIFT+MMB.

 

Who would have guess that :rolleyes:

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Nothing @you, nosslak :)

 

But everytime I look at blender, I hate it more. Their *stable* release is 2.49b, and this is also what you get pre-compiled, and what their download page offers, and what I can install on my system.

 

However, the rest of the world, including the developers, the users and the people writing the scripts use 2.5x... And the API changed, so the scripts don't work on v2.49b. However, for a mere enduser like me there is no way to update blender except by compiling it yourself.

 

Er, no thanx, I have better things to do then to hunt down sources, compile software, then have it collide with the rest of my system etc...

You're welcome!

Link to comment
Share on other sites

 

Thanx - I'll check it out later!

 

Even with the old blender I managed to get a passable LOD model (with manually edited ASE woooah :)

 

http://forums.thedarkmod.com/topic/11760-making-lod-models/page__view__findpost__p__247797

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...