Blender to MAP exporter

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Postby toneddu2000 » Thu Jul 30, 2009 4:36 pm

Thanks a lot z80 for the clarification! Now I used bool sun property and it worked great! The only thing I don't understand is "material" string property:why should I use a property for a shader if just linking to a texture the engine finds the shader?

For the tutorial is decided: I'll start tonight and, if you want, before releasing, I could send it to you by mail and then, if everything is correct, publish it on a web space. If nexuiz community should take in consideration the idea of create a "docs" section, maybe it could go there!
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Thu Jul 30, 2009 6:39 pm

toneddu2000 Concerning texture property it is for the reason when shader name doesn't coincide with Blender texture name. If it coincides, when it's O'Key and "texture" property isn't need.

And on tutorial. It would be great! But I'll be unavailable till next Monday. So when you finish, please mail me. I'll look it through and reply.

Thank you for cooperation it significantly decreases development time!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Sun Aug 02, 2009 7:12 pm

Here is 0.06 bug fix exporter version:

nexify.py: http://blend2map.pastebin.com/f6ceed95a
nexuiz.py: http://blend2map.pastebin.com/f2dad8522
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Sun Aug 02, 2009 11:53 pm

thx z80! which bugs fixes this version?
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Mon Aug 03, 2009 5:40 am

There appeared to be a problem when one tried to export meshes without materials.
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Tue Aug 04, 2009 10:17 am

There's a problem that I would like to clarify about an exporter feature: Scale factor. I'm writing the exporter tutorial and I creating a paragraph about units and measures compared between blender and radiant. I've first created in netradiant a map 256 x 256 x 192 then I exported it to .obj and, in blender, I created a similar box with very similar dimensions ( I avoided .000 float numbers for human readability ). Now, if I export this map with scale factor set to 32, of course, it makes the the map bigger, then I tried 8 multiplies ( 32,16, 8 ) and then I found that 8 was smaller than the orginal and I chose 10. Infact scale factor to 10 makes the map perfect fit to the original, BUT (if there wasn't a BUT, how life would life seem so sweet ? :D ) the exporter shrinks a vertex of a cube that I put for test inside the four walls.

Here's what I mean

Image

What could be the problem? Should I use a 8 multipy scale factor?
Thanks in advance, as always :D
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Wed Aug 05, 2009 6:41 am

toneddu2000 I don't know exactly what the problem is. But first guess is it is associated with rounding of floating point numbers to integers before export. I suppose it might be that number is 15.49999999 or 15.500000001. In first case it would be 15 and in the second 15+1 = 16.
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Wed Aug 05, 2009 9:31 pm

I didn't understand very well your answer but tomorrow I'll try! The weird thing is that with scale factor to 8 or 16 or 32 the two vertices don't move but with scale factor to 10 they move. Is possible that is due to scale factor and 8 multiplies and not to rounding of floating point numbers?Anyway thanks, for tomorrow afternoon (I hope!) I'll send you by mail a rough version of the exporter manual! :D
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby toneddu2000 » Sat Aug 08, 2009 10:56 pm

I've mailed you a copy of the tutorial. I hoped you could find useful! It's very incomplete and (I guess) not - 100% coherent, but we can modify it when we want! :D
Let me know if it's presentable to public! :D
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Fri Aug 14, 2009 10:25 am

0.07 version of geometry exporter for Blender to NetRadiant. I would be very appreciate to anyone who tests it!

- Now it automatically subdivides concave meshes into convex parts when export.
- Some problems remain with floating point precission during calculations. It causes strange artifacts.

To install it download the package and unzip it into blender/.blender/scripts folder. "NEXUIZ (*.MAP)" option appear in export menu section.

http://www.box.net/shared/6smfxfsc5p

Work example:


Blender: Image

NetRadiant: Image
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

PreviousNext

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest