Popular Post stgatilov Posted October 23, 2022 Popular Post Report Posted October 23, 2022 The latest dev build (dev16629-10139) supports Wavefront OBJ format for static models. Some details: Model must consist only of triangles. Quads/polys will produce warnings and won't work properly. NURBS/lines/etc are ignored. Normals and texcoords are mandatory for all triangles, otherwise model loading will fail. Widely used extension for RGB vertex colors is supported (standard OBJ does not support vertex colors). TDM materials are referenced by "usemtl textures/test_obj/rock". Standard MTL files are not supported yet. Unlike LWO and ASE imports, which try to automatically merge close vertices, no postprocessing is done for a model in OBJ format. As far as I understand, it means less suffering with smoothing groups for instance. Also it means that loading OBJ model is very fast, even for a large model. The only downside thus far is that zipped LWO file can be smaller than zipped OBJ, but I don't have exact numbers yet (I'd be happy if someone can help me with it). Speaking of OBJ format, there are several pending questions: Should we support MTL format (common subset) in TDM engine? Or as import plugin in DarkRadiant? Should we support referencing part of OBJ file as model in TDM map? Is it common to export several LODs into one OBJ? 11 1 Quote
Dragofer Posted December 23, 2022 Report Posted December 23, 2022 I've opened a ticket to ask for .obj model render support to be added to DR so this can catch on better. Support for a universal model format is very significant when obtaining models from online repositories. On 10/23/2022 at 8:39 PM, stgatilov said: Should we support referencing part of OBJ file as model in TDM map? Is it common to export several LODs into one OBJ? I'm not sure - the ideal would be if models automatically switched to LOD versions if any are available, and if the stages are in the same file this would be easier to achieve. But I think it's still going to require entityDefs with hand-calibrated distance values. Could still be convenient, the same way how having the shadowmesh and collisionmesh in the same model file is more convenient than having a _cm file somewhere nearby. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
stgatilov Posted December 27, 2022 Author Report Posted December 27, 2022 OBJ does not have anything like LOD info in the format. It only allows aplitting geometry into groups/objects of different names. Putting all the LOD settings into OBJ is barely possible. Maybe it is possible to use defaults in such case, but wouldn't it be better to implement some Blender export or DarkRadiant import for such case (i.e. that would create entityDef automatically) ? Quote
peter_spy Posted March 13 Report Posted March 13 (edited) I managed to work out the obj workflow for 3dsmax exporter -> TDM, but there are a few problems I've found. 1) It seems like TDM parses comment lines as normal lines, e.g. it complains about newline characters or dots in dates, e.g.: # 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware # File Created: 13.03.2025 12:15:16 mtllib column01_96.mtl # # object column01_96 # results in an error: The error goes away and the model is loaded correctly when I delete that whole section, so the file starts with just vertex(?) coordinates. 2) Even after getting exporter settings right in 3dsmax, models have no collision ingame. Regenerating .cm and .proc files didn't help. I'm on TDM 2.12 btw. Edited March 13 by peter_spy 1 Quote Artstation stuff
stgatilov Posted March 15 Author Report Posted March 15 On 3/13/2025 at 10:45 AM, peter_spy said: I managed to work out the obj workflow for 3dsmax exporter -> TDM, but there are a few problems I've found. I think I see both issues in the code. Created 6610, will fix shortly after 2.13 release. 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.