rgsouthall / vi-suite06

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

problem with exported simulation values with VI CSV export v.2 #14

Open ttsesm opened 3 years ago

ttsesm commented 3 years ago

Hi @rgsouthall,

Another thing that I would like to report is the following. When I export the values per faces from my scenes I've noticed that the x,y,z coordinates for some faces are the same which from my understanding this shouldn't be happening. E.g.

image

I believe the problem lies to the fact that you are using bmesh.faces[x].calc_center_bounds() instead of obj.data.polygons[x].center so faces that are really close to each other give the same "center bound".

Check below where I manually check on these two faces:

>>> obj.matrix_world @ bm.faces[0].calc_center_bounds()
Vector((0.9973182678222656, 3.257697820663452, 2.7399981021881104))

>>> obj.matrix_world @ bm.faces[1].calc_center_bounds()
Vector((0.9973182678222656, 3.257697820663452, 2.7399981021881104))

>>> obj.matrix_world @ obj.data.polygons[0].center
Vector((0.5806541442871094, 3.4626996517181396, 2.7399981021881104))

>>> obj.matrix_world @ obj.data.polygons[1].center
Vector((1.4139862060546875, 3.0526998043060303, 2.7399981021881104))

You can clearly see that using the calc_center_bound() returns the same output for both faces while their actual position in the space differs.

ttsesm commented 3 years ago

Actually from a quick search I found that using calc_center_median() instead of calc_center_bounds() would be more proper function to return the center point since it gives more closer coords to the original face center point.

>>> obj.matrix_world @ bm.faces[0].calc_center_median()
Vector((0.5806541442871094, 3.4626996517181396, 2.7399981021881104))

>>> obj.matrix_world @ bm.faces[1].calc_center_median()
Vector((1.4139862060546875, 3.0526959896087646, 2.7399981021881104))

Because from what I understood bmesh does not return the face center point itself and also apparently you cannot use obj.data.polygons, please correct me if I am wrong.

ttsesm commented 3 years ago

Hi Ryan,

I noticed that you applied some changes in you last commit related to this.

However, I've noticed the following. For example check on the images below. These are some faces with their normal vectors on a surface while I do not have the LiVi results activated.

image

Once I activated the LiVi results though, you can notice that the normal vectors are getting duplicated and kind of dis-positioned:

image

and if I zoom in this seems to be because you are creating a new layer on top of the actual surfaces, which they also seem to be kind of shifted in comparison to the actual surfaces:

image

since I am not sure though if you are doing this only in the VI Display mode or you are also using these points for the exported values my question is whether the exported points are the center points of the new layer or of the actual original surfaces?

Because in my case I would need to have some consistency between the estimated lux values with the original vertices/faces.

Thanks.

ttsesm commented 3 years ago

Hi @rgsouthall

Any feedback on my last comment.

Also could you please explain what is the value 0-100 corresponds regarding the intensity of the light sources.

rgsouthall commented 3 years ago

Page 16 of the user manual for the first one. Radiance documentation for the second one. Neither are bug reports.