Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat


Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#1
I'm trying to build a library of game-ready parts for use in video games, and would like a library of low-poly bricks to fall back on for bricks I have not yet converted by hand. I've dug around and tried a few methods so far, but all have failed to work.

LdrDat2Obj: Processes 1,466 dats out of the 14,038 in ldraw's parts directory, and then exits silently with no error or log. the last brick it appears to process is 22385p050.dat It processes the parts in an order I can't decipher, so skipping this last brick and moving on isn't possible.

LdrDat2Obj2: no apparent batch process

Toby Nelson/TobyLobster's blender importer: seems to work well, but only allows one .dat to import at a time - that's not workable with 14,000 parts.

Matthew Morrison's blender importer: Crashes every time I try to import a .dat file. I posted more details about the crash in his thread: https://forums.ldraw.org/thread-24153.html

LDView: no apparent batch process

Stud.IO: no way I can see to create a file that contains each brick once.

If I could get the ldraw parts into any conventional 3D model format I would be able to batch convert the results into something game engines can use, including obj, fbx, stl, dae, and -probably- usd.
Reply
RE: Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#2
What about using LDView on the command line and build a batch processing aroudn it?
Reply
RE: Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#3
(2021-08-22, 12:45)KristyB Wrote: LDView: no apparent batch process

LDView itself does not support globbing (*.dat, for example), but it can be called from a batch file that does. It supports command line exports to POV, STL (monochrome output), and 3DS. Please search for ExportFiles, SaveExportType, and ExportSuffix in LDView's help file for instructions on using it.
Reply
RE: Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#4
(2021-08-22, 21:39)Travis Cobbs Wrote: LDView itself does not support globbing (*.dat, for example), but it can be called from a batch file that does. It supports command line exports to POV, STL (monochrome output), and 3DS. Please search for ExportFiles, SaveExportType, and ExportSuffix in LDView's help file for instructions on using it.
Thank you both for the suggestion!

Iterating through a list that both skips numbers and has arbitrary letters sprinkled in with the numbers seems a bit daunting, and my experience with bats file is less than rudimentary. I'm also not sure what globbing is in this context. It might take me a good while, so if anyone has other suggestions while I tinker with it I'd be glad to hear them too.
Reply
RE: Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#6
(2021-08-23, 11:22)KristyB Wrote: Thank you both for the suggestion!

Iterating through a list that both skips numbers and has arbitrary letters sprinkled in with the numbers seems a bit daunting, and my experience with bats file is less than rudimentary. I'm also not sure what globbing is in this context. It might take me a good while, so if anyone has other suggestions while I tinker with it I'd be glad to hear them too.

A simple batch file like
 
Code:
for %%f in (*.dat) do call ldview....

Should do. 

Please note, I did not try this and you would need to specify the filename (especially the ecport name) also in the ldview command string.

Add an 'echo'to see the progress
Reply
RE: Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#5
It occurs to me I can also use Python in in blender to script the import/export process, maybe? I'm already pretty familiar with Python, and Toby Nelson's .dat import options would allow me to automate the high-poly making process for a lot of the Bricks. I am going to try this route first before looking at LDView.
Reply
RE: Help converting -all- .dat parts to fbx/obj/stl/usd/anyConventionalFileFormat
#7
(2021-08-22, 12:45)KristyB Wrote: I'm trying to build a library of game-ready parts for use in video games, and would like a library of low-poly bricks to fall back on for bricks I have not yet converted by hand. I've dug around and tried a few methods so far, but all have failed to work.

LdrDat2Obj: Processes 1,466 dats out of the 14,038 in ldraw's parts directory, and then exits silently with no error or log. the last brick it appears to process is 22385p050.dat It processes the parts in an order I can't decipher, so skipping this last brick and moving on isn't possible.

LdrDat2Obj2: no apparent batch process

Toby Nelson/TobyLobster's blender importer: seems to work well, but only allows one .dat to import at a time - that's not workable with 14,000 parts.

Matthew Morrison's blender importer: Crashes every time I try to import a .dat file. I posted more details about the crash in his thread: https://forums.ldraw.org/thread-24153.html

LDView: no apparent batch process

Stud.IO: no way I can see to create a file that contains each brick once.

If I could get the ldraw parts into any conventional 3D model format I would be able to batch convert the results into something game engines can use, including obj, fbx, stl, dae, and -probably- usd.

Are you still getting the crash? I've pushed a few updates since you posted the error report.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)