Render refractive objects in Unity HDRP (High Definition Rendering Pipeline), generating corresponding surface normals, semantic masks, depths, and refractive flow.
- Put your prefabs under ./Assets/Prefabs.
- Put your transparent materials under ./Assets/Recourses/GlassMaterials.
- Put your skyboxes under ./Assets/Recourses/HDRIImages.
- Put your opaque materials under ./Assets/Recourses/Materials.
- Put your table materials under ./Assets/Recourses/TableMaterials.
Note: It's not necessary to put your resources in the folders above. Just remember to follow the second point in the step two.
- Open the
HDRPRefractionUnity project and swich to the "Image" scene under ./New. - Select the
controllerGameObject in the Inspector window. Add your prefabs, transparent materials, skyboxes, opaque materials and table materials to the corresponding arrays. - Set the required options (e.g., training set or validation set, number of images).
- Click the
Runbutton to generate images and records.
An example to generate refractive flows:
python generate_refractive_flow.py --main_path "./HDRPRefraction/train" --num_imgs 5000Note: If you exclusively generate calibrations for refractive flow generation, then after this step you can delete the Calibration folder.
An example to generate active depth:
python generate_active_depth.py --main_path "./HDRPRefraction/train" --num_imgs 5000