Hi Theo.Interesting question. I personally have not done something like this. Scripting Blender allows you to do almost anything but it may not be easy and this does not look easy.
The best way off the top of my head is to write a function that sits in the VI-Suite Radiance geometry export routine. If doing a parametric run this function would convert the data in an OBj file at every step to a mesh representation that can then be inserted into a Blender object which is the subject of the analysis. The object geometry then matches a different OBJ geometry at every step of the parametric simulation.
Placing of the lights in a suitable spot for each model will be tricky and you would need a routine to delete/create lights and put them in the right place and I am not sure you can create delete lights over steps of an animation/parametric analysis.
You would also need a routine to create the VI-Suite Radiance material you want from the names in your mtl files and match them to the faces of the model.
Geometry can indeed be used as a sensing surface but it needs to be subdivided to give suitable sensor points. This would be easier if it was done to the OBJ models before importing as a routine in the VI-Suite to do this would have to be rather clever.
Having said all that, if I had to do this I would probably do it in pure Python and repurpose sections of the VI-Suite code that I needed.It won't be easy but good luck with it.
Base Color
--> Material Reflectance
, Specular
--> Specularity
, Roughness
--> Roughness
and when there is texture I activate the Textured
checkbox and specify Subsurface Color
--> Material Reflectance
(as I understand this is not necessary though). Should these be sufficient?# tree
ng = bpy.data.node_groups.new('rad_sim', 'ViN')
# nodes
location_node = ng.nodes.new(type="No_Loc")
location_node.location = (0, 0)
geometry_node = ng.nodes.new(type="No_Li_Geo")
geometry_node.location = (230, 140)
geometry_node.cpoint = '1'
context_node = ng.nodes.new(type="No_Li_Con")
context_node.skyprog = '4'
context_node.location = (210, -120)
simulation_node = ng.nodes.new(type="No_Li_Sim")
simulation_node.location = (410, 0)
export_node = ng.nodes.new(type="No_CSV")
export_node.location = (610, -60)
# links
ng.links.new(location_node.outputs[0], context_node.inputs[0])
ng.links.new(geometry_node.outputs[0], simulation_node.inputs[0])
ng.links.new(context_node.outputs[0], simulation_node.inputs[1])
ng.links.new(simulation_node.outputs[0], export_node.inputs[0])
>>> bpy.ops.node.ligexport('INVOKE_DEFAULT')
Error: Traceback (most recent call last):
File "/home/ttsesm/blender/blender-2.83.2-linux64/2.83/scripts/addons/vi-suite06/vi_operators.py", line 587, in invoke
node = context.node
AttributeError: 'Context' object has no attribute 'node'
location: /home/ttsesm/blender/blender-2.83.2-linux64/2.83/scripts/modules/bpy/ops.py:199
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
File "/home/ttsesm/blender/blender-2.83.2-linux64/2.83/scripts/modules/bpy/ops.py", line 199, in __call__
ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
File "/home/ttsesm/blender/blender-2.83.2-linux64/2.83/scripts/addons/vi-suite06/vi_operators.py", line 587, in invoke
node = context.node
AttributeError: 'Context' object has no attribute 'node'
location: /home/ttsesm/blender/blender-2.83.2-linux64/2.83/scripts/modules/bpy/ops.py:199
>>> bpy.ops.node.csvexport('EXEC_DEFAULT')
Error: Traceback (most recent call last):
File "/home/ttsesm/blender-2.83.6-linux64/2.83/scripts/addons/vi-suite06/vi_operators.py", line 2200, in execute
node = self.node
File "/home/ttsesm/blender-2.83.6-linux64/2.83/scripts/modules/bpy_types.py", line 713, in __getattribute__
return super().__getattribute__(attr)
AttributeError: 'NODE_OT_CSV' object has no attribute 'node'
location: /home/ttsesm/blender-2.83.6-linux64/2.83/scripts/modules/bpy/ops.py:199
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
File "/home/ttsesm/blender-2.83.6-linux64/2.83/scripts/modules/bpy/ops.py", line 199, in __call__
ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Traceback (most recent call last):
File "/home/ttsesm/blender-2.83.6-linux64/2.83/scripts/addons/vi-suite06/vi_operators.py", line 2200, in execute
node = self.node
File "/home/ttsesm/blender-2.83.6-linux64/2.83/scripts/modules/bpy_types.py", line 713, in __getattribute__
return super().__getattribute__(attr)
AttributeError: 'NODE_OT_CSV' object has no attribute 'node'
rl = resnode['reslists']
zrl = list(zip(*rl))
if len(set(zrl[0])) > 1 and node.animated:
resstring = ''.join(['{} {},'.format(r[2], r[3]) for r in rl if r[0] == 'All']) + '\n'
metriclist = list(zip(*[r.split() for ri, r in enumerate(zrl[4]) if zrl[0][ri] == 'All']))
else:
resstring = ''.join(['{} {} {},'.format(r[0], r[2], r[3]) for r in rl if r[0] != 'All']) + '\n'
metriclist = list(itertools.zip_longest(*[r.split() for ri, r in enumerate(zrl[4]) if zrl[0][ri] != 'All'], fillvalue = ''))
for ml in metriclist:
resstring += ''.join(['{},'.format(m) for m in ml]) + '\n'
resstring += '\n'
with open(self.filepath, 'w') as csvfile:
csvfile.write(resstring)