princeton-vl / infinigen

Infinite Photorealistic Worlds using Procedural Generation
https://infinigen.org
BSD 3-Clause "New" or "Revised" License
5.16k stars 431 forks source link

Fail to run fluid simulation #262

Open zhihao-lin opened 5 days ago

zhihao-lin commented 5 days ago

Describe the bug

Hi @araistrick, thank you for the amazing work! Currently, I'm trying to follow the instruction in GeneratingFluidSimulations.md and run the fluid simulation, but face several challenges and no images can be generated. I will provide more details in the section below.

Steps to Reproduce

The issues I encountered during the fluid simulation contains 3 main parts:

1. Installation

After setting up the Infinigen environment, I ran bash scripts/install/compile_flip_fluids.sh to install the fluid simulation addon. However, I have the same issue with #246, which output Error: Not freed memory blocks: 26574, total unfreed memory 8.744743 MB. I found that this is triggered by this line. This is also reproduced on my another Ubuntu machine. Do you know how to resolve this issue?

2. Configuration matching

I ran the command below (without resolving the installation issue in 1.),

python -m infinigen.datagen.manage_jobs --output_folder outputs/river_videos  --num_scenes 1 \
    --pipeline_config local_64GB.gin monocular_video.gin blender_gt.gin cuda_terrain.gin \
    --pipeline_overrides iterate_scene_tasks.frame_range=[100,244] \
    --config simulated_river.gin no_assets.gin no_creatures.gin fast_terrain_assets.gin \
    --cleanup none --warmup_sec 12000

and it seems that there are some configuration matching issue: Screenshot from 2024-06-23 16-14-16 coarse.txt Screenshot from 2024-06-23 16-17-55 coarse.txt while this can be resolved by deleting two lines (assets.boulder.create_placeholder.boulder_scale = 1, core.render.hide_water = True) in infinigen_examples/configs_nature/scene_types_fluidsim/simulated_river.gin, but I'm wondering if it's caused by other potential bugs.

3. AttributeError: Calling operator "bpy.ops.flip_fluid_operators.flip_fluid_add" error

This might be related to the incomplete installation in 1. Screenshot from 2024-06-23 19-26-29 coarse.txt

What version of the code were you using?

(Below is copied from git log) fb7991e06580639202a4687937082cb63e931eb0 Merge: 4c13cdea e9ce81ac Author: pvl-bot 136786582+pvl-bot@users.noreply.github.com Date: Tue Jun 18 00:38:31 2024 -0700 Merge pull request #258 from princeton-vl/develop v1.4.0 - Preliminary release of Infinigen Indoors

Platform

Thanks for your help!

araistrick commented 4 days ago

Thanks for the thoroughly written up issue.

Error: Not freed memory blocks: 26574, total unfreed memory 8.744743 MB is a non fatal and common error. I am not positive the cause but I believe it is a bug in blender or flip fluids, not our code, but I doubt it is the cause here.

RE the No matching configurable error this is likely my fault & can be fixed by modifying those lines, I will create a patch.

RE the final flip operator failing @karhankayan may need to test.