Skip to content

Commit

Permalink
add blender script
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawkey committed Mar 11, 2024
1 parent 0bfeb93 commit a69f0de
Show file tree
Hide file tree
Showing 17 changed files with 392 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include kiui/lights *
recursive-include kiui/assets *
recursive-include kiui/gridencoder/src *
14 changes: 14 additions & 0 deletions docs/source/blender.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Blender

To render complex 3D models (specifically with multiple submeshes), the only choice is to use `blender` and `bpy`.

We provide an example code for rendering with blender:

```bash
python -m kiui.cli.blender_render --help
```

Its features include:
* Set which GPU to use with `--gpu 0`.
* Render with random HDRI environment texture (check `assets/blender_lights`).
* Empirical cleaning of the scene (remove the annoying plane under the object).
1 change: 1 addition & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ pip install -U git+https://github.com/ashawkey/kiuikit.git
:titlesonly:

./render.md
./blender.md
./misc.md
Binary file added kiui/assets/blender_lights/city.exr
Binary file not shown.
Binary file added kiui/assets/blender_lights/courtyard.exr
Binary file not shown.
Binary file added kiui/assets/blender_lights/forest.exr
Binary file not shown.
Binary file added kiui/assets/blender_lights/interior.exr
Binary file not shown.
6 changes: 6 additions & 0 deletions kiui/assets/blender_lights/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
All HDRIs are licenses as CC0.

These were created by Greg Zaal (HDRI Haven https://hdrihaven.com).

NOTE: extracted from blender 2.93
ref: https://blender.stackexchange.com/questions/128499/how-to-use-built-in-default-hdris-in-renders
Binary file added kiui/assets/blender_lights/night.exr
Binary file not shown.
Binary file added kiui/assets/blender_lights/studio.exr
Binary file not shown.
Binary file added kiui/assets/blender_lights/sunrise.exr
Binary file not shown.
Binary file added kiui/assets/blender_lights/sunset.exr
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a69f0de

Please sign in to comment.