princeton-vl / infinigen

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

Blender 3D model does not show properly #94

Closed aaroncuilu closed 1 year ago

aaroncuilu commented 1 year ago

Hi

I installed the infinigen and run following example command successfully.

_$BLENDER -noaudio --background --python generate.py -- --seed 0 --task populate fine_terrain -g desert simple --input_folder outputs/helloworld/coarse --outputfolder outputs/helloworld/fine

It generated the fine blender model, e.g. scene.blend. When I openned it, the 3d model was full of blocks as the attached picture. I checked the readme.md file, it said.

We hide many meshes by default for viewport stability; to view them, click "Render" or use the UI to unhide them.

In Blender, I select all the objects and click Alt-H to unhide. It does not work.

When I run the command to generate RGB file. $BLENDER -noaudio --background --python generate.py -- --seed 0 --task render -g desert simple --input_folder outputs/helloworld/fine --output_folder outputs/helloworld/frames

The generated RGB files seems perfect. So I believe the Blender file should contain the correct content but did not show them.

I am wondering how to show the 3D model properly in Blender file.

Thanks for the help Aaron

desert-fine-07-09-001

spacemelon1 commented 1 year ago

Hi, maybe try this: 1) In the 3D Viewport, press the '/' key to enter Local View mode and it lets you isolate selected objects. 2) Select all the objects by pressing the 'A' key 3) Press the '/' key to exit Local View mode If that did not work try to enable 'Restriction Toggles' which can be found in the 3D viewport so 'N' key -> 'View' -> 'Restriction Toggles' checkbox is enabled. Make sure that the 'Restrict Viewport' is turned on for all the objects.

chongxian commented 1 year ago

I had the same issue

araistrick commented 1 year ago

Hello folks, sorry for the inconvinience on this. Blender makes it somewhat hard to unhide the objects, we had to use the '.hide_viewport' property to actually get performance benefits, which is not affected by the usual Alt+H hotkey.

To unhide the objects, click the viewport filter button in the topright of your screen (shown in first image, marked 1) and click the viewport button tell blender to show you options to hide/unhide objects (shown in first image, marked 2). Now, in your outliner (second image) you should see that some objects and collections are hidden. you can click the viewport icon to unhide, but beware that this may lag your viewport momentarily or cause low FPS example example2

chongxian commented 1 year ago

image hello, I try your method, but only saw the box mesh, never saw the detail mesh, how can I do to saw the detail mesh in the viewport? I hope to export the generated model, Thanks for your help.

araistrick commented 1 year ago

Hello, it does not seem that the 'hide viewport' restriction toggle button is visible in your UI. Please make sure to click the filter button highlighted in blue next to the red "1" in my screenshot to open the dropdown, then click the little viewport screen icon marked 2. This will then show the extra viewport visibility buttons shown in the middle in my second screenshot. The outliner in the top right of the screenshot you sent only shows the eye and camera icons, which means this step has not been done.

Once you have completed the above step, you can then use the hide viewport buttons to hide the placeholders collection, then unhide the unique_assets collection and maybe the scatters to see everything in the viewport.

araistrick commented 1 year ago

To make it concrete, heres a brief video demo of unhiding a monkey in a toy file. Apologies for the inconvenience, we had no choice but to apply these rarely used settings in order to make the files overwhelm the viewport. The intended usage is that you open a file then unhide only some very specific parts you want to look at, to avoid overwhelming blender.

https://youtu.be/nrgp8jOEycY

chongxian commented 1 year ago

Hello, it does not seem that the 'hide viewport' restriction toggle button is visible in your UI. Please make sure to click the filter button highlighted in blue next to the red "1" in my screenshot to open the dropdown, then click the little viewport screen icon marked 2. This will then show the extra viewport visibility buttons shown in the middle in my second screenshot. The outliner in the top right of the screenshot you sent only shows the eye and camera icons, which means this step has not been done.

Once you have completed the above step, you can then use the hide viewport buttons to hide the placeholders collection, then unhide the unique_assets collection and maybe the scatters to see everything in the viewport.

thansk for your reply, I tried it and it worked. but now I have another issue about /worldgen/tools/export/export.py , when I try to export scene.blend to .fbx, it may export some .png and report segmentation fault, never export .fbx file.

araistrick commented 1 year ago

Awesome, I will close this issue, please make a new one RE export and @David-Yan1 will help