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

Sun Sep 06, 2009 6:51 pm

  • Version 0.15 of the exporter: http://www.box.net/shared/xku3softbl

    - NURBS texture is applied homogeneously among the NURBS surface.
    - Bug with zero area faces when export mesh as surface fixed.

    Guys, please, try it!
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Sun Sep 06, 2009 8:36 pm

  • Wow!Now nurbs have textures!But they however lose their original shape (nurbs surface seems bent on one side).But, one step up!Great! :D Thx a lot z80!
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Mon Sep 07, 2009 7:29 am

  • toneddu2000 To save original shape use odd resolution. Because if it's even exporter cuts it by one point from each side. It's because NetRadiant understands only odd resolution from 3 to 31.

    In other words by default in Blender NURBS surface has resolution 4x4. It's not legal and exporter cuts it to 3x3. The easiest way to solve the problem is to subdrive it in edit mode. The resolution in this case would be 7x7 - it's valid for NetRadiant. And surface in such case is almost the same as in Blender. To gain better match one should play with NURBS orders along u and v directions.
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Tue Sep 08, 2009 1:00 am

  • ok, now it works great!!I've used these settings:
    I've used Bezier U and V;(but it works also with Uniform and Enpoint)
    Order U3 V3
    Resol U6 V7
    Thx a lot z80, now I can start to make some example map!! :D
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Sun Sep 13, 2009 8:46 pm

  • Trying to export my mesh to .map and keep on getting following error:

    http://www.pasteall.org/7824

    The mesh has UV map and material assign to it.

    EDIT: Hmm.. Somehow I don't get that error any longer..
    However I have another question. I have material named 'weapclip' assigned to my mesh. When I load .map file into NetRadiant, all brushes have 'caulk' material on them. Why?
    How can I have mesh faces to have shader 'weapclip' and whatever is extruded - 'caulk' ?

    Thanks.
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Tue Sep 15, 2009 1:07 pm

  • motorsep Use "overwrite texture" ability in the exporter menu. Material name has no meaning for the exporter. Only texture file name is important. If you want to use shader with different name "overwrite texture" is the case.

    Please report any problems met!
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Sat Oct 03, 2009 3:42 am

  • z80: I am exporting a collision hull for my map. It's has 0 thickness (planes). So I get output brushes that have "myshader" on all sides.
    Would it be hard to add an option or do it automatically, that when you export a plane (or any mesh with 0 thickness, "open" mesh), the side that already exists will have a textures assigned in Blender, but the rest of the sides that will be generated but the exporter will have common/caulk shader? Quake 3 map exporter for Blender does the exactly that, but it's glitchy and doesn't suit my need.
    Thanks.
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sun Oct 04, 2009 7:16 am

  • motorsep: but now it works exactly in the way you've described! If mesh is exported as a surface (not closed) mesh, existing faces are exported with real textures (shaders), but generated faces are equipt with 'common/caulk' shader.
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Sun Oct 04, 2009 4:17 pm

  • z80: well, I found that it works now :) But in order for it to work, I have to define common/weapclip shader in the script's GUI. Then it exports the way I need it. I actually expected for the script to use either name of the texture applied in UV editor or material name to apply to the surface. Oh, well, it work the way it works and I am happy :)

    EDIT: Imported my misc_model and collision brushes for it (same model exported with your script as brushes) and noticed that brushes are off :/ Could you add an option to your exporter that allows export without snapping it to the grid? I need to match brushes exactly with misc_model (I don't care in this case brushes are not aligned with grid in NetRadiant). Thanks.
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sun Oct 04, 2009 7:00 pm

  • How would I change an existing map? I could probably unpack the .pk3 and then edit some of it, I dunno. But how would I get it back to .pk3

    Also, the more important, where do I put the script? XD

    Excuse my noobishness to this matter. I have been trying really hard to learn more about all of this but its hard to find good help anymore with all the crud 8 year olds are putting up on the interwebs.
    Image
    User avatar
    wajmhome
    Newbie
     
    Posts: 6
    Joined: Tue Aug 11, 2009 5:16 am

Sun Oct 04, 2009 8:20 pm

  • wajmhome: you can't edit existing levels. What's inside pk3 is usually .bsp files. Those come from .map files after compilation process. You can only edit .map file (structure of the level, lights, etc.) Pk3 is nothing more but .zip file. Use 7zip software unpack or add to pk3 any files.

    Script goes to blender\.blender\scripts\
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sun Oct 04, 2009 11:12 pm

  • Thanks.

    Now I just need to find a tutorial on how one can make a nexuiz map with only blender since NetRadiant refuses to work on my computer.
    I dunno why, I get a large amount of errors.
    Might be because of my bad hardware and the fact that I use a really buggy version of Windows XP.
    Image
    User avatar
    wajmhome
    Newbie
     
    Posts: 6
    Joined: Tue Aug 11, 2009 5:16 am

Mon Oct 05, 2009 9:38 am

  • Now I just need to find a tutorial on how one can make a nexuiz map with only blender since NetRadiant refuses to work on my computer.

    I'm making it, just a little patience! :D

    to z80:
    In these days I'll bother you a bit with the guide so it will be uploaded for next week!
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Mon Oct 05, 2009 4:45 pm

  • motorsep Actually the exporter uses texture file name without extension as exported shader name with base path ".../nexuiz/data/textures/". E.i. to use a texture without overwriting shader name one is to use Blender image texture type and take file from the folder (or any it's subfolder) mentioned above.

    I'll try to add an option which would allow to export without snapping to the grid in the next version of the exporter.

    toneddu2000 I'm at your service! Any questions or wishes are welcome!
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Mon Oct 05, 2009 4:51 pm

  • z80: Thanks a bunch! When is new version planned to be released?
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Tue Oct 06, 2009 3:24 pm

  • motorsep Good question :) Actually, I planned to release next version when I find out exactly how texture reference frame is organized in NetRadiant. It's a big problem for me. Because of this there is wrong texture placement after export sometimes.

    But as far as a few different wishes appeared recently I'm going to include them in next release and skip texture mapping correction. I suppose for 0.16 exporter release time a good approximation is next week.
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Fri Oct 16, 2009 5:00 pm

  • how is it going, z80 ? I am impatiently waiting for new release with ability not to snap to NetRadiant's grid ;)
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sat Oct 17, 2009 4:50 pm

  • motorsep Almost ready. I'll submit it soon. So big delay because I had much other work to do (at work). Sorry :roll: !
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Sat Oct 17, 2009 5:20 pm

  • Version 0.16 of the exporter: http://www.box.net/shared/77ndexm961.
    There is only one change: I've made calculations in floating point again because motorsep asked about that.
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Sat Oct 17, 2009 5:34 pm

  • Thanks man! Going to test it today!

    EDIT: Hmm.. I see no difference in GUI and the output is the same. I expected a button <No Snap> or similar. As I said, the output is the same and is off (brushes are still aligned to the grid).
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sun Oct 18, 2009 7:01 am

  • motorsep Got it! But may the problem be in precision? I left 3 digits after decimal point in vertex coordinate numbers. May it be not enough? I can make 8 digits, for instance, or more.

    To add "no snap" button I would make two identical procedures: one with python Long and the other with python Float type. I've decided it isn't necessary. If one has floating point algorithm he(or she of course :)) may apply snap in Blender before export. In such a case it is enough to have only Floating export procedure without snap.

    I'll remake it with 8 digits after decimal point and submit in a short time. I hope today.
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Sun Oct 18, 2009 1:52 pm

  • I don't think it's precision issue, z80. Some parts of the exported brush set match misc_model precisely and other parts are off. If I move brush set to match parts that were not matching previously, they will match. But those parts of the brush set that used to match misc_model will be off.
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sun Oct 18, 2009 5:19 pm

  • I've sent you a copy of the guide, z80. Please take a look at it! And, of course, thanks for this new release, the thing that a bit surprises me and that let me upset is that the Nexuiz community didn't welcome this innovation like it should be. Only just few users replied with their comments. I sincerely expected that some devs, some level designers said their opinion about the script. IMHO this could be a VERY important feature of all idtech1/2/3 engine compliant games. Once it would be translated in C, Blender would become a REAL level editor like Crytek Sandbox or others. I know that the C-Port couldn't be managed only by you because I think it would be very difficult, but if other guys were interested in the porting this could be a real thing.
    Anyway, complaints are useless! If you think that the guide is OK, let me know and, in two days, the PDF version will be available!It's nothing fancy and it's a lot incomplete but it's GPL, so anyone that has more knowledge of me will be able to contribute!
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Sun Oct 18, 2009 8:13 pm

  • toneddu2000: do you plan on releasing your guide to the public? ;)
    motorsep
    Member
     
    Posts: 33
    Joined: Wed Jul 12, 2006 4:10 pm
    Location: San Antonio, TX

Sun Oct 18, 2009 8:44 pm

  • of course motorsep! As I said, is a matter of days. Once z80 read my mail, and corrects it, today or maybe Tuesday, the guide will be released. GPL. open. public. :D
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Sun Oct 18, 2009 11:58 pm

Mon Oct 19, 2009 7:26 am

  • motorsep Thanks for the images. I'll try to make exporting as is without aligning to a grid work correctly.

    toneddu2000 Thanks for the guide. I'll look it through and modify a few points where I'm in doubt and send it back to you. I think it will take me a couple of days. (We all are very busy on work days :))
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

Mon Oct 19, 2009 8:59 am

Fri Oct 23, 2009 8:13 am

  • Hi, I've been following this with great interest for a while as not only a way to convert blender meshes into .MAP files, but also as a way to quickly play test everything.

    I was hoping to export from Sketchup, with it's textures, into an .obj, and from there convert it, would this work seeing as it ends up as a mesh anyways?

    I've been trying and the log says, at the end :

    "File "C:\Programs Files\Blender Foundation\Blender\.blender\scripts\bpymodules\btreemesh.py", line 583, in prepareTextures
    texture = textures[0].tex
    AttributeError: 'NoneType' object has no attribute 'tex'


    I've been trying for a while because I was hoping to export from Sketchup to Blender and then to GTKRadiant, or Nexiuz to be more precise. What's up with my object? Here's the blend file.

    http://rapidshare.com/files/296737536/castle.blend
    bobcaticus
    Newbie
     
    Posts: 1
    Joined: Fri Oct 23, 2009 7:55 am

Sun Oct 25, 2009 8:31 am

  • bobcaticus Thanks for your attention to this work! I'll watch your problem and try to correct it if it's a bug.
    Don't use the force, Luke! Try to think!
    User avatar
    z80
    Advanced member
     
    Posts: 92
    Joined: Sun Jul 26, 2009 7:35 pm
    Location: Russia

PreviousNext


Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest