Hair Rendering with Mitsuba 3 (English) Unfinished…

Hair Rendering with Mitsuba 3 (English) Unfinished…

Mitsuba3 provides SOTA for pbr. This article focuses on using Mitsuba’s principled_hair BSDF and custom adjustments for high-fidelity hair rendering.

Firstly, defining the scene and hair BSDF.

import mitsuba as mi
mi.set_variant('cuda_rgb')

# Define the hair scene with a principled hair BSDF
scene_dict = {
    "type": "scene",
    "integrator": {"type": "volpath"},
    "sensor": {
        "type": "perspective",
        "film": {"type": "hdrfilm", "width": 1024, "height": 768}
    },
    "hair_object": {
        "type": "ply",
        "filename": "../scenes/hair_model.ply",
        "bsdf": {
            "type": "principled_hair",
            "melanin_concentration": 0.6,
            "sigma_a": [0.1, 0.05, 0.02],
            "roughness": 0.3,
            "azimuthal_roughness": 0.2
        }
    },
    "light": {
        "type": "point",
        "intensity": {"type": "spectrum", "value": 150.0},
        "position": [2.0, 2.0, 2.0]
    }
}

# Load and render the scene
scene = mi.load_dict(scene_dict)
image = mi.render(scene, spp=512)

# Display the rendered image
import matplotlib.pyplot as plt
plt.axis('off')
plt.imshow(image ** (1.0 / 2.2))
plt.show()
Python

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

zh_CNCN