Skip to content

How to use cubeMap in mitsuba? #1304

Closed Answered by shinyoung-yi
ioissss asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure whether mitsuba3 already contains any useful functions handling cubemap images (though I guess not).

However, cubemap images can be rendered using a batch sensor with six subsensors, each with a 90-degree FOV.

import numpy as np
import matplotlib.pyplot as plt
import mitsuba as mi
mi.set_variant('scalar_rgb') # Both works
# mi.set_variant('cuda_ad_rgb') # Both works

def cubemap_to_world_list(to_world):
    """
    [Up Left Front(to_world) Right Back Down]
    """
    front = mi.ScalarTransform4f(to_world)
    R = mi.ScalarTransform4f.rotate
    x, y = [1,0,0], [0,1,0]
    return [front @ R(axis=x, angle=-90.), front @ R(axis=y, angle=90.), front,
            front @ R(axis=y, 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ioissss
Comment options

Answer selected by ioissss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants