rgsouthall / vi-suite06

VI-Suite release for Blender 2.8
32 stars 8 forks source link

Automatizing light simulation with Blender, Vi-Suite and Radiance in large scale #6

Closed ttsesm closed 3 years ago

ttsesm commented 4 years ago

Hi @rgsouthall I would like to transfer our discussion from the google groups here if you don't mind, since I believe it is gonna be easier.

As you can see in the image below I've managed to load a couple of scenes with their objects in blender, subdivided them and added a light source.

image

Now I would like to proceed by applying the lighting simulations with the Vi-Suite and radiance. However, before I start creating nodes,etc... I noticed, that the VI-Suite Object Definition tab is empty, so my guess is that the object properties are not ported automatically. Thus, I wanted to ask if it is possible to do that by using any kind of vi-suite api or I would need to that manually somehow.

Thanks.

ttsesm commented 4 years ago

Hi Ryan, I have a couple of questions which if possible I would need some guidance. I figure out that I can set the Vi-Suite Material parameters through the bpy.context.object.active_material.vi_params module.

Now as you can see in the screenshot below:

Screenshot_20201005_163517

my materials are loaded and specified as Principled BSDF and some of them have as a Base Color a texture map while some objects sometimes have more than one materials embedded.

First, I would like to ask you if you know which parameters do I need to copy in order to specify the corresponding Radiance materials. My guess is that I need the Base Color --> Material Reflectance, Specular --> Specularity, Roughness --> Roughness. Should these be sufficient?

Moreover, what about some exception cases. For example, in case that Base Color is loaded as texture map should I use the Subsurface Color instead? Then how do I specify the texture map to the radiance material? I've noticed that I can enable the flag bpy.context.object.active_material.vi_params.radtex = True but where do I specify where to find and load the or is this done automatically in 2.8 and Vi-Suite 0.6 contrariwise to what you describe in your tutorial here for 2.7 and Vi-Suite 0.4.

In case of multiple materials how do I handle this use case?

and finally is there a way to specify the LiVi Radiance type based on something or I just go with Plastic in everything?

Btw, I am specifying my light source as a plane mesh (in principle I would like to change this to an IES light source but possibly later on), do you think it is fine?

Thanks.

ttsesm commented 3 years ago

First, I would like to ask you if you know which parameters do I need to copy in order to specify the corresponding Radiance materials. My guess is that I need the Base Color --> Material Reflectance, Specular --> Specularity, Roughness --> Roughness. Should these be sufficient?

Went with this way and these values, it seems to work.

Moreover, what about some exception cases. For example, in case that Base Color is loaded as texture map should I use the Subsurface Color instead? Then how do I specify the texture map to the radiance material? I've noticed that I can enable the flag bpy.context.object.active_material.vi_params.radtex = True but where do I specify where to find and load the or is this done automatically in 2.8 and Vi-Suite 0.6 contrariwise to what you describe in your tutorial here for 2.7 and Vi-Suite 0.4.

Tested also texture mapping, and it seems to work out of the box in 2.8. Just needed to check the Texture checkbox for the corresponding material.

In case of multiple materials how do I handle this use case?

This also seems to work out of the box, just needed to loop through each material and set up the corresponding values for the Vi-Suite fields.

and finally is there a way to specify the LiVi Radiance type based on something or I just go with Plastic in everything?

This is something that I am still checking out, and it needs a bit further research.

Btw, I am specifying my light source as a plane mesh (in principle I would like to change this to an IES light source but possibly later on), do you think it is fine?

This seems also to be working fine.

ttsesm commented 3 years ago

We continue this discussion on the google groups since it is a usage question.