Jump to content


Photo

OBJ Export proposal

obj export darkradiant

  • Please log in to reply
14 replies to this topic

#1 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 30 December 2015 - 11:23 AM

I know DR can export into OBJ, but I recall it exports brushes as split planes.

 

Is it possible to add option to export brushes as convex manifold meshes (so that level in OBJ ends up being made of multitextured cubes/parallelepipeds) ?

 

Is it also possible to export patches as meshes (or as patches, if OBJ supports them) ?

 

Is it possible to export lights, entities, etc. as dummy/empty objects (or cubes of a small size) with specific name conventions ? (it would be easier to find them in 3D app)

 

Thanks!



#2 greebo

greebo

    Heroic Coder

  • Root
  • 16053 posts

Posted 31 December 2015 - 12:10 AM

The code to export OBJ files is relatively simple and it's located in the plugins/wavefront folder. One could also write a Python script to export to OBJ format, based on the ASE exporter script. Anybody wants to have a go at this?



#3 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 31 December 2015 - 09:18 AM

There is OBJ exporter (add-on) for Blender, so I am sure some of it can be salvaged. It's basically just adding options for how to export scene and transforming brishes/ents/lights/etc. into something suitable for OBJ.



#4 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 30 January 2016 - 01:17 PM

So I am guessing it's a no-go for this project? :/

 

Actually, I just got insane idea - I can export Doom 3 map from DarkRadiant into (as-is I guess, too bad patches don't get exported :/ ), then I can duplicate imported geometry in Blender, merge all faces (probably per room), re-UV map it, bake textures from original to the re-UV mapped model (to reduce draw calls), import that into Unity and bake lighting (which sucks, because Unity's lightmap baking tools are _slow_).


Edited by motorsep, 30 January 2016 - 05:11 PM.


#5 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 30 January 2016 - 06:03 PM

Well, bad news - DR exports OBJ that isn't quite compliant - can't be imported into any version of Blender :(



#6 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 89 posts

Posted 02 February 2016 - 07:02 PM

It would be nice if DarkRadiant could export chunks of mapobjects (exact positions/rotations), so they can be combined in other software.  Currently a way I know of doing that is to use the Quake 4 editor, it can export selections of models to 1 OBJ, and even though that version of Radiant is fairly easy to obtain (you can combine the demo PK4s with the patch EXEs and launch the editor from the intro movies, and all freely available) there are a lot of funny-shaped eyebrows about the legality of doing that for "serious" projects.



#7 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 02 February 2016 - 08:36 PM

It would be nice if DarkRadiant could export chunks of mapobjects (exact positions/rotations), so they can be combined in other software.  Currently a way I know of doing that is to use the Quake 4 editor, it can export selections of models to 1 OBJ, and even though that version of Radiant is fairly easy to obtain (you can combine the demo PK4s with the patch EXEs and launch the editor from the intro movies, and all freely available) there are a lot of funny-shaped eyebrows about the legality of doing that for "serious" projects.

 

I have Quake 4. But it would be nice to use DR instead of some unrelated game.

 

Why would you want chunks?



#8 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 89 posts

Posted 02 February 2016 - 08:56 PM

If working with another engine and wanting to do as much as possible with Radiant in the workflow, placing all the mapobjects in Radiant and being able to export them "per scene" is important for minimising the number of batches and creating texture atlases for everything, instead of ending up with a sandboxed junkyard, like some other indie projects.  If not most, dare I say, end up with thousands of batches and everyone too burned-out to want to fix the framerates when it's easier to tell everyone to just suck it up and buy a new PC.  I'm not interested in making those same mistakes.  It's also handy if there's some mass operation needed on large collections of mapobjects at once, like welding and smoothing, or for unwrapping shared UVs for baking lightmaps.  It saves a huge amount of time.  The engine I'm working with has LOD stages for static meshes so we can LOD _everything_, including the map itself, and we have a script that can automatically increase and decrease the tesselation of all patches in the entire map just for that purpose.  Especially because of that, we need everything to be combined together as whole chunks.

If DarkRadiant could do this, it would not only be more convenient but peace of mind over any legal issues about trying to use it commercially.
 



#9 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 02 February 2016 - 09:00 PM

Well, OBJ goes into Blender. You can optimize it in Blender. That's why exporting each brush as single object is the best way to do it. You can pick and choose what to combine in Blender and the export pieces as FBX. It's super easy for DR devs and total freedom for artist in Blender. Win/Win.



#10 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 89 posts

Posted 02 February 2016 - 09:06 PM

Sure, and mapobjects can be easily split in up by "separating vertices by material", so it's all the same once you're in Blender.  I was mainly talking about placement and consistent workflow, to do as much mapping within Radiant as possible, and it's exactly why I'm willing to pay a nice chap to export light information (coords, proportions/rotations, colour, strength, etc) from a .MAP file to something that can be imported into both the engine and possibly Blender, via a Python script.  Then it might be possible to set up lights in these Radiants too.  This would be a lot better than just having the useless little diamond meshes floating in the air.



#11 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 02 February 2016 - 09:07 PM

Better then make Doom 3 map importer for Blender :)



#12 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 89 posts

Posted 02 February 2016 - 09:23 PM

The only other things I can imagine are particles, and that might be going too far, I don't know.  Placement of lights and particles are not deal-breakers, in my opinion, they can be redone in other software/engines reasonably quickly.

Beyond that, you are talking about the carving/merging and vis-ing of the BSP/PROC format, and I might be way off about this, but I assume those are proprietary formats and can't be used without a license, else get into some legal problems with big companies.  I know this is the case with Valve, but idTech is a little cloudy.  This is why we need to be especially careful within Radiant to make sure all edges and vertices align, so we can smooth everything nicely, and also split up the maps into what I call "sectors" so the LOD can function and the whole thing can be portalised.  Then the BSP/PROC compiling process isn't much use to us anyway, compared to the ability to LOD _everything_, which idTech could never do.

A small price to pay to be able to stick with beloved Radiant, because you just can't make 3D environments any faster, even very high-detailed ones using modern standards, into the millions of triangles.



#13 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 02 February 2016 - 09:33 PM

There are no license on formats. Blender using FBX format without AD SDK and nothing illegal about it. Plus, I am not going to or advocating using .map and other related files as is. I simply need it for my stereo VR dioramas and for testing performance in mobile VR. 



#14 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 89 posts

Posted 02 February 2016 - 09:54 PM

It's uncertain if "there are no license on formats", I will conclude the issue is unresolved based on my extensive Google searches about it, rather than take anyone's word for it as anything more than an assumption.



#15 motorsep

motorsep

    Advanced Member

  • Member
  • PipPipPip
  • 884 posts

Posted 02 February 2016 - 10:44 PM

Well, use it with GPL engine and you will be safe :)







Also tagged with one or more of these keywords: obj, export, darkradiant

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users