-
In the tutorial for volumetric inverse rendering, the setting for the grid volume is: scene_dict['object'] = {
'type': 'cube',
'interior': {
'type': 'heterogeneous',
'sigma_t': {
'type': 'gridvolume',
'grid': mi.VolumeGrid(dr.full(mi.TensorXf, 0.002, (v_res, v_res, v_res, 1))),
'to_world': T.translate(-1).scale(2.0)
},
'scale': 40.0,
},
'bsdf': {'type': 'null'}
} I was wondering if I can add rgb color to the grid volume? Each voxel has a different color? |
Beta Was this translation helpful? Give feedback.
Answered by
njroussel
Dec 1, 2023
Replies: 1 comment 1 reply
-
I tried the following code, is it possible to have rgb abledo instead of gray? scene_dict = {
'type': 'scene',
'integrator': {'type': 'prbvolpath'},
'object': {
'type': 'cube',
'bsdf': {'type': 'null'},
'interior': {
'type': 'heterogeneous',
'sigma_t': {
'type': 'gridvolume',
'grid': mi.VolumeGrid(dr.full(mi.TensorXf, 0.002, (v_res, v_res, v_res, 1))),
'to_world': T.rotate([1, 0, 0], -90).scale(3).translate(-0.5)
},
'albedo': {
'type': 'gridvolume',
'grid': mi.VolumeGrid(dr.full(mi.TensorXf, 0.002, (v_res, v_res, v_res, 3))),
'to_world': T.rotate([1, 0, 0], -90).scale(3).translate(-0.5)
},
'scale': 40
}
},
'emitter': {'type': 'constant'}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @cnexah
This is indeed supported by the
albedo
parameter in aheterogeneous
media: https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_media.html#heterogeneous-medium-heterogeneousIn your snippet you're using the same value in all three channels, hence the gray color.
P.S: Please format your messages properly 😄