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 z80 » Mon Jul 27, 2009 3:43 pm

Dear toneddu2000,

thank you for testing the exporter! That's great job! Any bug reports let me to concentrate on improving script functionality. IMHO it's normal work process :)

1) Concerning your first problem I designed exporter to look for texture file in ".../nexuiz/data/textures" subfolder. It is because it is the same in "pk3" package format. Actually you lead me to an idea to take texture name and it's folder as a material description if it isn't on a normal path (e.i. in subfolder of ".../nexuiz/data/textures")

2) As for your second post these values meaning is the following. Because of floating point number format limited precission sometimes when I calculate if mesh is convex or not for faces lying in one and the same plane it might show anything (convex, concave or planar). Due to this problem I do the following. I scale all dimensions on scale supplied and round them to integers. Also it's good for me because I like meters but not units. I've decided that 32 is good approach, e.i. if edge size in Blender is 1 it would be 32 units in NetRadiant after export.

Concerning extrude height it is a height of a prism when concave mesh is splitted into individual prisms. Look (5) for details.

3) Yap, it's a bug! I'll fix it and submit with a fixed version as soon as I can!

4) No hierarchy wouldn't help. The problem is in text terminal output. It's my drawback! I'll make text echo output optional. I expect it to work much faster after disabling it. I've already met such a problem in my previous works. I believe it's the same. I don't think that OctTree subdivisioning is the case.

5) It might be because one or several meshes are not convex. It informs you about that, makes these meshes "ignored" (look at game logic section there would be such a property after export try) and creates as many prisms as faces number in each mesh.

In other words exporter substitute convex meshes with their individual faces extruded on a "extrude height" distance.

Thank you again for exporter testing. It's very useful! Please inform me about any bugs/ wishes/suggestions!!!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Mon Jul 27, 2009 6:55 pm

I have one little question not in main stream of this section. I've fixed several bugs (with file name and with textures location) in the exporter. But if I submit it as first time by pasting text I afraid this branch might become unreadable.

Is there any way to submit files and give only links to them in text?
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby paperclips » Mon Jul 27, 2009 7:50 pm

z80 wrote:I have one little question not in main stream of this section. I've fixed several bugs (with file name and with textures location) in the exporter. But if I submit it as first time by pasting text I afraid this branch might become unreadable.

Is there any way to submit files and give only links to them in text?


you mean something like this: http://paste2.org/new-paste ? :D
btw, just curios, is this code GPL ? :)
[Want to develop? Look HERE]. Image Image Gif sauce.
paperclips
Alien trapper
 
Posts: 346
Joined: Mon Jan 12, 2009 10:27 am
Location: internets

Postby z80 » Mon Jul 27, 2009 8:13 pm

Well, thanks to paperclips here is the corrected exporter "nexify.py" code: http://paste2.org/p/345104.

I remind that correct texture path should be subpath of ".../nexuiz/data/textures/".

But the question is still opened. Does anybody know what is texture reference frame in NetRadiant exactly?

btw, just curios, is this code GPL ? Smile
This question made me stuck. :) How can I determine wheter it is GPL or not if I've written that code when I had holidays? :)
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Mon Jul 27, 2009 9:56 pm

I downloaded the new version of the script and textures work perfectly and works also personal map names , thx!
Now I used a texture (of course the color version) but I noticed that normal map is not visible and I thought: maybe because the shader is not loaded, so, imho the best way could be (but I don't know how to do :roll: ) use links to shaders instead of textures. So, for istance, if I link to /data/textures/evil8_wall/e8crete03b ( shader name file, and not e8crete03b.jpg) the exporter could use e8crete03b.jpg for color, e8crete03b_bump.jpg for bump, e8crete03b_gloss.jpg for gloss map and so on, plus all the properties set in the .shader file;
I'll let you know if I find another problem!But I think that we can start to play with the exporter for now :D !

I think it's better that every modification you make to the script is defined in the version number, like version n.0.01, n.0.02, etc, so we could tell you: " the version 0.01" had this problem but the "0.02" hasn't"
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Tue Jul 28, 2009 5:11 am

Dear toneddu2000,

thank you for the exporter testing and useful suggestion on version numbering. I've taken that into account. And by now let's call the first one number 0.01 and the second let be 0.02.

I've found a bug by myself. I've played with exporting simple textured cube and found that texture orientation sometimes doesn't coincide in Blender and NetRadiant after export.

And (I know, I'm stupid for that :)) I did patches export but I've forgotten to put the code into the release.

So there would be a few more versions with bug fixes and patches export included.
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby Mr. Bougo » Tue Jul 28, 2009 7:22 am

Oh, when using a pastebin for such things, make sure that you checked the good option to keep it forever, instead of deleting it after a month or something :)

EDIT: it seems paste2.org doesn't have such options...
Try http://pastebin.com , you can also use a subdomain like http://blend2map.pastebin.com to keep things organized :)
Meh.
Mr. Bougo
Keyboard killer
 
Posts: 760
Joined: Mon Sep 10, 2007 3:29 pm

Postby z80 » Tue Jul 28, 2009 8:55 am

Mr. Bougo: all right, I'll use http://blend2map.pastebin.com/ for future file links. Thanks!

toneddu2000: I'll think how it is possible to organaze work with shaders.
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Tue Jul 28, 2009 8:30 pm

z80 wrote:toneddu2000: I'll think how it is possible to organaze work with shaders.


Thanks z80! That would be (together with the capability of "eat" bigger scenes) the most important steps to realize a VERY IMPORTANT tool for Nexuiz!

p.s: I'm real ingnorant in programming so don't kill me :wink: , but would be possible to "translate" python code in c++ to embed this function in blender? Maybe this method could speed up a lot exporting processor.Infact if could be possible to integrate in blender work flow and q3map2 compiler I think a lot of level designer would switch to Blender :D !
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby nifrek » Tue Jul 28, 2009 8:51 pm

Amazing, I will give this a try tonight. I too tried to export to .map in blender a few times in the past without success. Thank you for making this!
<Ozomahtli> what?
nifrek
Alien
 
Posts: 208
Joined: Fri Sep 22, 2006 6:43 am

PreviousNext

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest