News | Forum | People | FAQ | Links | Search | Register | Log in
OBJ-2-MAP V1.1
So I added a few new features to my OBJ-2-MAP utility and put together a small web page explaining how to use it.

This is a utility that can take OBJ files exported from any modeling app and convert the geometry inside into Quake brushes.

http://www.wantonhubris.com/obj-2-map/

Have at it! I think everything will work.

[edit: updated url]
First | Previous | Next | Last
 
Wow, that's amazing you were able to decompile the whole thing :o

So it is actually an openable project now? 
 
.Net decompilers are very clever these days.
Yup it's a whole VS project, decompiled to C#. 
Patch 
Hey!
I'll prepare git repo next week.
Sorry you need to wait, I was extremely busy last days and I'm heading on 4 day holiday atm, so I'll be away from computer till Monday (I'll lurk from mobile ;) )
Here you have binary, so you can use my latest changes:
http://78.47.23.219/OBJ2MAP_111.zip

It saves settings to XML file (OBJFileName.xml) when you hit GO! and load settings when you choose OBJ file.

Happy mapping! 
Blender OBJ Export? 
I have tried many times trying to get blender OBJ export to work with this tool, but each time I get a NullPointerException in the debug window. 
 
Shoot me the OBJ file and I'll see what I can do about it.

(email in my profile) 
 
ShoTro have you tried this build: http://78.47.23.219/OBJ2MAP_111.zip ?

I have used it with blender and had no problems. 
Hey Kreathor 
Could I grab your decompiled source? Wanted to play around with a few things. 
 
What languages/tools you used for UI and code itself? 
AFAIK It's C# 
 
 
eric

There's a repository that Kreathor set up over here ...

https://bitbucket.org/khreathor/obj-2-map/wiki/Home

The source has actually been updated and had a few features added ... so you contributing to that source tree would be ideal. 
 
HACK THE PLANET! 
Requires Login 
 
Ah, Cool! 
Looks like it's a private repo, I just asked kreathor to add me.

I'm going to try doing import of UV's and texture names from the obj file. If the model is triangluated and you export to Valve220 it should work flawlessly. 
 
Mother of god... 
Repo Is Public Now 
I made repo public! Sorry for inconvenience! :) 
 
ah mah gahd, this is awesome you guys! 
Hm 
There's a fewest-planes wrapping algorithm floating around somewhere that would be ideal for exporting weird shapes like dragon heads in an optimum minimum number of convex brushes ... 
Oh My Goodness! 
Just out of curiosity is it possible to use valve220 map formats to make quake1 and 2 maps for the compilers? 
 
Yes, modern Quake compilers can process Valve220. 
 
This has probably been asked a dillion times, but does the .bsp format support arbitrary texture alignment or is it as limited as .map and you need .bsp2? 
Final .BSP Dont Care 
.bsp ultimately does not give a crap since its turned into pure polygons with uv coordinates. .map brushes and the way the data is stored was purely out of speeding things up during those dark days when unwrapping and texture alignment was a pain in the butt.

In fact you could in theory edit the texture mapping after a compile and replace it. 
 
its only quake3 that has actual xyz+st+lmst+rgb coords. the earlier versions all calculate everything based upon the xyz and their texinfo's texture planes (basically like valve220 with the scale+rotation things baked in to the plane itself).

this means the (software) renderer can generate the s+t coords dynamically after clipping, instead of having to clip those s+t coords to the screen too and getting extra imprecision+inefficiencies from doing so. 
 
Wait, really? So ... potentially I could, say, model an entire level and then use whatever eric is cooking up to turn it into an actual map? With custom UVs everywhere?

Don't tell me that's true ..I'll never sleep again... 
 
bsp.exe will be having a right old party, but it sounds like it :} 
UV Conversion 
This was a lot more of a pain than I thought, lol, but I think I got it working, Here is a beta.

If anyone tries it out:

Before doing the conversion, you have to add all of the textures used by the OBJ file to a Quake WAD, and put it in the same directory as the OBJ. (The reason for this is OBJ2MAP needs to get the Quake texture sizes is order to write the correct texture axis values.)

Secondly, the texture names are read from the "usemtl" lines in the .OBJ. Whatever's after "usemtl" is used as a texture name - directories and file extensions are stripped off first. I'm pretty sure this isn't quite the correct way to read skins from a .obj, I think you're supposed to use a material file, etc..

Finally the output is Valve 220 format only, so this is only usable with Hammer/Jackhammer/TB2/etc.

Future ideas:
- read .mtl file for looking up texture name?
- automatically read in the images referenced by the OBJ and convert them to a WAD file?

I included a sample model (from xonotic) that I was testing with, along with a texture wad, so you can see how things need to be set up for it to work.

source code is here 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.