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 » Sun Oct 25, 2009 9:28 am

z80, have you seen my mail?
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Sun Oct 25, 2009 2:03 pm

toneddu2000 Yes, I've got it on Friday. I'm very sorry haven't answered you yet (I checked mail at work just before going to weekend). I promise I'll mail you back tomorrow when I'll be at work!

bobcaticus The problems with .blend file are the following. Nowdays the exporter can't eat any .blend file. There are several limitations. And I've found two items why it can't be exported correctly as is.

1) If you use any material the exporter expects it to have a texture of image kind. Material with index 1 doesn't have any texture.

2) If you use any texture file it should be in Nexuiz data/textures folder or any subfolder. Otherwise NetRadiant can't find it. Materials with indexes 2, 3 and 4 have their textures in "Documents and Settings" subfolder, It's wrong.

Anyway the exporter shouldn't fail even if blend file isn't prepared. So it's a bug. I'll try to fix it in next (probably 0.17) version. Thank you for using the exporter!
Don't use the force, Luke! Try to think!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Wed Oct 28, 2009 8:39 am

Version 0.17 of the exporter: http://www.box.net/shared/a2xzq8asj1.

Changes list:

* Files list, lisence file and manual by toneddu2000 added.
* Export precission is set to 4 digits.
Don't use the force, Luke! Try to think!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Wed Oct 28, 2009 11:43 am

Thanks z80! In addition I inform the community that the open SVN address of exporter (exporter, guide, additional blend files) package is located here: svn://213.79.111.46:1000/blend2nex. A huge thanks to z80 for this!
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Sun Nov 08, 2009 6:42 pm

Version 0.18 of the exporter: http://www.box.net/shared/t91aeqaqdj

Changed texture reference frame definition according to q3map2 source. (Great thanks to divVerent!!!!!)
Don't use the force, Luke! Try to think!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Tue Nov 10, 2009 1:33 pm

Wow z80 thanks! At least I have some free time, I'll test it! What does it mean "according to q3map2 source" for texture frame definition?
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

Postby z80 » Tue Nov 10, 2009 6:11 pm

toneddu2000 It means that divVerent has told me where to look for the texture reference frame definition in NetRadiant source code. To be precise in it's part that is built into q3map2 tool.

I couldn't find it myself because of I didn't know where to look in it (NetRadiant source). And I would spend quite a lot of time looking for that. Initially I have written the exporter using my own guess on how it works. It usually worked but not always. My mistake was I supposed that reference frame origin moves to brush plane and axes are initial axes projection on it made perpendicular. I was wrong as usual :)

Actually it appeared to be very simple: If initially we have Oxyz (O - point (0, 0, 0), and x, y, z axes of World unmodified reference frame (RF)), then target texture reference frame is x and y axes of initial RF with two rotations applied:

1) around z axis,
2) around new y axis.

These transformations are such as new RF z axis coincides with brush plane normal.

So my task to map a texture is reduced to:

1) Make transformation matrix that transforms texture u,v to x and y of brush face RF,
2) Make transformation matrix that transforms x, y, z to x and y of brush RF,
2) According to that matrix find X, Y, scaleX, scaleY and angle using u, v and x, y, z of each vertex of initial Blender mesh when converting it to NetRadiant brush.

Of course not any affine transformation might be split into such 5 sequential transforms. But if we assume that it does it could be gained form the matrix. I don't want explaining it here, because it is a bit complex. It's better to look at that in the exporter's source. To be brief, it's done by applying transformation to convenient unit vectors.

Also I've found out it works well when u and v are between 0 and 1 (inside texture square in Blender). I've not found out why yet :(.

I'm not sure I've explained it in understandable way, sorry for that!
Don't use the force, Luke! Try to think!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Mon Nov 16, 2009 10:16 am

Version 0.19 of the exporter: http://www.box.net/shared/4jyns68zei

Changes:

* Rederived all matrices and rewritten all concerning texture mapping (appropriate function became shorter and cleaner to a person looking at it first time).
Don't use the force, Luke! Try to think!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby z80 » Fri Nov 20, 2009 1:35 pm

Version 0.20: http://www.box.net/shared/mid1k1k4lu

Changes:

* Automatic ASE export parts of the scene for misc_model creation.
* info_player_deathmatch and others info_... export.
Don't use the force, Luke! Try to think!
z80
Advanced member
 
Posts: 92
Joined: Sun Jul 26, 2009 7:35 pm
Location: Russia

Postby toneddu2000 » Fri Nov 20, 2009 6:54 pm

NO WAY!!You're telling us that I can now set info_player_start (for istance) directly from Blender? Awesome!
Thx a lot z80.Next week I'll try to start guide update with some tutorials!
P.S: I didn't understand first new feature, can you explain it in detail?
toneddu2000
Alien trapper
 
Posts: 251
Joined: Mon Mar 09, 2009 7:56 pm
Location: Italy

PreviousNext

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron