3D models export to Radiance

Hello,
I was wondering if there were any updated list of exporters for 3D textured models to Radiance format. I am currently working with 3D studio Max, exporting to obj, object by object, and then to rad through obj2mesh. But this would be particularly time consuming when dealing with many many objects.

Is there any workaround or plugin I might have missed? (I have found something concerning 3D Studio Max in the forum, but the page seems not accessible anymore).

Thank you.

I wrote a tool long ago to convert from a certain version of 3ds files to MGF, which could then be converted to Radiance scene geometry, but textures did not come along. The obj2mesh route is the only one that supports mapped textures AFAIK. You (or someone) could probably write a Perl or Python script to make bulk file translation easier, but I don’t know if any such exists.

Thank you for your reply. Unfortunately, I am not very much into scripting. Would it be possible to batch the obj2mesh operation in order to transform all the *.obj files contained in a folder into *.rtm files, so keeping the same name, without doing it file by file?

Hi @danka, Something like this should work. You need to change PATH_TO_YOUR_FOLDER to the local folder on your machine.


import os

folder = r'PATH_TO_YOUR_FOLDER'

obj_files = [f for f in os.listdir(folder) if f.endswith('.obj')]

for f in obj_files:
    rtm_file = f[-3:] + '.rtm'
    os.system(
        'obj2mesh %s %s' % (os.path.join(folder, f), os.path.join(folder, rtm_file))
    )
    print('converted %s to %s' % (f, rtm_file))

Great, that will save a lot of work, thank you!