Horde3D

Next-Generation Graphics Engine
It is currently 20.04.2024, 02:21

All times are UTC + 1 hour




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 19.03.2010, 00:03 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
I'd like to use the LOD system but have no matching .geo files. So: Has anyone a tool to create low poly meshes from existing .geo files? Either as a preprocessing step or at runtime.

I only have a converter from a custom source mesh format to h3d .geo files, not anything else. Otherwise I'd probably use blender and try to automate it somehow.


Last edited by Codepoet on 25.03.2010, 23:22, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 25.03.2010, 19:21 
Offline

Joined: 22.11.2009, 16:14
Posts: 25
yeah that would be sweet. Although there is some tech doc for the .geo format (hmm, at least i'm pretty sure) i don't feel able to write some blender importer... :( I just don't get the hang of python ;)

If there was a blender importer, LOD would certainly possible, wouldn't it?
cheers

_________________
philipppixel
8=:(=)D { Save the Giraffes )


Top
 Profile  
Reply with quote  
PostPosted: 25.03.2010, 21:36 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
The .geo format is well documented, that's not an issue ;)

Writing a blender importer is probably a good idea independent of my current problem. I'll need to think about automating blender for the LOD reduction and verify that the exporter supports multi resolution meshes. I don't like the idea of an external merge script... I'd also ask Volker before starting this, maybe someone is already working on this?

(This task is not that high on my priority list, I'm currently limited to < 50 meshes on screen which is enough for testing right now - just not ideal...)


Top
 Profile  
Reply with quote  
PostPosted: 25.03.2010, 21:38 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Codepoet wrote:
I'd also ask Volker before starting this, maybe someone is already working on this?

Nobody I'm aware of.


Top
 Profile  
Reply with quote  
PostPosted: 25.03.2010, 23:16 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Basic .geo importer is working :)


Attachments:
File comment: Proof ;)
blender.png
blender.png [ 49.97 KiB | Viewed 14246 times ]
Top
 Profile  
Reply with quote  
PostPosted: 26.03.2010, 01:22 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
Pure win codepoet! If you extend this for bones and anims then I wouldn't be surprised that this could be the best way to bring animation and bones to blender from other packages. It could work as a maya->collada->collada converter->blender path for instance. A bit out of the way but there isn't an efficient way yet to import this kind of data to blender, unless you fight the old collada importer or the md5 path, but you usually have other issues then.

If you want a good polygon reducer might I suggest meshlab? http://meshlab.sourceforge.net/ I've used it in a professional environment with very good results. It preserves things like UVs as best as it can while I think the current blender reducer breaks them. I used it with .obj's from maya wrapped in a mel script but with the Qt frontend so it wasn't fully automated, but I think meshlab has a command line interface to script with.

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
PostPosted: 26.03.2010, 09:00 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Codepoet wrote:
Basic .geo importer is working :)

Awesome,... as MistaED already mentioned, supporting bones and morph targets would make this the superior way of importing 3D models to blender, althoug better support for Collada in blender would be of course more reasonable, but that's something we wait for years now.


Top
 Profile  
Reply with quote  
PostPosted: 26.03.2010, 13:44 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
@MistaED: Thanks for the link to meshlab. I'll take a look at it.

@Volker: I agree that in theory collada would be better, but I already tried to write a custom to collada converter. But it's so much easier to work directly with .geo and .xml files.

Textures using uv0 are working now. How two use two texture layers was not instantly obvious.

I'm not yet certain how to handle LOD meshes. Import only the lod=0 version? Import levels, but as different meshes / objects? Create a multi res mesh?

Regarding the tangent space basis: Can I skip importing the normals, tangents and bitangents?

I'll probably need to modify the exporter a bit: If a joint has a prefix of "G\d+_" then instead of creating a joint in the scene.xml file it should create a group node. If no two joints can have the same name in blender, then any imported joint will get a "J\d+_" prefix. During the export these prefixes should be removed.

Before implementing animations and morph targets I have to learn how to display these using blender.


Top
 Profile  
Reply with quote  
PostPosted: 26.03.2010, 15:11 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
I've attached the imported h3d man for lod=0.

New problems: mirrored uv coordinates and the location of the .geo file. The latter is currently solved by assuming that the .geo file is in the same directory as the scene.xml.


Attachments:
File comment: man, lod=0
0004.png
0004.png [ 104.06 KiB | Viewed 14223 times ]
Top
 Profile  
Reply with quote  
PostPosted: 27.03.2010, 09:53 
Offline

Joined: 22.11.2009, 16:14
Posts: 25
Codepoet wrote:
Basic .geo importer is working :)


Wow, you're doing great here. Done in a minute :D I just wonder, is it a difficult task to make such an importer? Every now and then I feel the need to touch such blender scripts.

On the same thing: do you plan to release the .geo importer to the community? I'd be very grateful for such thing ;)
Cheers

_________________
philipppixel
8=:(=)D { Save the Giraffes )


Top
 Profile  
Reply with quote  
PostPosted: 27.03.2010, 13:25 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
philipppixel wrote:
I just wonder, is it a difficult task to make such an importer? Every now and then I feel the need to touch such blender scripts.

So far it was easy and took around 2 hours of work (learning basics of Blender API, writing .geo and scene.xml importer, writing glue code to Blender). The more difficult parts are still missing, that will probably take much longer to implement.
A good start for writing an importer is to take a look at an importer for a similar format and of course the blender docs. But you should already know Python before trying to edit these scripts.

philipppixel wrote:
On the same thing: do you plan to release the .geo importer to the community? I'd be very grateful for such thing ;)

Yes, I'll release it under the GPLv2 so that it can be included in the official blender package.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


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® Forum Software © phpBB Group