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 » Fri Aug 14, 2009 3:28 pm

Nice work z80, as always!Thx! :D I'll test as soon as I can, but one question:

z80 wrote:- Now it automatically subdivides concave meshes into convex parts when export

If I understood correct, with this feature, I make a simple cube, hit prepare and the exporter transform it in a "6 cubes" room, right?
Well, this could be useful only for "envelop" cube , but for the other stucture cubes I think it's better to turn it off
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Fri Aug 14, 2009 7:13 pm

toneddu2000 No, that's not exactly! It means the following.

NetRadiant work with "brushes" but "Blender" works with "meshes". Each brush is an inner volume of several intersecting planes. Because planes are infinite objects brushes can be only convex.

Blender meshes consist of faces, each face has 3 or 4 vertices. Faces can make any abitrary shape of the mesh. If it isn't convex we have a problem :) And it isn't good idea to limit artist with only convex meshes (because not each artist knows what it is :) :) :) )

So the problem is: in Blender meshes can have any abitraty shape but in NetRadiant brushes can be only convex.

In previous exporter version concave meshes have been substituted with a set of extruded their individual faces. This isn't very optimal because mesh might consist of very many faces. So better way is to subdivide mesh( only if it is concave ) to a set of convex parts. With convex parts there are no problems when transforming mesh to brush.

So the automatic subdividing works but sometimes it gives strange looking artifacts. Now I'm working on debugging this annoying effect :)

I remember your question about NURBS. I'll prepare the explanation and send it to you with e-mail.
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby motorsep » Fri Aug 14, 2009 10:39 pm

Can I place lights and entities in Blender? If so, how? I am not really familiar with BGE and it's logic blocks in case it can be done that way :/
motorsep
Member
 
Posts: 33
Joined: Wed Jul 12, 2006 4:10 pm
Location: San Antonio, TX

Postby z80 » Sat Aug 15, 2009 8:53 am

motorsep Yes, lights can be added and handled normally with the exporter. Just add light, it would be exported as is.

If you need additional params after press prepare button several properties appear in logic section, change them. These properties are "has_target", "target_x", "target_y", "target_z" and "sun". These properties need to set light params blender light doesn't have.

As concerns entities, now it's impossible to add entities right in Blender. But it's easy to add them in NetRadiant after export.

Entities support is planned to be included after any geometry export works properly.

Please tell me about any problems and bugs met (better with pictures displaying them).
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Sat Aug 15, 2009 8:52 pm

Version 0.08 of the exporter.
Anyone, please test it! I need any suggestions!

It seems I've succeeded to win the battle with python and write correct concave meshes to convex brushes export :)

Exporter download link: http://www.box.net/shared/2eymc0s3y1

Example of one complex concave mesh in Blender to several brushes in NetRadiant automatic sectioning:

Blender: Image

NetRadiant: Image

It seems to me very serious improvement. Because I've fed up with cutting meshes into parts for export in older versions!!! And now there are two ways of making brushes from mesh:

1) extrude each face,
2) subdivide it into convex parts.

Last way gives much less brushes, e.i. it seems to be more optimal.

I'll test it designing my simple test map. If it reveals no serious bugs I'll start working on immerging entities work right in Blender.

Anyone, please test it!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby Rad Ished » Sun Aug 16, 2009 10:04 am

Hi again z80
I have been testing the .7 release but so far no luck, but the mesh im making is fairly complex, i will try the new one now, and post some results if i get any, keep up the good work, this is a really cool thing you're making here :D
fishsticks
Rad Ished
Keyboard killer
 
Posts: 609
Joined: Wed Jun 27, 2007 8:00 am
Location: Not the Netherlands

Postby z80 » Sun Aug 16, 2009 11:22 am

Rad Ished, actually my problem is in floating point numbers precision. I even think on remaking all calculations in integers :(

Exporter works perfectly when necessary subdivisions number is relatively low, e.i. for simple meshes like I've posted on pictures (see previous posts). But when I try something like a wall with several windows cut usually it work, but sometimes not. I've almost got a banana improving it. :evil:

Sometimes it finds concave parts where everything is convex. :roll:
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby Rad Ished » Mon Aug 17, 2009 2:41 pm

Ok, i got something out of it
http://imgur.com/xEQk0.jpg
the brown boxes are exported via your 0.08 version exporter.
I still got an awful lot of extra 'junk' brushes that i had to delete by hand.
It does seems to work better.
What i exported was essentially a load of boxes all at different angles.
The gray hull is a .ase from blender also.
A banana?
fishsticks
Rad Ished
Keyboard killer
 
Posts: 609
Joined: Wed Jun 27, 2007 8:00 am
Location: Not the Netherlands

Postby z80 » Tue Aug 18, 2009 7:08 am

Rad Ished

"To get a banana" as far as I know is an idiom meaning to become mad or crazy :)

I see. So even boxes export doesn't work well yet. Actually I test the exporter on ultra low poly objects to be able to debug it. Thanks for the picture! Could you also supply with MAP file?

Now I'm working on removing artifacts apperaing. Anyway in the next version I've realized an ability to export each mesh in two ways. First to extrude each face, and the second by subsectioning as it's done now.

So even if exporter can't subsection current mesh correncly it's possible to force it's export extruding face by face.
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Tue Aug 18, 2009 9:54 am

Rad Ished

O, wow, you do like BIG sizes :) :) :) Blender grid almost disappeared to one pixel :) :) :)

I've succeded exporting that as surface. Concerning boxes I really have to remake everything in integers. In 0.09 version of the exporter things look in the following way:
Image

In game it's slightly strange due to my shader choise (base/mgrate) :) :) :)

Image

I'll remake calculations of sectioning planes in integers and submit a 0.09 exporter version here.
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