diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 60d25648b..ddf7c6972 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,9 +6,6 @@ # araistrick will review everything except where specified below * @araistrick -infinigen/datagen/customgt/* @lahavlipson -infinigen/tools/ground_truth/* @lahavlipson - infinigen/terrain/* @mazeyu infinigen/core/constraints/evaluator/node_impl/* @karhankayan diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 9acbc7f21..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: -- package-ecosystem: pip - directory: "/" - schedule: - interval: weekly - time: "13:00" - groups: - python-packages: - patterns: - - "*" \ No newline at end of file diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ebd0045b2..3973f9593 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -47,4 +47,8 @@ jobs: - name: Test with pytest run: | - pytest tests -k 'not skip_for_ci' \ No newline at end of file + pytest tests -k 'not skip_for_ci' + + - name: Check for copyright statements + run: | + ruff check --output-format=github --preview --select CPY001 . \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d9bb9da52..159fbf5ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,36 +6,23 @@ RUN if [ "$APP_IMAGE" = "nvidia/cuda:12.0.0-devel-ubuntu22.04" ]; then \ echo "Using CUDA image" && \ apt-get update && \ apt-get install -y unzip sudo git g++ libglm-dev libglew-dev libglfw3-dev libgles2-mesa-dev zlib1g-dev wget cmake vim libxi6 libgconf-2-4 && \ - wget \ - https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ - && mkdir /root/.conda \ - && bash Miniconda3-latest-Linux-x86_64.sh -b \ - && rm -f Miniconda3-latest-Linux-x86_64.sh; \ - && apt-get install libxkbcommon-x11-0 \ + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ + mkdir /root/.conda && \ + bash Miniconda3-latest-Linux-x86_64.sh -b && \ + rm -f Miniconda3-latest-Linux-x86_64.sh && \ + apt-get install -y libxkbcommon-x11-0; \ else \ echo "Using Conda image" && \ - apt-get update -yq \ - && apt-get install -yq \ - cmake \ - g++ \ - libgconf-2-4 \ - libgles2-mesa-dev \ - libglew-dev \ - libglfw3-dev \ - libglm-dev \ - libxi6 \ - sudo \ - unzip \ - vim \ - zlib1g-dev; \ - && apt-get install libxkbcommon-x11-0 \ + apt-get update -yq && \ + apt-get install -yq cmake g++ libgconf-2-4 libgles2-mesa-dev libglew-dev libglfw3-dev libglm-dev libxi6 sudo unzip vim zlib1g-dev && \ + apt-get install -y libxkbcommon-x11-0; \ fi RUN mkdir /opt/infinigen WORKDIR /opt/infinigen COPY . . -RUN conda init bash \ - && . ~/.bashrc \ - && conda create --name infinigen python=3.10 \ - && conda activate infinigen \ - && pip install -e .[dev] \ No newline at end of file +RUN conda init bash && \ + . ~/.bashrc && \ + conda create --name infinigen python=3.10 -y && \ + conda activate infinigen && \ + pip install -e .[dev] diff --git a/README.md b/README.md index acc877e87..0e553a487 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Please post this repository's Github Issues page for help. Please run your comma Infinigen wouldn't be possible without the fantastic work of the [Blender Foundation](https://www.blender.org/) and it's open-source contributors. Infinigen uses many open source projects, with special thanks to [Land-Lab](https://github.com/landlab/landlab), [BlenderProc](https://github.com/DLR-RM/BlenderProc) [Blender-FLIP-Fluids](https://github.com/rlguy/Blender-FLIP-Fluids) and [Blender-Differential-Growth](https://github.com/inca/blender-differential-growth). -We thank [Thomas Kole](https://blenderartists.org/u/ThomasKole) for providing procedural clouds and [Pedro P. Lopes](https://blendswap.com/blend/30728) for the autoexposure nodegraph. +We thank [Thomas Kole](https://blenderartists.org/u/ThomasKole) for providing procedural clouds. We learned tremendously from online tutorials of [Andrew Price](https://www.youtube.com/channel/UCOKHwx1VCdgnxwbjyb9Iu1g), diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 376f4ce11..afc290ef2 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -68,3 +68,20 @@ v1.5.0 - minimize pip dependences: remove unused packages & move terrain/gt-vis packages into optional \[terrain,vis\] extras. - add parameters for object clutter, reduce excessively cluttered / slow indoors scenes - minorly improve infinigen-indoors performance via logging & asset hiding + +v1.5.1 +- Fix "base.gin" crash in generate_individual_assets +- Fix individual_export in export.py +- Fix Dockerfile +- Remove dependabot +- Add scatter unit tests and fix scatter imports +- Fix black renders due to non-hidden particle emitter + +v1.6.0 +- Add geometric tile pattern materials +- Tune window parameters and materials +- Add floating object placement generator and example command +- Add logging to terrain asset creation & simulations +- Add packaged font files to assets/fonts, fix too-many-open-fonts crash +- Fix fish school disappearing at last frame in video +- Fix crash from `fabrics.apply` diff --git a/docs/GeneratingIndividualAssets.md b/docs/GeneratingIndividualAssets.md index f0b2c2ffb..12556a62c 100644 --- a/docs/GeneratingIndividualAssets.md +++ b/docs/GeneratingIndividualAssets.md @@ -21,7 +21,23 @@ python -m infinigen_examples.generate_individual_assets --output_folder outputs/ Running the above commands will save images and .blend files into your `outputs` folder. You can customize what object is generated by changing the `-f` argument to the name of a different AssetFactory defined in the codebase (see the file `tests/test_meshes_basic.txt` for a partial list). -Please run `python -m infinigen.tools.generate_individual_assets --help` for a full list of commandline arguments. +Please run `python -m infinigen_examples.generate_individual_assets --help` for a full list of commandline arguments. + +### Generate many different assets in one command + +:warning: There are a small number of assets which are used in the main system but are not included in the tests/assets/*.txt lists for various reasons. You can read the commented lines in `tests/assets/list_nature_meshes.txt` for a partial list. There are also other types of procedural generators (lighting, colors, scatters, volumetrics, animations, etc) besides meshes/materials, which add diversity to the main rendering system but are not included in the commands below. + +Generate one of each mesh in the unit tests list: +```bash +python -m infinigen_examples.generate_individual_assets --output_folder outputs/corals -f tests/assets/list_nature_meshes.txt -n 1 --save_blend +python -m infinigen_examples.generate_individual_assets --output_folder outputs/corals -f tests/assets/list_indoor_meshes.txt -n 1 --save_blend +``` + +Generate one of each material in the unit tests list: +```bash +python -m infinigen_examples.generate_individual_assets --output_folder outputs/corals -f tests/assets/list_nature_materials.txt -n 1 --save_blend +python -m infinigen_examples.generate_individual_assets --output_folder outputs/corals -f tests/assets/list_indoor_materials.txt -n 1 --save_blend +``` ### Creating OBJ, USD, FBX and other file formats diff --git a/docs/HelloRoom.md b/docs/HelloRoom.md index aaeea6cfa..fb4cadffd 100644 --- a/docs/HelloRoom.md +++ b/docs/HelloRoom.md @@ -120,6 +120,15 @@ These settings are intended for debugging or for generating tailored datasets. I If you are using the commands from [Creating large datasets](#creating-large-datasets) you will instead add these configs as `--overrides` to the end of your command, rather than `-p` +### Generate Rooms with Floating Objects + +To enable floating objects in a room, add the override `compose_indoors.floating_objs_enabled=True`. For example: +``` +python -m infinigen_examples.generate_indoors --seed 0 --task coarse --output_folder outputs/indoors/coarse -g fast_solve.gin singleroom.gin -p compose_indoors.floating_objs_enabled=True compose_indoors.terrain_enabled=False restrict_solving.restrict_parent_rooms=\[\"DiningRoom\"\] + +``` +By default, between 15 and 25 objects are generated and have their size normalized to fit within a 0.5m cube. The number of objects can be configured with `compose_indoors.num_floating` and normalization can be disabled with `compose_indoors.norm_floating=False`. Collisions/intersections between floating objects and existing solved objects are off by default and can be enabled with `compose_indoors.enable_collision_floating=True` and `compose_indoors.enable_collision_solved=True`. + ## Run unit tests ``` pytest tests/ --disable-warnings diff --git a/infinigen/assets/objects/cloud/base.py b/infinigen/.dockerignore similarity index 100% rename from infinigen/assets/objects/cloud/base.py rename to infinigen/.dockerignore diff --git a/infinigen/OcMesher b/infinigen/OcMesher index 2cdcbacbe..d3d1441ab 160000 --- a/infinigen/OcMesher +++ b/infinigen/OcMesher @@ -1 +1 @@ -Subproject commit 2cdcbacbe62ef79dc6031e0131f916266b7372e3 +Subproject commit d3d1441ab57c48db3ec40c621fc3d0c323579e8a diff --git a/infinigen/__init__.py b/infinigen/__init__.py index 816527ea4..c6a810828 100644 --- a/infinigen/__init__.py +++ b/infinigen/__init__.py @@ -1,7 +1,12 @@ +# Copyright (C) 2023, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + import logging from pathlib import Path -__version__ = "1.5.0" +__version__ = "1.6.0-dev" def repo_root(): diff --git a/infinigen/assets/__init__.py b/infinigen/assets/__init__.py index e69de29bb..0118fec96 100644 --- a/infinigen/assets/__init__.py +++ b/infinigen/assets/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2023, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. diff --git a/infinigen/assets/color_fits.py b/infinigen/assets/color_fits.py index a4d6ba8ad..a909a8439 100644 --- a/infinigen/assets/color_fits.py +++ b/infinigen/assets/color_fits.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Stamatis Alexandropoulos, Meenal Parakh diff --git a/infinigen/assets/fluid/__init__.py b/infinigen/assets/fluid/__init__.py index 8886e3c3e..1134790c9 100644 --- a/infinigen/assets/fluid/__init__.py +++ b/infinigen/assets/fluid/__init__.py @@ -1,3 +1,8 @@ +# Copyright (C) 2023, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + from .asset_cache import FireCachingSystem from .cached_factory_wrappers import ( CachedBoulderFactory, diff --git a/infinigen/assets/fluid/asset_cache.py b/infinigen/assets/fluid/asset_cache.py index abbb74780..b086e5e81 100644 --- a/infinigen/assets/fluid/asset_cache.py +++ b/infinigen/assets/fluid/asset_cache.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/bounding_box.py b/infinigen/assets/fluid/bounding_box.py index 509ae9f98..70f7d6850 100644 --- a/infinigen/assets/fluid/bounding_box.py +++ b/infinigen/assets/fluid/bounding_box.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/cached_factory_wrappers.py b/infinigen/assets/fluid/cached_factory_wrappers.py index 11b3c8768..1c6d49fc7 100644 --- a/infinigen/assets/fluid/cached_factory_wrappers.py +++ b/infinigen/assets/fluid/cached_factory_wrappers.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/duplication_geomod.py b/infinigen/assets/fluid/duplication_geomod.py index e05cbd242..3a6f7dc65 100644 --- a/infinigen/assets/fluid/duplication_geomod.py +++ b/infinigen/assets/fluid/duplication_geomod.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/flip_fluid.py b/infinigen/assets/fluid/flip_fluid.py index 8eddc7481..f6e0e100c 100644 --- a/infinigen/assets/fluid/flip_fluid.py +++ b/infinigen/assets/fluid/flip_fluid.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/flip_init.py b/infinigen/assets/fluid/flip_init.py index 1992bfb11..6ca782aae 100644 --- a/infinigen/assets/fluid/flip_init.py +++ b/infinigen/assets/fluid/flip_init.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/fluid.py b/infinigen/assets/fluid/fluid.py index b94594588..6d9c8f748 100644 --- a/infinigen/assets/fluid/fluid.py +++ b/infinigen/assets/fluid/fluid.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/fluid_scenecomp_additions.py b/infinigen/assets/fluid/fluid_scenecomp_additions.py index 7b9383222..8f9a7ec01 100644 --- a/infinigen/assets/fluid/fluid_scenecomp_additions.py +++ b/infinigen/assets/fluid/fluid_scenecomp_additions.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/generate.py b/infinigen/assets/fluid/generate.py index b4071c5a3..f26d2d586 100644 --- a/infinigen/assets/fluid/generate.py +++ b/infinigen/assets/fluid/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/liquid_particle_material.py b/infinigen/assets/fluid/liquid_particle_material.py index 4f4a0f579..4196256e2 100644 --- a/infinigen/assets/fluid/liquid_particle_material.py +++ b/infinigen/assets/fluid/liquid_particle_material.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/run_asset_cache.py b/infinigen/assets/fluid/run_asset_cache.py index 9dbfcc932..81c419424 100644 --- a/infinigen/assets/fluid/run_asset_cache.py +++ b/infinigen/assets/fluid/run_asset_cache.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/run_tests.py b/infinigen/assets/fluid/run_tests.py index 7e7494b86..29bbc02a0 100644 --- a/infinigen/assets/fluid/run_tests.py +++ b/infinigen/assets/fluid/run_tests.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fluid/unit_tests.py b/infinigen/assets/fluid/unit_tests.py index e3f179aa9..87c665c76 100644 --- a/infinigen/assets/fluid/unit_tests.py +++ b/infinigen/assets/fluid/unit_tests.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Bold.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Bold.ttf new file mode 100644 index 000000000..7b63c6beb Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Bold.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-BoldItalic.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-BoldItalic.ttf new file mode 100644 index 000000000..0bdf8a38c Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Italic.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Italic.ttf new file mode 100644 index 000000000..dfd35bad3 Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Italic.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Light.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Light.ttf new file mode 100644 index 000000000..ac3be4141 Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Light.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-LightItalic.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-LightItalic.ttf new file mode 100644 index 000000000..3b24705ad Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-LightItalic.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Medium.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Medium.ttf new file mode 100644 index 000000000..05ded64d0 Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Medium.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-MediumItalic.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-MediumItalic.ttf new file mode 100644 index 000000000..f840323ff Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-MediumItalic.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Regular.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Regular.ttf new file mode 100644 index 000000000..245df022c Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-Regular.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf new file mode 100644 index 000000000..20181b5ac Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-SemiBoldItalic.ttf b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-SemiBoldItalic.ttf new file mode 100644 index 000000000..fa994feef Binary files /dev/null and b/infinigen/assets/fonts/Chakra_Petch/ChakraPetch-SemiBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Chakra_Petch/OFL.txt b/infinigen/assets/fonts/Chakra_Petch/OFL.txt new file mode 100644 index 000000000..ff8033ff7 --- /dev/null +++ b/infinigen/assets/fonts/Chakra_Petch/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Chakra Petch Project Authors (https://github.com/m4rc1e/Chakra-Petch.git) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Dancing_Script/DancingScript-VariableFont_wght.ttf b/infinigen/assets/fonts/Dancing_Script/DancingScript-VariableFont_wght.ttf new file mode 100644 index 000000000..af175f99b Binary files /dev/null and b/infinigen/assets/fonts/Dancing_Script/DancingScript-VariableFont_wght.ttf differ diff --git a/infinigen/assets/fonts/Dancing_Script/OFL.txt b/infinigen/assets/fonts/Dancing_Script/OFL.txt new file mode 100644 index 000000000..e37b1e8ef --- /dev/null +++ b/infinigen/assets/fonts/Dancing_Script/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2016 The Dancing Script Project Authors (https://github.com/googlefonts/DancingScript), with Reserved Font Name 'Dancing Script'. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Dancing_Script/README.txt b/infinigen/assets/fonts/Dancing_Script/README.txt new file mode 100644 index 000000000..179cb420a --- /dev/null +++ b/infinigen/assets/fonts/Dancing_Script/README.txt @@ -0,0 +1,66 @@ +Dancing Script Variable Font +============================ + +This download contains Dancing Script as both a variable font and static fonts. + +Dancing Script is a variable font with this axis: + wght + +This means all the styles are contained in a single file: + Dancing_Script/DancingScript-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Dancing Script: + Dancing_Script/static/DancingScript-Regular.ttf + Dancing_Script/static/DancingScript-Medium.ttf + Dancing_Script/static/DancingScript-SemiBold.ttf + Dancing_Script/static/DancingScript-Bold.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Bold.ttf b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Bold.ttf new file mode 100644 index 000000000..bd0a87139 Binary files /dev/null and b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Bold.ttf differ diff --git a/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Medium.ttf b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Medium.ttf new file mode 100644 index 000000000..748131f09 Binary files /dev/null and b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Medium.ttf differ diff --git a/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Regular.ttf b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Regular.ttf new file mode 100644 index 000000000..b6f096b43 Binary files /dev/null and b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-Regular.ttf differ diff --git a/infinigen/assets/fonts/Dancing_Script/static/DancingScript-SemiBold.ttf b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-SemiBold.ttf new file mode 100644 index 000000000..497036f45 Binary files /dev/null and b/infinigen/assets/fonts/Dancing_Script/static/DancingScript-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Ga_Maamli/GaMaamli-Regular.ttf b/infinigen/assets/fonts/Ga_Maamli/GaMaamli-Regular.ttf new file mode 100644 index 000000000..51a7e0e01 Binary files /dev/null and b/infinigen/assets/fonts/Ga_Maamli/GaMaamli-Regular.ttf differ diff --git a/infinigen/assets/fonts/Ga_Maamli/OFL.txt b/infinigen/assets/fonts/Ga_Maamli/OFL.txt new file mode 100644 index 000000000..cffcf9677 --- /dev/null +++ b/infinigen/assets/fonts/Ga_Maamli/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2023 The Ga Maamli Project Authors (https://github.com/SorkinType/GaMaamli) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Maname/Maname-Regular.ttf b/infinigen/assets/fonts/Maname/Maname-Regular.ttf new file mode 100644 index 000000000..000c88fe1 Binary files /dev/null and b/infinigen/assets/fonts/Maname/Maname-Regular.ttf differ diff --git a/infinigen/assets/fonts/Maname/OFL.txt b/infinigen/assets/fonts/Maname/OFL.txt new file mode 100644 index 000000000..a210e1320 --- /dev/null +++ b/infinigen/assets/fonts/Maname/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2015-2023 The Maname Project Authors (https://github.com/mooniak/maname-font) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-Black.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-Black.ttf new file mode 100644 index 000000000..50c3b33d3 Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-Black.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-BlackItalic.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-BlackItalic.ttf new file mode 100644 index 000000000..4879abac6 Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-BlackItalic.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-Bold.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-Bold.ttf new file mode 100644 index 000000000..3e10e02fa Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-Bold.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-BoldItalic.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-BoldItalic.ttf new file mode 100644 index 000000000..5b9d0ec57 Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-Italic.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-Italic.ttf new file mode 100644 index 000000000..8e9d03d3b Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-Italic.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-Light.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-Light.ttf new file mode 100644 index 000000000..034ef03d3 Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-Light.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-LightItalic.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-LightItalic.ttf new file mode 100644 index 000000000..4d19550d5 Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-LightItalic.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/Merriweather-Regular.ttf b/infinigen/assets/fonts/Merriweather/Merriweather-Regular.ttf new file mode 100644 index 000000000..3fecc7777 Binary files /dev/null and b/infinigen/assets/fonts/Merriweather/Merriweather-Regular.ttf differ diff --git a/infinigen/assets/fonts/Merriweather/OFL.txt b/infinigen/assets/fonts/Merriweather/OFL.txt new file mode 100644 index 000000000..74b634334 --- /dev/null +++ b/infinigen/assets/fonts/Merriweather/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2016 The Merriweather Project Authors (https://github.com/EbenSorkin/Merriweather), with Reserved Font Name "Merriweather". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf b/infinigen/assets/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf new file mode 100644 index 000000000..81cc32631 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/Montserrat-VariableFont_wght.ttf b/infinigen/assets/fonts/Montserrat/Montserrat-VariableFont_wght.ttf new file mode 100644 index 000000000..797c4a570 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/Montserrat-VariableFont_wght.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/OFL.txt b/infinigen/assets/fonts/Montserrat/OFL.txt new file mode 100644 index 000000000..8c09a352d --- /dev/null +++ b/infinigen/assets/fonts/Montserrat/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Montserrat/README.txt b/infinigen/assets/fonts/Montserrat/README.txt new file mode 100644 index 000000000..930137df9 --- /dev/null +++ b/infinigen/assets/fonts/Montserrat/README.txt @@ -0,0 +1,81 @@ +Montserrat Variable Font +======================== + +This download contains Montserrat as both variable fonts and static fonts. + +Montserrat is a variable font with this axis: + wght + +This means all the styles are contained in these files: + Montserrat/Montserrat-VariableFont_wght.ttf + Montserrat/Montserrat-Italic-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Montserrat: + Montserrat/static/Montserrat-Thin.ttf + Montserrat/static/Montserrat-ExtraLight.ttf + Montserrat/static/Montserrat-Light.ttf + Montserrat/static/Montserrat-Regular.ttf + Montserrat/static/Montserrat-Medium.ttf + Montserrat/static/Montserrat-SemiBold.ttf + Montserrat/static/Montserrat-Bold.ttf + Montserrat/static/Montserrat-ExtraBold.ttf + Montserrat/static/Montserrat-Black.ttf + Montserrat/static/Montserrat-ThinItalic.ttf + Montserrat/static/Montserrat-ExtraLightItalic.ttf + Montserrat/static/Montserrat-LightItalic.ttf + Montserrat/static/Montserrat-Italic.ttf + Montserrat/static/Montserrat-MediumItalic.ttf + Montserrat/static/Montserrat-SemiBoldItalic.ttf + Montserrat/static/Montserrat-BoldItalic.ttf + Montserrat/static/Montserrat-ExtraBoldItalic.ttf + Montserrat/static/Montserrat-BlackItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Black.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Black.ttf new file mode 100644 index 000000000..7af9fb442 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Black.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-BlackItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-BlackItalic.ttf new file mode 100644 index 000000000..c60836677 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-BlackItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Bold.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Bold.ttf new file mode 100644 index 000000000..0927b8133 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Bold.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-BoldItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-BoldItalic.ttf new file mode 100644 index 000000000..02f57843c Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraBold.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraBold.ttf new file mode 100644 index 000000000..e33afd434 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraBold.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf new file mode 100644 index 000000000..92fc3013c Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraLight.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraLight.ttf new file mode 100644 index 000000000..8aa56c177 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraLight.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf new file mode 100644 index 000000000..98c10f11e Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-ExtraLightItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Italic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Italic.ttf new file mode 100644 index 000000000..cff3cebcd Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Italic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Light.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Light.ttf new file mode 100644 index 000000000..fd787a81c Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Light.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-LightItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-LightItalic.ttf new file mode 100644 index 000000000..6a2c9d4c1 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-LightItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Medium.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Medium.ttf new file mode 100644 index 000000000..4012225c0 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Medium.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-MediumItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-MediumItalic.ttf new file mode 100644 index 000000000..84b253940 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-MediumItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Regular.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Regular.ttf new file mode 100644 index 000000000..f4a266dd3 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Regular.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-SemiBold.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-SemiBold.ttf new file mode 100644 index 000000000..189ce9d0c Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf new file mode 100644 index 000000000..4c59d8618 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-SemiBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-Thin.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-Thin.ttf new file mode 100644 index 000000000..7d085bba9 Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-Thin.ttf differ diff --git a/infinigen/assets/fonts/Montserrat/static/Montserrat-ThinItalic.ttf b/infinigen/assets/fonts/Montserrat/static/Montserrat-ThinItalic.ttf new file mode 100644 index 000000000..6fbfad1ad Binary files /dev/null and b/infinigen/assets/fonts/Montserrat/static/Montserrat-ThinItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/OFL.txt b/infinigen/assets/fonts/Open_Sans/OFL.txt new file mode 100644 index 000000000..cb7002a86 --- /dev/null +++ b/infinigen/assets/fonts/Open_Sans/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf b/infinigen/assets/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf new file mode 100644 index 000000000..8312b2ce9 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf b/infinigen/assets/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf new file mode 100644 index 000000000..ac587b482 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/README.txt b/infinigen/assets/fonts/Open_Sans/README.txt new file mode 100644 index 000000000..9b94759b5 --- /dev/null +++ b/infinigen/assets/fonts/Open_Sans/README.txt @@ -0,0 +1,100 @@ +Open Sans Variable Font +======================= + +This download contains Open Sans as both variable fonts and static fonts. + +Open Sans is a variable font with these axes: + wdth + wght + +This means all the styles are contained in these files: + Open_Sans/OpenSans-VariableFont_wdth,wght.ttf + Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Open Sans: + Open_Sans/static/OpenSans_Condensed-Light.ttf + Open_Sans/static/OpenSans_Condensed-Regular.ttf + Open_Sans/static/OpenSans_Condensed-Medium.ttf + Open_Sans/static/OpenSans_Condensed-SemiBold.ttf + Open_Sans/static/OpenSans_Condensed-Bold.ttf + Open_Sans/static/OpenSans_Condensed-ExtraBold.ttf + Open_Sans/static/OpenSans_SemiCondensed-Light.ttf + Open_Sans/static/OpenSans_SemiCondensed-Regular.ttf + Open_Sans/static/OpenSans_SemiCondensed-Medium.ttf + Open_Sans/static/OpenSans_SemiCondensed-SemiBold.ttf + Open_Sans/static/OpenSans_SemiCondensed-Bold.ttf + Open_Sans/static/OpenSans_SemiCondensed-ExtraBold.ttf + Open_Sans/static/OpenSans-Light.ttf + Open_Sans/static/OpenSans-Regular.ttf + Open_Sans/static/OpenSans-Medium.ttf + Open_Sans/static/OpenSans-SemiBold.ttf + Open_Sans/static/OpenSans-Bold.ttf + Open_Sans/static/OpenSans-ExtraBold.ttf + Open_Sans/static/OpenSans_Condensed-LightItalic.ttf + Open_Sans/static/OpenSans_Condensed-Italic.ttf + Open_Sans/static/OpenSans_Condensed-MediumItalic.ttf + Open_Sans/static/OpenSans_Condensed-SemiBoldItalic.ttf + Open_Sans/static/OpenSans_Condensed-BoldItalic.ttf + Open_Sans/static/OpenSans_Condensed-ExtraBoldItalic.ttf + Open_Sans/static/OpenSans_SemiCondensed-LightItalic.ttf + Open_Sans/static/OpenSans_SemiCondensed-Italic.ttf + Open_Sans/static/OpenSans_SemiCondensed-MediumItalic.ttf + Open_Sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf + Open_Sans/static/OpenSans_SemiCondensed-BoldItalic.ttf + Open_Sans/static/OpenSans_SemiCondensed-ExtraBoldItalic.ttf + Open_Sans/static/OpenSans-LightItalic.ttf + Open_Sans/static/OpenSans-Italic.ttf + Open_Sans/static/OpenSans-MediumItalic.ttf + Open_Sans/static/OpenSans-SemiBoldItalic.ttf + Open_Sans/static/OpenSans-BoldItalic.ttf + Open_Sans/static/OpenSans-ExtraBoldItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-Bold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Bold.ttf new file mode 100644 index 000000000..98c74e0a4 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Bold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-BoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-BoldItalic.ttf new file mode 100644 index 000000000..855892833 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-ExtraBold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-ExtraBold.ttf new file mode 100644 index 000000000..4eb339352 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-ExtraBold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-ExtraBoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 000000000..75789b42d Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-ExtraBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-Italic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Italic.ttf new file mode 100644 index 000000000..29ff69386 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Italic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-Light.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Light.ttf new file mode 100644 index 000000000..ea175cc30 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Light.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-LightItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-LightItalic.ttf new file mode 100644 index 000000000..edbfe0b78 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-LightItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-Medium.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Medium.ttf new file mode 100644 index 000000000..ae716936e Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Medium.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-MediumItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-MediumItalic.ttf new file mode 100644 index 000000000..6d1e09b24 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-MediumItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-Regular.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Regular.ttf new file mode 100644 index 000000000..67803bb64 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-Regular.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-SemiBold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-SemiBold.ttf new file mode 100644 index 000000000..e5ab46443 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans-SemiBoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans-SemiBoldItalic.ttf new file mode 100644 index 000000000..cd23e154c Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans-SemiBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Bold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Bold.ttf new file mode 100644 index 000000000..525397da6 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Bold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-BoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-BoldItalic.ttf new file mode 100644 index 000000000..d6c9bc0ac Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-ExtraBold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-ExtraBold.ttf new file mode 100644 index 000000000..3e600b9ae Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-ExtraBold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-ExtraBoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-ExtraBoldItalic.ttf new file mode 100644 index 000000000..039365088 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-ExtraBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Italic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Italic.ttf new file mode 100644 index 000000000..fdf0a52e5 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Italic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Light.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Light.ttf new file mode 100644 index 000000000..459be7b42 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Light.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-LightItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-LightItalic.ttf new file mode 100644 index 000000000..5f05d08e4 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-LightItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Medium.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Medium.ttf new file mode 100644 index 000000000..802200d27 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Medium.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-MediumItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-MediumItalic.ttf new file mode 100644 index 000000000..b43786bb5 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-MediumItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Regular.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Regular.ttf new file mode 100644 index 000000000..a2a83ac6c Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-Regular.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-SemiBold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-SemiBold.ttf new file mode 100644 index 000000000..75bcd43c4 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-SemiBoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-SemiBoldItalic.ttf new file mode 100644 index 000000000..9fcaa52ea Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_Condensed-SemiBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Bold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Bold.ttf new file mode 100644 index 000000000..dc927fc95 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Bold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-BoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-BoldItalic.ttf new file mode 100644 index 000000000..7601048e7 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-ExtraBold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-ExtraBold.ttf new file mode 100644 index 000000000..d6864b1df Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-ExtraBold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-ExtraBoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-ExtraBoldItalic.ttf new file mode 100644 index 000000000..ec7ade587 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-ExtraBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Italic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Italic.ttf new file mode 100644 index 000000000..7fc00c82d Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Italic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Light.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Light.ttf new file mode 100644 index 000000000..5936496a3 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Light.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-LightItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-LightItalic.ttf new file mode 100644 index 000000000..7ced21a76 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-LightItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Medium.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Medium.ttf new file mode 100644 index 000000000..25b1aadf0 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Medium.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-MediumItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-MediumItalic.ttf new file mode 100644 index 000000000..fd87f7859 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-MediumItalic.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Regular.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Regular.ttf new file mode 100644 index 000000000..5b09b35bc Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-Regular.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-SemiBold.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-SemiBold.ttf new file mode 100644 index 000000000..fff3a3720 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf new file mode 100644 index 000000000..3874205d6 Binary files /dev/null and b/infinigen/assets/fonts/Open_Sans/static/OpenSans_SemiCondensed-SemiBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Oswald/OFL.txt b/infinigen/assets/fonts/Oswald/OFL.txt new file mode 100644 index 000000000..b0626d75d --- /dev/null +++ b/infinigen/assets/fonts/Oswald/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2016 The Oswald Project Authors (https://github.com/googlefonts/OswaldFont) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Oswald/Oswald-VariableFont_wght.ttf b/infinigen/assets/fonts/Oswald/Oswald-VariableFont_wght.ttf new file mode 100644 index 000000000..938e912a9 Binary files /dev/null and b/infinigen/assets/fonts/Oswald/Oswald-VariableFont_wght.ttf differ diff --git a/infinigen/assets/fonts/Oswald/README.txt b/infinigen/assets/fonts/Oswald/README.txt new file mode 100644 index 000000000..fc9b9454c --- /dev/null +++ b/infinigen/assets/fonts/Oswald/README.txt @@ -0,0 +1,68 @@ +Oswald Variable Font +==================== + +This download contains Oswald as both a variable font and static fonts. + +Oswald is a variable font with this axis: + wght + +This means all the styles are contained in a single file: + Oswald/Oswald-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Oswald: + Oswald/static/Oswald-ExtraLight.ttf + Oswald/static/Oswald-Light.ttf + Oswald/static/Oswald-Regular.ttf + Oswald/static/Oswald-Medium.ttf + Oswald/static/Oswald-SemiBold.ttf + Oswald/static/Oswald-Bold.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/infinigen/assets/fonts/Oswald/static/Oswald-Bold.ttf b/infinigen/assets/fonts/Oswald/static/Oswald-Bold.ttf new file mode 100644 index 000000000..b9c6e3767 Binary files /dev/null and b/infinigen/assets/fonts/Oswald/static/Oswald-Bold.ttf differ diff --git a/infinigen/assets/fonts/Oswald/static/Oswald-ExtraLight.ttf b/infinigen/assets/fonts/Oswald/static/Oswald-ExtraLight.ttf new file mode 100644 index 000000000..965e80d68 Binary files /dev/null and b/infinigen/assets/fonts/Oswald/static/Oswald-ExtraLight.ttf differ diff --git a/infinigen/assets/fonts/Oswald/static/Oswald-Light.ttf b/infinigen/assets/fonts/Oswald/static/Oswald-Light.ttf new file mode 100644 index 000000000..cc93b90b6 Binary files /dev/null and b/infinigen/assets/fonts/Oswald/static/Oswald-Light.ttf differ diff --git a/infinigen/assets/fonts/Oswald/static/Oswald-Medium.ttf b/infinigen/assets/fonts/Oswald/static/Oswald-Medium.ttf new file mode 100644 index 000000000..187ecee75 Binary files /dev/null and b/infinigen/assets/fonts/Oswald/static/Oswald-Medium.ttf differ diff --git a/infinigen/assets/fonts/Oswald/static/Oswald-Regular.ttf b/infinigen/assets/fonts/Oswald/static/Oswald-Regular.ttf new file mode 100644 index 000000000..5903df43b Binary files /dev/null and b/infinigen/assets/fonts/Oswald/static/Oswald-Regular.ttf differ diff --git a/infinigen/assets/fonts/Oswald/static/Oswald-SemiBold.ttf b/infinigen/assets/fonts/Oswald/static/Oswald-SemiBold.ttf new file mode 100644 index 000000000..7c3a08860 Binary files /dev/null and b/infinigen/assets/fonts/Oswald/static/Oswald-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Pacifico/OFL.txt b/infinigen/assets/fonts/Pacifico/OFL.txt new file mode 100644 index 000000000..141cf8f8a --- /dev/null +++ b/infinigen/assets/fonts/Pacifico/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Pacifico Project Authors (https://github.com/googlefonts/Pacifico) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Pacifico/Pacifico-Regular.ttf b/infinigen/assets/fonts/Pacifico/Pacifico-Regular.ttf new file mode 100644 index 000000000..e7def95d3 Binary files /dev/null and b/infinigen/assets/fonts/Pacifico/Pacifico-Regular.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/OFL.txt b/infinigen/assets/fonts/Playfair_Display/OFL.txt new file mode 100644 index 000000000..d198a1303 --- /dev/null +++ b/infinigen/assets/fonts/Playfair_Display/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2017 The Playfair Display Project Authors (https://github.com/clauseggers/Playfair-Display), with Reserved Font Name "Playfair Display" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/infinigen/assets/fonts/Playfair_Display/PlayfairDisplay-Italic-VariableFont_wght.ttf b/infinigen/assets/fonts/Playfair_Display/PlayfairDisplay-Italic-VariableFont_wght.ttf new file mode 100644 index 000000000..0d7c4979f Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/PlayfairDisplay-Italic-VariableFont_wght.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/PlayfairDisplay-VariableFont_wght.ttf b/infinigen/assets/fonts/Playfair_Display/PlayfairDisplay-VariableFont_wght.ttf new file mode 100644 index 000000000..eafb6ffc1 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/PlayfairDisplay-VariableFont_wght.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/README.txt b/infinigen/assets/fonts/Playfair_Display/README.txt new file mode 100644 index 000000000..c96f492c7 --- /dev/null +++ b/infinigen/assets/fonts/Playfair_Display/README.txt @@ -0,0 +1,75 @@ +Playfair Display Variable Font +============================== + +This download contains Playfair Display as both variable fonts and static fonts. + +Playfair Display is a variable font with this axis: + wght + +This means all the styles are contained in these files: + Playfair_Display/PlayfairDisplay-VariableFont_wght.ttf + Playfair_Display/PlayfairDisplay-Italic-VariableFont_wght.ttf + +If your app fully supports variable fonts, you can now pick intermediate styles +that aren’t available as static fonts. Not all apps support variable fonts, and +in those cases you can use the static font files for Playfair Display: + Playfair_Display/static/PlayfairDisplay-Regular.ttf + Playfair_Display/static/PlayfairDisplay-Medium.ttf + Playfair_Display/static/PlayfairDisplay-SemiBold.ttf + Playfair_Display/static/PlayfairDisplay-Bold.ttf + Playfair_Display/static/PlayfairDisplay-ExtraBold.ttf + Playfair_Display/static/PlayfairDisplay-Black.ttf + Playfair_Display/static/PlayfairDisplay-Italic.ttf + Playfair_Display/static/PlayfairDisplay-MediumItalic.ttf + Playfair_Display/static/PlayfairDisplay-SemiBoldItalic.ttf + Playfair_Display/static/PlayfairDisplay-BoldItalic.ttf + Playfair_Display/static/PlayfairDisplay-ExtraBoldItalic.ttf + Playfair_Display/static/PlayfairDisplay-BlackItalic.ttf + +Get started +----------- + +1. Install the font files you want to use + +2. Use your app's font picker to view the font family and all the +available styles + +Learn more about variable fonts +------------------------------- + + https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts + https://variablefonts.typenetwork.com + https://medium.com/variable-fonts + +In desktop apps + + https://theblog.adobe.com/can-variable-fonts-illustrator-cc + https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts + +Online + + https://developers.google.com/fonts/docs/getting_started + https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide + https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts + +Installing fonts + + MacOS: https://support.apple.com/en-us/HT201749 + Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux + Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows + +Android Apps + + https://developers.google.com/fonts/docs/android + https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts + +License +------- +Please read the full license text (OFL.txt) to understand the permissions, +restrictions and requirements for usage, redistribution, and modification. + +You can use them in your products & projects – print or digital, +commercial or otherwise. + +This isn't legal advice, please consider consulting a lawyer and see the full +license for all details. diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Black.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Black.ttf new file mode 100644 index 000000000..204f5bfd0 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Black.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-BlackItalic.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-BlackItalic.ttf new file mode 100644 index 000000000..5fdffada1 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-BlackItalic.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Bold.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Bold.ttf new file mode 100644 index 000000000..029a1a60e Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Bold.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-BoldItalic.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-BoldItalic.ttf new file mode 100644 index 000000000..921435fef Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-BoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-ExtraBold.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-ExtraBold.ttf new file mode 100644 index 000000000..1efccadb7 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-ExtraBold.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-ExtraBoldItalic.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-ExtraBoldItalic.ttf new file mode 100644 index 000000000..6a37707ac Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-ExtraBoldItalic.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Italic.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Italic.ttf new file mode 100644 index 000000000..436dff08a Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Italic.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Medium.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Medium.ttf new file mode 100644 index 000000000..f92eba432 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Medium.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-MediumItalic.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-MediumItalic.ttf new file mode 100644 index 000000000..8b8ae4d2f Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-MediumItalic.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Regular.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Regular.ttf new file mode 100644 index 000000000..503b7c44f Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-Regular.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBold.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBold.ttf new file mode 100644 index 000000000..1c2a57b49 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBold.ttf differ diff --git a/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBoldItalic.ttf b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBoldItalic.ttf new file mode 100644 index 000000000..cd47cca15 Binary files /dev/null and b/infinigen/assets/fonts/Playfair_Display/static/PlayfairDisplay-SemiBoldItalic.ttf differ diff --git a/infinigen/assets/lighting/__init__.py b/infinigen/assets/lighting/__init__.py index 0a1166c69..e3f928c17 100644 --- a/infinigen/assets/lighting/__init__.py +++ b/infinigen/assets/lighting/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/lighting/caustics_lamp.py b/infinigen/assets/lighting/caustics_lamp.py index 3a704f717..7b99dc7a2 100644 --- a/infinigen/assets/lighting/caustics_lamp.py +++ b/infinigen/assets/lighting/caustics_lamp.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Lingjie Mei diff --git a/infinigen/assets/lighting/hdri_lighting.py b/infinigen/assets/lighting/hdri_lighting.py index c769dcc20..235f79315 100644 --- a/infinigen/assets/lighting/hdri_lighting.py +++ b/infinigen/assets/lighting/hdri_lighting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/lighting/holdout_lighting.py b/infinigen/assets/lighting/holdout_lighting.py index 8eee37a2d..315a1822e 100644 --- a/infinigen/assets/lighting/holdout_lighting.py +++ b/infinigen/assets/lighting/holdout_lighting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/lighting/indoor_lights.py b/infinigen/assets/lighting/indoor_lights.py index 8ada1b331..5d9c499d8 100644 --- a/infinigen/assets/lighting/indoor_lights.py +++ b/infinigen/assets/lighting/indoor_lights.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/lighting/sky_lighting.py b/infinigen/assets/lighting/sky_lighting.py index 0af0e3212..5f26c5716 100644 --- a/infinigen/assets/lighting/sky_lighting.py +++ b/infinigen/assets/lighting/sky_lighting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Zeyu Ma, Kaiyu Yang, Lingjie Mei diff --git a/infinigen/assets/lighting/three_point_lighting.py b/infinigen/assets/lighting/three_point_lighting.py index 3cb0026ca..4c5baa574 100644 --- a/infinigen/assets/lighting/three_point_lighting.py +++ b/infinigen/assets/lighting/three_point_lighting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/material_assignments.py b/infinigen/assets/material_assignments.py index 629220af2..853ea6cfc 100644 --- a/infinigen/assets/material_assignments.py +++ b/infinigen/assets/material_assignments.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Meenal Parakh @@ -598,6 +598,23 @@ def rug_materials(): } +def window_materials(): + metal_shaders = get_all_metal_shaders() + plastic_shaders = [plastic_rough.shader_rough_plastic] + wood_shaders = [wood.shader_wood] + glass_shaders = [glass.shader_glass] + + frame_shaders = metal_shaders + plastic_shaders + wood_shaders + return { + "frame": TextureAssignments(frame_shaders, [1.0] * len(frame_shaders)), + "curtain": TextureAssignments(frame_shaders, [1.0] * len(frame_shaders)), + "curtain_frame": TextureAssignments(metal_shaders, [1.0] * len(metal_shaders)), + "glass": TextureAssignments(metal_shaders, [1.0] * len(metal_shaders)), + "wear_tear": [procedural_scratch, procedural_edge_wear], + "wear_tear_prob": [DEFAULT_SCRATCH_PROB, DEFAULT_EDGE_WEAR_PROB], + } + + AssetList = { # appliances "BeverageFridgeFactory": beverage_fridge_materials, # looks like dishwasher currently @@ -688,6 +705,6 @@ def rug_materials(): "WallArtFactory": wall_art_materials, "MirrorFactory": mirror_materials, # window - "WindowFactory": None, + "WindowFactory": window_materials, "RugFactory": rug_materials, } diff --git a/infinigen/assets/materials/__init__.py b/infinigen/assets/materials/__init__.py index e455c367b..1fa41974a 100644 --- a/infinigen/assets/materials/__init__.py +++ b/infinigen/assets/materials/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/aluminumdisp2tut.py b/infinigen/assets/materials/aluminumdisp2tut.py index 86653e017..8469dc525 100644 --- a/infinigen/assets/materials/aluminumdisp2tut.py +++ b/infinigen/assets/materials/aluminumdisp2tut.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/art.py b/infinigen/assets/materials/art.py index 8c51aa481..d03d90d11 100644 --- a/infinigen/assets/materials/art.py +++ b/infinigen/assets/materials/art.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -6,12 +6,12 @@ from numpy.random import uniform from infinigen.assets.materials.fabrics.fabric_random import fabric_shader_list +from infinigen.assets.utils.decorate import read_uv, write_uv +from infinigen.core.nodes import Nodes, NodeWrangler from infinigen.core.util.math import FixedSeed from infinigen.core.util.random import log_uniform from infinigen.core.util.random import random_general as rg -from ...core.nodes import Nodes, NodeWrangler -from ..utils.decorate import read_uv, write_uv from . import rug, text diff --git a/infinigen/assets/materials/atmosphere_light_haze.py b/infinigen/assets/materials/atmosphere_light_haze.py index ffa8cfbb1..92d944dd6 100644 --- a/infinigen/assets/materials/atmosphere_light_haze.py +++ b/infinigen/assets/materials/atmosphere_light_haze.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Zeyu Ma diff --git a/infinigen/assets/materials/bark.py b/infinigen/assets/materials/bark.py index 447d62c6d..586b5af6e 100644 --- a/infinigen/assets/materials/bark.py +++ b/infinigen/assets/materials/bark.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/bark_birch.py b/infinigen/assets/materials/bark_birch.py index 218d66288..ce77e6d66 100644 --- a/infinigen/assets/materials/bark_birch.py +++ b/infinigen/assets/materials/bark_birch.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/bark_random.py b/infinigen/assets/materials/bark_random.py index 615ae157a..f32850d27 100644 --- a/infinigen/assets/materials/bark_random.py +++ b/infinigen/assets/materials/bark_random.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/basic_bsdf.py b/infinigen/assets/materials/basic_bsdf.py index 4d402ffc9..9e8a4bdb0 100644 --- a/infinigen/assets/materials/basic_bsdf.py +++ b/infinigen/assets/materials/basic_bsdf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/beak.py b/infinigen/assets/materials/beak.py index e34febbd7..39a7861b7 100644 --- a/infinigen/assets/materials/beak.py +++ b/infinigen/assets/materials/beak.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yihan Wang diff --git a/infinigen/assets/materials/beverage_fridge_shaders.py b/infinigen/assets/materials/beverage_fridge_shaders.py index f114720fa..571a224a8 100644 --- a/infinigen/assets/materials/beverage_fridge_shaders.py +++ b/infinigen/assets/materials/beverage_fridge_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/bird.py b/infinigen/assets/materials/bird.py index 11f66aa8d..643ebcf80 100644 --- a/infinigen/assets/materials/bird.py +++ b/infinigen/assets/materials/bird.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/black_plastic.py b/infinigen/assets/materials/black_plastic.py index 871239420..bfb92eeee 100644 --- a/infinigen/assets/materials/black_plastic.py +++ b/infinigen/assets/materials/black_plastic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/blackbody_shader.py b/infinigen/assets/materials/blackbody_shader.py index 5d7734c1d..66629cc4a 100644 --- a/infinigen/assets/materials/blackbody_shader.py +++ b/infinigen/assets/materials/blackbody_shader.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/materials/bone.py b/infinigen/assets/materials/bone.py index d8545db0e..2c2f533a8 100644 --- a/infinigen/assets/materials/bone.py +++ b/infinigen/assets/materials/bone.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/brick.py b/infinigen/assets/materials/brick.py index 9190309ab..995c72ce0 100644 --- a/infinigen/assets/materials/brick.py +++ b/infinigen/assets/materials/brick.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/bumpy_rubber_floor.py b/infinigen/assets/materials/bumpy_rubber_floor.py index 5ad9a1f38..f3b488a81 100644 --- a/infinigen/assets/materials/bumpy_rubber_floor.py +++ b/infinigen/assets/materials/bumpy_rubber_floor.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/ceiling_light_shaders.py b/infinigen/assets/materials/ceiling_light_shaders.py index fb15d9bf4..a35274ce2 100644 --- a/infinigen/assets/materials/ceiling_light_shaders.py +++ b/infinigen/assets/materials/ceiling_light_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/ceramic.py b/infinigen/assets/materials/ceramic.py index 488f75cc4..7341271c3 100644 --- a/infinigen/assets/materials/ceramic.py +++ b/infinigen/assets/materials/ceramic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/chitin.py b/infinigen/assets/materials/chitin.py index fe94cd427..17ad358e7 100644 --- a/infinigen/assets/materials/chitin.py +++ b/infinigen/assets/materials/chitin.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/chunkyrock.py b/infinigen/assets/materials/chunkyrock.py index e9d969f9f..aee880372 100644 --- a/infinigen/assets/materials/chunkyrock.py +++ b/infinigen/assets/materials/chunkyrock.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/cobble_stone.py b/infinigen/assets/materials/cobble_stone.py index 8b295d698..0971462d4 100644 --- a/infinigen/assets/materials/cobble_stone.py +++ b/infinigen/assets/materials/cobble_stone.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Mingzhe Wang, Zeyu Ma diff --git a/infinigen/assets/materials/common.py b/infinigen/assets/materials/common.py index 8622e3f89..abcdc4ac0 100644 --- a/infinigen/assets/materials/common.py +++ b/infinigen/assets/materials/common.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/cracked_ground.py b/infinigen/assets/materials/cracked_ground.py index ac9848e53..a9a2d9762 100644 --- a/infinigen/assets/materials/cracked_ground.py +++ b/infinigen/assets/materials/cracked_ground.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Zeyu Ma diff --git a/infinigen/assets/materials/dirt.py b/infinigen/assets/materials/dirt.py index 66410fac5..041f2752e 100644 --- a/infinigen/assets/materials/dirt.py +++ b/infinigen/assets/materials/dirt.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/dishwasher_shaders.py b/infinigen/assets/materials/dishwasher_shaders.py index 0de73b6ff..e70ab1e1a 100644 --- a/infinigen/assets/materials/dishwasher_shaders.py +++ b/infinigen/assets/materials/dishwasher_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/eyeball.py b/infinigen/assets/materials/eyeball.py index 278ceea13..0ef71e087 100644 --- a/infinigen/assets/materials/eyeball.py +++ b/infinigen/assets/materials/eyeball.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/fabrics/__init__.py b/infinigen/assets/materials/fabrics/__init__.py index 278d1d128..831d33330 100644 --- a/infinigen/assets/materials/fabrics/__init__.py +++ b/infinigen/assets/materials/fabrics/__init__.py @@ -1,8 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei - from . import fabric_random from .coarse_knit_fabric import shader_coarse_knit_fabric from .fine_knit_fabric import shader_fine_knit_fabric diff --git a/infinigen/assets/materials/fabrics/coarse_knit_fabric.py b/infinigen/assets/materials/fabrics/coarse_knit_fabric.py index 3f2d16501..ebb9dda0c 100644 --- a/infinigen/assets/materials/fabrics/coarse_knit_fabric.py +++ b/infinigen/assets/materials/fabrics/coarse_knit_fabric.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Meenal Parakh diff --git a/infinigen/assets/materials/fabrics/fabric_random.py b/infinigen/assets/materials/fabrics/fabric_random.py index 775199a34..8dea8b2f6 100644 --- a/infinigen/assets/materials/fabrics/fabric_random.py +++ b/infinigen/assets/materials/fabrics/fabric_random.py @@ -1,7 +1,12 @@ +# Copyright (C) 2023, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +from infinigen.assets.materials import common +from infinigen.assets.utils.uv import unwrap_faces from infinigen.core.util.random import random_general as rg -from ...utils.uv import unwrap_faces -from .. import common from .coarse_knit_fabric import shader_coarse_knit_fabric from .fine_knit_fabric import shader_fine_knit_fabric from .leather import shader_leather diff --git a/infinigen/assets/materials/fabrics/fine_knit_fabric.py b/infinigen/assets/materials/fabrics/fine_knit_fabric.py index 99c41a0fa..9e43e1ebc 100644 --- a/infinigen/assets/materials/fabrics/fine_knit_fabric.py +++ b/infinigen/assets/materials/fabrics/fine_knit_fabric.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Meenal Parakh diff --git a/infinigen/assets/materials/fabrics/general_fabric.py b/infinigen/assets/materials/fabrics/general_fabric.py index 2a3af9593..89299619c 100644 --- a/infinigen/assets/materials/fabrics/general_fabric.py +++ b/infinigen/assets/materials/fabrics/general_fabric.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/fabrics/leather.py b/infinigen/assets/materials/fabrics/leather.py index 6febeb8f2..e9f810adb 100644 --- a/infinigen/assets/materials/fabrics/leather.py +++ b/infinigen/assets/materials/fabrics/leather.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/fabrics/lined_fabric.py b/infinigen/assets/materials/fabrics/lined_fabric.py index 0842d5a43..6ff993fee 100644 --- a/infinigen/assets/materials/fabrics/lined_fabric.py +++ b/infinigen/assets/materials/fabrics/lined_fabric.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Meenal Parakh diff --git a/infinigen/assets/materials/fabrics/sofa_fabric.py b/infinigen/assets/materials/fabrics/sofa_fabric.py index 9705e85e3..4d77ffdf2 100644 --- a/infinigen/assets/materials/fabrics/sofa_fabric.py +++ b/infinigen/assets/materials/fabrics/sofa_fabric.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/fabrics/velvet.py b/infinigen/assets/materials/fabrics/velvet.py index db54ed40e..eed291ecd 100644 --- a/infinigen/assets/materials/fabrics/velvet.py +++ b/infinigen/assets/materials/fabrics/velvet.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Stamatis Alexandropoulos diff --git a/infinigen/assets/materials/face_size_visualizer.py b/infinigen/assets/materials/face_size_visualizer.py index 73aebc06b..3f7d1e12d 100644 --- a/infinigen/assets/materials/face_size_visualizer.py +++ b/infinigen/assets/materials/face_size_visualizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/fish_eye_shader.py b/infinigen/assets/materials/fish_eye_shader.py index 757d2f70e..190865169 100644 --- a/infinigen/assets/materials/fish_eye_shader.py +++ b/infinigen/assets/materials/fish_eye_shader.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/fishbody.py b/infinigen/assets/materials/fishbody.py index f28e4f817..776560e3e 100644 --- a/infinigen/assets/materials/fishbody.py +++ b/infinigen/assets/materials/fishbody.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/fishfin.py b/infinigen/assets/materials/fishfin.py index 24e48951b..20e265cf9 100644 --- a/infinigen/assets/materials/fishfin.py +++ b/infinigen/assets/materials/fishfin.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/giraffe_attr.py b/infinigen/assets/materials/giraffe_attr.py index b1cc8d464..cbb5b88d4 100644 --- a/infinigen/assets/materials/giraffe_attr.py +++ b/infinigen/assets/materials/giraffe_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang, Alex Raistrick diff --git a/infinigen/assets/materials/glass.py b/infinigen/assets/materials/glass.py index 8d55dd9d6..eb8d1765d 100644 --- a/infinigen/assets/materials/glass.py +++ b/infinigen/assets/materials/glass.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/glass_volume.py b/infinigen/assets/materials/glass_volume.py index a4e998acc..884458ae4 100644 --- a/infinigen/assets/materials/glass_volume.py +++ b/infinigen/assets/materials/glass_volume.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo, Lingjie Mei diff --git a/infinigen/assets/materials/grass_blade_texture.py b/infinigen/assets/materials/grass_blade_texture.py index 35f07ecab..035668256 100644 --- a/infinigen/assets/materials/grass_blade_texture.py +++ b/infinigen/assets/materials/grass_blade_texture.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson, Alexander Raistrick diff --git a/infinigen/assets/materials/hardwood_floor.py b/infinigen/assets/materials/hardwood_floor.py index 716e3a458..cfb9a585b 100644 --- a/infinigen/assets/materials/hardwood_floor.py +++ b/infinigen/assets/materials/hardwood_floor.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -6,9 +6,9 @@ from numpy.random import uniform from infinigen.assets.utils.object import new_plane +from infinigen.core.nodes import Nodes, NodeWrangler +from infinigen.core.util.random import log_uniform -from ...core.nodes import Nodes, NodeWrangler -from ...core.util.random import log_uniform from . import common from .table_materials import shader_wood from .utils.surface_utils import perturb_coordinates diff --git a/infinigen/assets/materials/horn.py b/infinigen/assets/materials/horn.py index ed82df8c9..c693d74d0 100644 --- a/infinigen/assets/materials/horn.py +++ b/infinigen/assets/materials/horn.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yihan Wang diff --git a/infinigen/assets/materials/ice.py b/infinigen/assets/materials/ice.py index b3479fe50..e6c1df207 100644 --- a/infinigen/assets/materials/ice.py +++ b/infinigen/assets/materials/ice.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Zeyu Ma, Hongyu Wen diff --git a/infinigen/assets/materials/invisible_to_camera.py b/infinigen/assets/materials/invisible_to_camera.py index 529fb849d..f9754c420 100644 --- a/infinigen/assets/materials/invisible_to_camera.py +++ b/infinigen/assets/materials/invisible_to_camera.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/materials/lamp_shaders.py b/infinigen/assets/materials/lamp_shaders.py index 15e89506e..25b68de8f 100644 --- a/infinigen/assets/materials/lamp_shaders.py +++ b/infinigen/assets/materials/lamp_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/lava.py b/infinigen/assets/materials/lava.py index f2c8782ff..a501b87e5 100644 --- a/infinigen/assets/materials/lava.py +++ b/infinigen/assets/materials/lava.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Zeyu Ma diff --git a/infinigen/assets/materials/marble.py b/infinigen/assets/materials/marble.py index 51c23644a..1f2c8ccd3 100644 --- a/infinigen/assets/materials/marble.py +++ b/infinigen/assets/materials/marble.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/marble_regular.py b/infinigen/assets/materials/marble_regular.py index 73fe095a5..7b282adb5 100644 --- a/infinigen/assets/materials/marble_regular.py +++ b/infinigen/assets/materials/marble_regular.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/assets/materials/marble_voronoi.py b/infinigen/assets/materials/marble_voronoi.py index 9ebfb7f6d..9265636bc 100644 --- a/infinigen/assets/materials/marble_voronoi.py +++ b/infinigen/assets/materials/marble_voronoi.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/assets/materials/metal/__init__.py b/infinigen/assets/materials/metal/__init__.py index a00b68ae9..3f6fd35ed 100644 --- a/infinigen/assets/materials/metal/__init__.py +++ b/infinigen/assets/materials/metal/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -7,12 +7,12 @@ import numpy as np from numpy.random import uniform +from infinigen.assets.materials import common +from infinigen.assets.materials.bark_random import hex_to_rgb from infinigen.core.util.color import hsv2rgba, rgb2hsv from infinigen.core.util.random import log_uniform from infinigen.core.util.random import random_general as rg -from .. import common -from ..bark_random import hex_to_rgb from . import ( brushed_metal, galvanized_metal, diff --git a/infinigen/assets/materials/metal/brushed_metal.py b/infinigen/assets/materials/metal/brushed_metal.py index 6611fb1cb..3ae66bc9d 100644 --- a/infinigen/assets/materials/metal/brushed_metal.py +++ b/infinigen/assets/materials/metal/brushed_metal.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/metal/galvanized_metal.py b/infinigen/assets/materials/metal/galvanized_metal.py index 8fdf82e7e..ffcdb5744 100644 --- a/infinigen/assets/materials/metal/galvanized_metal.py +++ b/infinigen/assets/materials/metal/galvanized_metal.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/metal/grained_and_polished_metal.py b/infinigen/assets/materials/metal/grained_and_polished_metal.py index 89dfb23b2..73e0dea0f 100644 --- a/infinigen/assets/materials/metal/grained_and_polished_metal.py +++ b/infinigen/assets/materials/metal/grained_and_polished_metal.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/metal/hammered_metal.py b/infinigen/assets/materials/metal/hammered_metal.py index 251ec875f..e7e329e54 100644 --- a/infinigen/assets/materials/metal/hammered_metal.py +++ b/infinigen/assets/materials/metal/hammered_metal.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/metal/metal_basic.py b/infinigen/assets/materials/metal/metal_basic.py index 928a99f4a..6f938baa3 100644 --- a/infinigen/assets/materials/metal/metal_basic.py +++ b/infinigen/assets/materials/metal/metal_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/microwave_shaders.py b/infinigen/assets/materials/microwave_shaders.py index e37bdc0d0..738d7f07c 100644 --- a/infinigen/assets/materials/microwave_shaders.py +++ b/infinigen/assets/materials/microwave_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/mirror.py b/infinigen/assets/materials/mirror.py index 429195488..9959bd45a 100644 --- a/infinigen/assets/materials/mirror.py +++ b/infinigen/assets/materials/mirror.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/mountain.py b/infinigen/assets/materials/mountain.py index 4004c14f8..d9beeb6d4 100644 --- a/infinigen/assets/materials/mountain.py +++ b/infinigen/assets/materials/mountain.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/assets/materials/mud.py b/infinigen/assets/materials/mud.py index c8d424752..f757c3974 100644 --- a/infinigen/assets/materials/mud.py +++ b/infinigen/assets/materials/mud.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/new_whitewater.py b/infinigen/assets/materials/new_whitewater.py index 6b0b2f3a4..7f0986413 100644 --- a/infinigen/assets/materials/new_whitewater.py +++ b/infinigen/assets/materials/new_whitewater.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/materials/nose.py b/infinigen/assets/materials/nose.py index 671f8b0e8..03b181561 100644 --- a/infinigen/assets/materials/nose.py +++ b/infinigen/assets/materials/nose.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/oven_shaders.py b/infinigen/assets/materials/oven_shaders.py index b672c2f02..17e83d125 100644 --- a/infinigen/assets/materials/oven_shaders.py +++ b/infinigen/assets/materials/oven_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/plaster.py b/infinigen/assets/materials/plaster.py index 589ac0f3f..2d48e5b29 100644 --- a/infinigen/assets/materials/plaster.py +++ b/infinigen/assets/materials/plaster.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/plastic.py b/infinigen/assets/materials/plastic.py index d9f12540f..435bac0c4 100644 --- a/infinigen/assets/materials/plastic.py +++ b/infinigen/assets/materials/plastic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the GPL license found in the LICENSE file in the root directory of this # source tree. diff --git a/infinigen/assets/materials/plastics/plastic_rough.py b/infinigen/assets/materials/plastics/plastic_rough.py index f2ceacc11..cdff6215e 100644 --- a/infinigen/assets/materials/plastics/plastic_rough.py +++ b/infinigen/assets/materials/plastics/plastic_rough.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the GPL license found in the LICENSE file in the root directory of this # source tree. diff --git a/infinigen/assets/materials/plastics/plastic_translucent.py b/infinigen/assets/materials/plastics/plastic_translucent.py index 14fb2d15f..7430164a5 100644 --- a/infinigen/assets/materials/plastics/plastic_translucent.py +++ b/infinigen/assets/materials/plastics/plastic_translucent.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the GPL license found in the LICENSE file in the root directory of this # source tree. diff --git a/infinigen/assets/materials/reptile_brown_circle_attr.py b/infinigen/assets/materials/reptile_brown_circle_attr.py index 231e74f88..12a4bb925 100644 --- a/infinigen/assets/materials/reptile_brown_circle_attr.py +++ b/infinigen/assets/materials/reptile_brown_circle_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/reptile_gray_attr.py b/infinigen/assets/materials/reptile_gray_attr.py index 370858bfe..9cfa4fcfd 100644 --- a/infinigen/assets/materials/reptile_gray_attr.py +++ b/infinigen/assets/materials/reptile_gray_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/reptile_two_color_attr.py b/infinigen/assets/materials/reptile_two_color_attr.py index c3331be32..833665e7b 100644 --- a/infinigen/assets/materials/reptile_two_color_attr.py +++ b/infinigen/assets/materials/reptile_two_color_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/river_water.py b/infinigen/assets/materials/river_water.py index b0429fadb..a7e88e773 100644 --- a/infinigen/assets/materials/river_water.py +++ b/infinigen/assets/materials/river_water.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/materials/rug.py b/infinigen/assets/materials/rug.py index b26f6d392..4cb7a009f 100644 --- a/infinigen/assets/materials/rug.py +++ b/infinigen/assets/materials/rug.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/sand.py b/infinigen/assets/materials/sand.py index e5afe286f..cd7b42775 100644 --- a/infinigen/assets/materials/sand.py +++ b/infinigen/assets/materials/sand.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/assets/materials/sandstone.py b/infinigen/assets/materials/sandstone.py index c5163511f..886c698c6 100644 --- a/infinigen/assets/materials/sandstone.py +++ b/infinigen/assets/materials/sandstone.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Mingzhe Wang, Zeyu Ma diff --git a/infinigen/assets/materials/scale.py b/infinigen/assets/materials/scale.py index b271ebda4..bb3caf349 100644 --- a/infinigen/assets/materials/scale.py +++ b/infinigen/assets/materials/scale.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/shelf_shaders.py b/infinigen/assets/materials/shelf_shaders.py index dd49e3363..0d2728027 100644 --- a/infinigen/assets/materials/shelf_shaders.py +++ b/infinigen/assets/materials/shelf_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/materials/simple_brownish.py b/infinigen/assets/materials/simple_brownish.py index b0fd32fc4..2b0a47cdd 100644 --- a/infinigen/assets/materials/simple_brownish.py +++ b/infinigen/assets/materials/simple_brownish.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/materials/simple_greenery.py b/infinigen/assets/materials/simple_greenery.py index 18a605827..47262f9fe 100644 --- a/infinigen/assets/materials/simple_greenery.py +++ b/infinigen/assets/materials/simple_greenery.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/simple_whitish.py b/infinigen/assets/materials/simple_whitish.py index 61373a3df..b15cf405e 100644 --- a/infinigen/assets/materials/simple_whitish.py +++ b/infinigen/assets/materials/simple_whitish.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/materials/slimy.py b/infinigen/assets/materials/slimy.py index d2062dc02..04fe95196 100644 --- a/infinigen/assets/materials/slimy.py +++ b/infinigen/assets/materials/slimy.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/smoke_material.py b/infinigen/assets/materials/smoke_material.py index a87d32a2d..0f6977afd 100644 --- a/infinigen/assets/materials/smoke_material.py +++ b/infinigen/assets/materials/smoke_material.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/materials/snake_plant.py b/infinigen/assets/materials/snake_plant.py index 9826215b5..666c19fcf 100644 --- a/infinigen/assets/materials/snake_plant.py +++ b/infinigen/assets/materials/snake_plant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/materials/snake_scale.py b/infinigen/assets/materials/snake_scale.py index 938f4d0b5..329e6b8e7 100644 --- a/infinigen/assets/materials/snake_scale.py +++ b/infinigen/assets/materials/snake_scale.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/snake_shaders.py b/infinigen/assets/materials/snake_shaders.py index 6d0784fcd..f95689a81 100644 --- a/infinigen/assets/materials/snake_shaders.py +++ b/infinigen/assets/materials/snake_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/materials/snow.py b/infinigen/assets/materials/snow.py deleted file mode 100644 index 49d764aa6..000000000 --- a/infinigen/assets/materials/snow.py +++ /dev/null @@ -1,130 +0,0 @@ -# COPYRIGHT -# adapted from Blender Real Snow add-on https://docs.blender.org/manual/en/latest/addons/object/real_snow.html -# License: GPL - -from infinigen.core import surface -from infinigen.core.nodes.node_wrangler import Nodes -from infinigen.core.util.organization import SurfaceTypes - -type = SurfaceTypes.SDFPerturb -mod_name = "geo_snowtexture" -name = "snow" - - -def shader_snow(nw, subsurface=1.0, **kwargs): - nw.force_input_consistency() - position = nw.new_node("ShaderNodeNewGeometry", []) - combine_xyz = nw.new_node( - Nodes.CombineXYZ, input_kwargs={"X": 0.36, "Y": 0.46, "Z": 0.6} - ) - vector_math = nw.new_node( - Nodes.VectorMath, - input_kwargs={0: combine_xyz, 1: (0.5, 0.5, 0.5)}, - attrs={"operation": "MULTIPLY"}, - ) - mapping = nw.new_node( - Nodes.Mapping, input_kwargs={"Vector": position, "Scale": (12.0, 12.0, 12.0)} - ) - voronoi_texture = nw.new_node( - Nodes.VoronoiTexture, - input_kwargs={"Vector": mapping, "Scale": 30.0}, - attrs={"feature": "N_SPHERE_RADIUS"}, - ) - colorramp = nw.new_node( - Nodes.ColorRamp, input_kwargs={"Fac": voronoi_texture.outputs["Radius"]} - ) - colorramp.color_ramp.elements[0].position = 0.525 - colorramp.color_ramp.elements[0].color = (0.0, 0.0, 0.0, 1.0) - colorramp.color_ramp.elements[1].position = 0.58 - colorramp.color_ramp.elements[1].color = (1.0, 1.0, 1.0, 1.0) - - principled_bsdf = nw.new_node( - Nodes.PrincipledBSDF, - input_kwargs={ - "Base Color": (0.904, 0.904, 0.904, 1.0), - "Subsurface": subsurface, - "Subsurface Radius": vector_math.outputs["Vector"], - "Subsurface Color": (0.904, 0.904, 0.904, 1.0), - "Specular": 0.224, - "Roughness": 0.1, - "Clearcoat": colorramp.outputs["Color"], - "Clearcoat Roughness": 0.1, - }, - attrs={"distribution": "MULTI_GGX"}, - ) - - return principled_bsdf - - -def geo_snowtexture(nw, selection=None, **kwargs): - nw.force_input_consistency() - group_input = nw.new_node(Nodes.GroupInput) - normal_dir = nw.new_node(Nodes.InputNormal) - position0 = nw.new_node(Nodes.InputPosition) - position = nw.multiply(position0, [12] * 3) - - noise_texture = nw.new_node( - Nodes.NoiseTexture, - input_kwargs={"Vector": position, "Scale": 12.0, "Detail": 2}, - ) - - noise_texture_1 = nw.new_node( - Nodes.NoiseTexture, input_kwargs={"Vector": position, "Scale": 2.0, "Detail": 4} - ) - colorramp_1 = nw.new_node( - Nodes.ColorRamp, input_kwargs={"Fac": noise_texture_1.outputs["Fac"]} - ) - colorramp_1.color_ramp.elements[0].position = 0.069 - colorramp_1.color_ramp.elements[0].color = (0.0, 0.0, 0.0, 1.0) - colorramp_1.color_ramp.elements[1].position = 0.757 - colorramp_1.color_ramp.elements[1].color = (1.0, 1.0, 1.0, 1.0) - - noise_texture_2 = nw.new_node( - Nodes.NoiseTexture, input_kwargs={"Vector": position, "Scale": 1.0, "Detail": 4} - ) - colorramp_2 = nw.new_node( - Nodes.ColorRamp, input_kwargs={"Fac": noise_texture_2.outputs["Fac"]} - ) - colorramp_2.color_ramp.elements[0].position = 0.069 - colorramp_2.color_ramp.elements[0].color = (0.0, 0.0, 0.0, 1.0) - colorramp_2.color_ramp.elements[1].position = 0.757 - colorramp_2.color_ramp.elements[1].color = (1.0, 1.0, 1.0, 1.0) - - height = nw.scalar_add( - nw.scalar_multiply(0.6, noise_texture), - nw.scalar_multiply(0.4, colorramp_1), - colorramp_2, - ) - - map_range = nw.new_node( - Nodes.MapRange, - input_kwargs={"Value": height, 1: 0.0, 2: 2.0, 3: -0.03, 4: 0.03}, - ) - - modulation = nw.new_node( - Nodes.NoiseTexture, input_kwargs={"Vector": position0, "Scale": 0.5} - ) - colorramp_3 = nw.new_node(Nodes.ColorRamp, input_kwargs={"Fac": modulation}) - colorramp_3.color_ramp.elements[0].position = 0.25 - colorramp_3.color_ramp.elements[0].color = (0.0, 0.0, 0.0, 1.0) - colorramp_3.color_ramp.elements[1].position = 0.75 - colorramp_3.color_ramp.elements[1].color = (1.0, 1.0, 1.0, 1.0) - - offset = nw.multiply(normal_dir, map_range, colorramp_3) - - if selection is not None: - offset = nw.multiply(offset, surface.eval_argument(nw, selection)) - - set_position = nw.new_node( - Nodes.SetPosition, - input_kwargs={"Geometry": group_input.outputs["Geometry"], "Offset": offset}, - ) - - group_output = nw.new_node( - Nodes.GroupOutput, input_kwargs={"Geometry": set_position} - ) - - -def apply(objs, selection=None, **kwargs): - surface.add_geomod(objs, geo_snowtexture, selection=selection) - surface.add_material(objs, shader_snow, selection=selection, input_kwargs=kwargs) diff --git a/infinigen/assets/materials/soil.py b/infinigen/assets/materials/soil.py index 6a02112d5..d0a5d9503 100644 --- a/infinigen/assets/materials/soil.py +++ b/infinigen/assets/materials/soil.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Zeyu Ma, Lingjie Mei diff --git a/infinigen/assets/materials/spider_plant.py b/infinigen/assets/materials/spider_plant.py index b9b615ed1..239e87f47 100644 --- a/infinigen/assets/materials/spider_plant.py +++ b/infinigen/assets/materials/spider_plant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/materials/spot_sparse_attr.py b/infinigen/assets/materials/spot_sparse_attr.py index 56279c54f..7ae76b972 100644 --- a/infinigen/assets/materials/spot_sparse_attr.py +++ b/infinigen/assets/materials/spot_sparse_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/stone.py b/infinigen/assets/materials/stone.py index 3478030c9..9863fcf57 100644 --- a/infinigen/assets/materials/stone.py +++ b/infinigen/assets/materials/stone.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Ankit Goyal, Mingzhe Wang, Zeyu Ma diff --git a/infinigen/assets/materials/stone_and_concrete/concrete.py b/infinigen/assets/materials/stone_and_concrete/concrete.py index 387e1aa7e..cae4f3c0b 100644 --- a/infinigen/assets/materials/stone_and_concrete/concrete.py +++ b/infinigen/assets/materials/stone_and_concrete/concrete.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/succulent.py b/infinigen/assets/materials/succulent.py index 3191b74db..fd586ccda 100644 --- a/infinigen/assets/materials/succulent.py +++ b/infinigen/assets/materials/succulent.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/materials/table_marble.py b/infinigen/assets/materials/table_marble.py index ae39f7a2e..1023d92fb 100644 --- a/infinigen/assets/materials/table_marble.py +++ b/infinigen/assets/materials/table_marble.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/table_materials.py b/infinigen/assets/materials/table_materials.py index 3c00da9d6..348a04299 100644 --- a/infinigen/assets/materials/table_materials.py +++ b/infinigen/assets/materials/table_materials.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/text.py b/infinigen/assets/materials/text.py index 4ad34cccc..6fb62336c 100644 --- a/infinigen/assets/materials/text.py +++ b/infinigen/assets/materials/text.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -10,6 +10,7 @@ import inspect import io import logging +import os import bpy import matplotlib.font_manager @@ -28,6 +29,7 @@ from numpy.random import rand, uniform from PIL import Image +from infinigen import repo_root from infinigen.assets.materials import common from infinigen.assets.utils.decorate import decimate from infinigen.assets.utils.misc import generate_text @@ -42,9 +44,15 @@ logger = logging.getLogger(__name__) +font_dir = repo_root() / "infinigen/assets/fonts" +for f in matplotlib.font_manager.findSystemFonts([font_dir]): + matplotlib.font_manager.fontManager.addfont(f) +font_names = [_.replace("_", " ") for _ in os.listdir(font_dir)] +all_fonts = matplotlib.font_manager.get_font_names() +assert [f in all_fonts for f in font_names] + class Text: - font_names_all = matplotlib.font_manager.get_font_names() default_font_name = "DejaVu Sans" patch_fns = ( "weighted_choice", @@ -76,7 +84,6 @@ def __init__(self, factory_seed, has_barcode=True, emission=0): self.n_patches = np.random.randint(5, 8) self.force_horizontal = uniform() < 0.75 - self.font_names = np.random.choice(self.font_names_all, 3) self.n_texts = np.random.randint(2, 4) self.n_barcodes = 1 if has_barcode and uniform() < 0.5 else 0 @@ -305,7 +312,7 @@ def add_texts(self, locs): for x, y in locs: x = 0.5 + (x - 0.5) * 0.6 text = generate_text() - family = np.random.permutation(self.font_names).tolist() + ["DejaVu Sans"] + family = np.random.choice(font_names) color, background_color = self.random_colors plt.figtext( x, diff --git a/infinigen/assets/materials/text_no_barcode.py b/infinigen/assets/materials/text_no_barcode.py index 78ee51f54..52cd0a7f3 100644 --- a/infinigen/assets/materials/text_no_barcode.py +++ b/infinigen/assets/materials/text_no_barcode.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/three_color_spots.py b/infinigen/assets/materials/three_color_spots.py index 2bdd1a9fe..78cb7b6f7 100644 --- a/infinigen/assets/materials/three_color_spots.py +++ b/infinigen/assets/materials/three_color_spots.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/tiger_attr.py b/infinigen/assets/materials/tiger_attr.py index 671221284..e3567b128 100644 --- a/infinigen/assets/materials/tiger_attr.py +++ b/infinigen/assets/materials/tiger_attr.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/tile.py b/infinigen/assets/materials/tile.py index f6d4417d6..957164211 100644 --- a/infinigen/assets/materials/tile.py +++ b/infinigen/assets/materials/tile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. from functools import partial @@ -9,10 +9,11 @@ import numpy as np from numpy.random import uniform -from ...core.nodes import Nodes, NodeWrangler -from ...core.util.math import FixedSeed -from ...core.util.random import log_uniform -from ..utils.object import new_cube +from infinigen.assets.utils.object import new_cube +from infinigen.core.nodes import Nodes, NodeWrangler +from infinigen.core.util.math import FixedSeed +from infinigen.core.util.random import log_uniform + from . import ceramic, common from .utils.surface_utils import perturb_coordinates diff --git a/infinigen/assets/materials/tiles/advanced_tiles.py b/infinigen/assets/materials/tiles/advanced_tiles.py new file mode 100644 index 000000000..8f7a8cebb --- /dev/null +++ b/infinigen/assets/materials/tiles/advanced_tiles.py @@ -0,0 +1,274 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from functools import partial + +import numpy as np +from numpy.random import uniform + +from infinigen.assets.materials import ceramic, tile +from infinigen.core import surface +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler +from infinigen.core.util.color import hsv2rgba + +from .basket_weave import nodegroup_basket_weave +from .brick import nodegroup_birck +from .cheveron import nodegroup_cheveron +from .diamond import nodegroup_diamond +from .herringbone import nodegroup_herringbone +from .hexagon import nodegroup_hexagon +from .shell import nodegroup_shell +from .spanish_bound import nodegroup_spanish_bond +from .star import nodegroup_star +from .triangle import nodegroup_triangle + +tile_pattern_dict = { + "basket_weave": nodegroup_basket_weave, + "brick": nodegroup_birck, + "cheveron": nodegroup_cheveron, + "diamond": nodegroup_diamond, + "herringbone": nodegroup_herringbone, + "hexagon": nodegroup_hexagon, + "shell": nodegroup_shell, + "spanish_bound": nodegroup_spanish_bond, + "star": nodegroup_star, + "triangle": nodegroup_triangle, +} + + +@node_utils.to_nodegroup("nodegroup_tile", singleton=False, type="ShaderNodeTree") +def nodegroup_tile(nw: NodeWrangler, scale=None, vertical=False, **kwargs): + # Code generated using version 2.6.5 of the node_transpiler + + rotation = np.random.choice([0, 45, 90, 135, 180, 225, 270, 315]) + if scale is None: + scale = uniform(7.5, 15) + flip = np.random.choice([-1.0, 1.0]) + border = uniform(0.01, 0.05) + flatness = uniform(0.9, 0.95) + subtile_number = np.random.choice([1, 2]) + aspect_ratio = np.random.choice([2, 3, 4, 5]) + + # random color type + color_pattern = np.random.choice([1, 2, 3]) + + tile_pattern = np.random.choice( + [ + "basket_weave", + "brick", + "cheveron", + "diamond", + "herringbone", + "hexagon", + "shell", + "spanish_bound", + "star", + "triangle", + ] + ) + + # texture_coordinate = nw.new_node(Nodes.TextureCoord) + + # vec, normal = map(nw.new_node(Nodes.TextureCoord).outputs.get, ["Object", "Normal"]) + vec = nw.new_node(Nodes.TextureCoord).outputs["Object"] + normal = nw.new_node(Nodes.ShaderNodeNormalMap).outputs["Normal"] + + if vertical: + vec = nw.combine( + nw.separate(nw.vector_math("CROSS_PRODUCT", vec, normal))[-1], + nw.separate(vec)[-1], + 0, + ) + + value_1 = nw.new_node(Nodes.Value) + value_1.outputs[0].default_value = float(rotation) + + radians = nw.new_node( + Nodes.Math, input_kwargs={0: value_1}, attrs={"operation": "RADIANS"} + ) + + combine_xyz_2 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"Z": radians}) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = scale + + value_2 = nw.new_node(Nodes.Value) + value_2.outputs[0].default_value = flip + + multiply = nw.new_node( + Nodes.Math, input_kwargs={0: value, 1: value_2}, attrs={"operation": "MULTIPLY"} + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": value, "Y": multiply, "Z": value} + ) + + mapping = nw.new_node( + Nodes.Mapping, + input_kwargs={"Vector": vec, "Rotation": combine_xyz_2, "Scale": combine_xyz}, + ) + + tile_nodegroup = tile_pattern_dict[tile_pattern] + group_4 = nw.new_node( + tile_nodegroup().name, + input_kwargs={ + "Coordinate": mapping, + "Subtiles Number": subtile_number, + "Aspect Ratio": aspect_ratio, + "border": border, + "Flatness": flatness, + }, + ) + + if color_pattern == 1: + tile_color = group_4.outputs["Tile Color"] + elif color_pattern == 2: + tile_color = group_4.outputs["Tile Type 1"] + elif color_pattern == 3: + tile_color = group_4.outputs["Tile Type 2"] + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={"Mask": group_4.outputs["Result"], "Tile Color": tile_color}, + attrs={"is_active_output": True}, + ) + + +# use this to generate mask and color pattern +def shader_raw_tiles(nw: NodeWrangler, **kwargs): + group = nw.new_node(nodegroup_tile(**kwargs).name) + material_output = nw.new_node( + Nodes.MaterialOutput, + input_kwargs={"Surface": group.outputs["Mask"]}, + attrs={"is_active_output": True}, + ) + + +# def apply(obj, selection=None, **kwargs): +# surface.add_material(obj, shader_raw_tiles, selection=selection, input_kwargs=kwargs) + + +# this applies masks on existing materials +def tile_of_material( + nw: NodeWrangler, + shader_function, + vertical=False, + displacement_scale=0.001, + **kwargs, +): + def get_connected_links(nw, input_socket): + links = [l for l in nw.links if l.to_socket == input_socket] + return links + + shader_node = shader_function(nw) + + links_to_output = [ + link for link in nw.links if (link.to_node.bl_idname == Nodes.MaterialOutput) + ] + + if len(links_to_output) == 0: + # add an output node + + principled_bsdf = nw.find(Nodes.PrincipledBSDF)[0] + material_output = nw.new_node( + Nodes.MaterialOutput, + input_kwargs={"Surface": principled_bsdf}, + attrs={"is_active_output": True}, + ) + links_to_output = [ + link + for link in nw.links + if (link.to_node.bl_idname == Nodes.MaterialOutput) + ] + + # get the BSDF socket + links_to_surface = get_connected_links( + nw, links_to_output[0].to_node.inputs["Surface"] + ) + displacement_out_socket = links_to_output[0].to_node.inputs["Displacement"] + links_to_displacement = get_connected_links(nw, displacement_out_socket) + + color_value = np.random.choice([0.0, 1.0]) # black or white + seam_color = hsv2rgba((0.0, 0.0, color_value)) + + seam_bsdf = nw.new_node( + Nodes.PrincipledBSDF, + input_kwargs={ + "Base Color": seam_color, + "Specular": 0.0000, + "Roughness": 0.9000, + }, + ) + + if len(links_to_surface) == 1 and len(links_to_displacement) <= 1: + # mix shader with tile + tile_node = nw.new_node(nodegroup_tile(vertical=vertical, **kwargs).name) + + original_bsdf = links_to_surface[0].from_socket + + binary_mask = nw.new_node( + Nodes.Math, + input_kwargs={0: tile_node.outputs["Mask"], 1: 0.1000}, + attrs={"operation": "GREATER_THAN"}, + ) + + mix_shader = nw.new_node( + Nodes.MixShader, + input_kwargs={"Fac": binary_mask, 1: seam_bsdf, 2: original_bsdf}, + ) + + nw.links.new(links_to_surface[0].to_socket, mix_shader.outputs["Shader"]) + + # displacement + displacement_tile = nw.new_node( + Nodes.Displacement, + input_kwargs={ + "Height": tile_node.outputs["Mask"], + "Scale": displacement_scale, + }, + ) + + # mix displacement + if len(links_to_displacement) == 0: + nw.links.new( + displacement_out_socket, + displacement_tile.outputs["Displacement"], + ) + + else: + original_displacement = links_to_displacement[0].from_socket + + add = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: original_displacement, 1: displacement_tile}, + ) + + nw.links.new(displacement_out_socket, add.outputs["Vector"]) + + +def apply(obj, selection=None, vertical=False, **kwargs): + shader_funcs = tile.get_shader_funcs() + funcs, weights = zip(*shader_funcs) + weights = np.array(weights) / sum(weights) + shader_func = np.random.choice(funcs, p=weights) + name = shader_func.__name__ + + low, high = sorted(uniform(0.1, 0.7, 2)) + if shader_func is ceramic.shader_ceramic: + shader_func = partial( + ceramic.shader_ceramic, + roughness_min=low, + roughness_max=high, + ) + + surface.add_material( + obj, + tile_of_material, + selection=selection, + input_kwargs=({"shader_function": shader_func, "vertical": vertical} | kwargs), + ) diff --git a/infinigen/assets/materials/tiles/basket_weave.py b/infinigen/assets/materials/tiles/basket_weave.py new file mode 100644 index 000000000..bd63dce0d --- /dev/null +++ b/infinigen/assets/materials/tiles/basket_weave.py @@ -0,0 +1,437 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo, nodegroup_u_v_recenter + + +@node_utils.to_nodegroup( + "nodegroup_basket_weave", singleton=False, type="ShaderNodeTree" +) +def nodegroup_basket_weave(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + reroute_3 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]} + ) + + brick_width = nw.new_node(Nodes.Value, label="Brick Width") + brick_width.outputs[0].default_value = 1.0000 + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute_3, 1: brick_width}, + attrs={"operation": "SUBTRACT"}, + ) + + absolute = nw.new_node( + Nodes.Math, input_kwargs={0: subtract}, attrs={"operation": "ABSOLUTE"} + ) + + divide = nw.new_node( + Nodes.Math, input_kwargs={0: absolute, 1: 2.0000}, attrs={"operation": "DIVIDE"} + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: divide, 1: brick_width}) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: add}, + attrs={"operation": "SNAP"}, + ) + + subtract_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: snap}, + attrs={"operation": "SUBTRACT"}, + ) + + add_1 = nw.new_node(Nodes.Math, input_kwargs={0: reroute_3, 1: brick_width}) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: subtract_1, 1: add_1} + ) + + group_13 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["Y"], 1: add}, + ) + + reroute_2 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Subtiles Number"]} + ) + + divide_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: reroute_2}, + attrs={"operation": "DIVIDE"}, + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: group_13, 1: divide_1} + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group, "Y": group_3} + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": reroute_3, "Y": brick_width} + ) + + scale = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz, "Scale": 0.5000}, + attrs={"operation": "SCALE"}, + ) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": 1.0000, "Y": reroute_2, "Z": 1.0000} + ) + + divide_2 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: scale.outputs["Vector"], 1: combine_xyz_3}, + attrs={"operation": "DIVIDE"}, + ) + + group_10 = nw.new_node( + nodegroup_u_v_recenter().name, + input_kwargs={"UV": combine_xyz_1, "HalfSize": divide_2.outputs["Vector"]}, + ) + + less_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group_13, 1: brick_width}, + attrs={"operation": "LESS_THAN"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group, 1: reroute_3}, + attrs={"operation": "GREATER_THAN"}, + ) + + big_tiles = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: greater_than}, + label="big tiles", + attrs={"operation": "SUBTRACT"}, + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than, 1: big_tiles}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_10, 1: multiply}, + attrs={"operation": "MULTIPLY"}, + ) + + add_2 = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz.outputs["X"], 1: brick_width} + ) + + snap_1 = nw.new_node( + Nodes.Math, input_kwargs={0: add_2, 1: add}, attrs={"operation": "SNAP"} + ) + + add_3 = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz.outputs["Y"], 1: snap_1} + ) + + add_4 = nw.new_node(Nodes.Math, input_kwargs={0: add_3, 1: divide}) + + reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": add_1}) + + group_2 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: add_4, 1: reroute_1} + ) + + group_4 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: add_2, 1: add} + ) + + divide_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: reroute_2}, + attrs={"operation": "DIVIDE"}, + ) + + group_5 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: group_4, 1: divide_3} + ) + + combine_xyz_5 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_2, "Y": group_5} + ) + + group_12 = nw.new_node( + nodegroup_u_v_recenter().name, + input_kwargs={"UV": combine_xyz_5, "HalfSize": divide_2.outputs["Vector"]}, + ) + + less_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_4, 1: brick_width}, + attrs={"operation": "LESS_THAN"}, + ) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_2, 1: reroute_3}, + attrs={"operation": "GREATER_THAN"}, + ) + + big_tiles_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: greater_than_1}, + label="big tiles", + attrs={"operation": "SUBTRACT"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than_1, 1: big_tiles_1}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_3 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_12, 1: multiply_2}, + attrs={"operation": "MULTIPLY"}, + ) + + add_5 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_1.outputs["Vector"], 1: multiply_3.outputs["Vector"]}, + ) + + add_6 = nw.new_node(Nodes.Math, input_kwargs={0: multiply, 1: multiply_2}) + + subtract_2 = nw.new_node( + Nodes.Math, input_kwargs={0: 1.0000, 1: add_6}, attrs={"operation": "SUBTRACT"} + ) + + combine_xyz_2 = nw.new_node( + Nodes.CombineXYZ, + input_kwargs={"X": separate_xyz.outputs["X"], "Y": separate_xyz.outputs["Y"]}, + ) + + separate_xyz_2 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_2} + ) + + subtract_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_2.outputs["Y"], 1: brick_width}, + attrs={"operation": "SUBTRACT"}, + ) + + reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": add}) + + group_6 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: subtract_3, 1: reroute}, + ) + + center_subdivide = nw.new_node(Nodes.Value, label="Center Subdivide") + center_subdivide.outputs[0].default_value = 1.0000 + + divide_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: absolute, 1: center_subdivide}, + attrs={"operation": "DIVIDE"}, + ) + + divide_5 = nw.new_node( + Nodes.Math, input_kwargs={0: divide_4, 1: 2.0000}, attrs={"operation": "DIVIDE"} + ) + + group_8 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: group_6, 1: divide_5} + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz_2.outputs["X"], 1: reroute}, + ) + + group_11 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: group_1, 1: divide_5} + ) + + combine_xyz_4 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_8, "Y": group_11} + ) + + divide_6 = nw.new_node( + Nodes.Math, + input_kwargs={0: divide, 1: center_subdivide}, + attrs={"operation": "DIVIDE"}, + ) + + divide_7 = nw.new_node( + Nodes.Math, input_kwargs={0: divide_6, 1: 2.0000}, attrs={"operation": "DIVIDE"} + ) + + group_9 = nw.new_node( + nodegroup_u_v_recenter().name, + input_kwargs={"UV": combine_xyz_4, "HalfSize": divide_7}, + ) + + multiply_4 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract_2, 1: group_9}, + attrs={"operation": "MULTIPLY"}, + ) + + add_7 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: add_5.outputs["Vector"], 1: multiply_4.outputs["Vector"]}, + ) + + separate_xyz_1 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": add_7.outputs["Vector"]} + ) + + smooth_min = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_1.outputs["X"], + 1: separate_xyz_1.outputs["Y"], + 2: 0.0000, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: group_input.outputs["border"], 6: smooth_min}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + snap_2 = nw.new_node( + Nodes.Math, input_kwargs={0: add_4, 1: reroute_1}, attrs={"operation": "SNAP"} + ) + + snap_3 = nw.new_node( + Nodes.Math, input_kwargs={0: add_2, 1: divide_3}, attrs={"operation": "SNAP"} + ) + + combine_xyz_7 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_2, "Y": snap_3} + ) + + multiply_5 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_7, 1: multiply_2}, + attrs={"operation": "MULTIPLY"}, + ) + + snap_4 = nw.new_node( + Nodes.Math, input_kwargs={0: subtract_1, 1: add_1}, attrs={"operation": "SNAP"} + ) + + snap_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: divide_3}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_8 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_4, "Y": snap_5} + ) + + multiply_6 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_8, 1: multiply}, + attrs={"operation": "MULTIPLY"}, + ) + + add_8 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_5.outputs["Vector"], 1: multiply_6.outputs["Vector"]}, + ) + + snap_6 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_2.outputs["X"], 1: reroute}, + attrs={"operation": "SNAP"}, + ) + + snap_7 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_2.outputs["Y"], 1: reroute}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_9 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_6, "Y": snap_7} + ) + + multiply_7 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_9, 1: subtract_2}, + attrs={"operation": "MULTIPLY"}, + ) + + add_9 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: add_8.outputs["Vector"], 1: multiply_7.outputs["Vector"]}, + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": add_9.outputs["Vector"]} + ) + + greater_than_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract_2, 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_1.outputs[2], + "Tile Color": white_noise_texture.outputs["Color"], + "Tile Type 1": greater_than_2, + "Tile Type 2": greater_than_2, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/brick.py b/infinigen/assets/materials/tiles/brick.py new file mode 100644 index 000000000..7418a5cb6 --- /dev/null +++ b/infinigen/assets/materials/tiles/brick.py @@ -0,0 +1,356 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup( + "nodegroup_positive_modulo", singleton=False, type="ShaderNodeTree" +) +def nodegroup_positive_modulo(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Vector_1", (0.0000, 0.0000, 0.0000)), + ("NodeSocketVector", "Vector_2", (0.0000, 0.0000, 0.0000)), + ], + ) + + modulo = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs[0], 1: group_input.outputs[1]}, + attrs={"operation": "MODULO"}, + ) + + separate_xyz_3 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": modulo.outputs["Vector"]} + ) + + less_than = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["X"], 1: 0.0000}, + attrs={"operation": "LESS_THAN"}, + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs[1]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than, 1: separate_xyz.outputs["X"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz_3.outputs["X"], 1: multiply} + ) + + less_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: 0.0000}, + attrs={"operation": "LESS_THAN"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than_1, 1: separate_xyz.outputs["Y"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add_1 = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz_3.outputs["Y"], 1: multiply_1} + ) + + less_than_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["Z"], 1: 0.0000}, + attrs={"operation": "LESS_THAN"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than_2, 1: separate_xyz.outputs["Z"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add_2 = nw.new_node(Nodes.Math, input_kwargs={1: multiply_2}) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": add, "Y": add_1, "Z": add_2} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={"Vector": combine_xyz_3}, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_birck", singleton=False, type="ShaderNodeTree") +def nodegroup_birck(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + brick_width = nw.new_node(Nodes.Value, label="Brick Width") + brick_width.outputs[0].default_value = 1.0000 + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Subtiles Number"], 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + snap = nw.new_node( + Nodes.Math, input_kwargs={0: multiply, 1: 2.0000}, attrs={"operation": "SNAP"} + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: snap}, + attrs={"operation": "MULTIPLY"}, + ) + + group_4 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["Y"], 1: multiply_1}, + ) + + less_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group_4, 1: brick_width}, + attrs={"operation": "LESS_THAN"}, + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]} + ) + + header_size = nw.new_node(Nodes.Value, label="header_size") + header_size.outputs[0].default_value = 0.5000 + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute, 1: header_size}, + attrs={"operation": "MULTIPLY"}, + ) + + mix_3 = nw.new_node( + Nodes.Mix, input_kwargs={0: less_than, 2: reroute, 3: multiply_2} + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": mix_3.outputs["Result"], "Y": brick_width} + ) + + value_4 = nw.new_node(Nodes.Value) + value_4.outputs[0].default_value = 0.5000 + + multiply_3 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_1, 1: value_4}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["Y"], 1: multiply_4}, + ) + + less_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_1, 1: brick_width}, + attrs={"operation": "LESS_THAN"}, + ) + + multiply_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than, 1: 0.2500}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_5}) + + multiply_6 = nw.new_node( + Nodes.Math, input_kwargs={0: reroute, 1: add}, attrs={"operation": "MULTIPLY"} + ) + + multiply_add = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than_1, 1: multiply_6, 2: separate_xyz.outputs["X"]}, + attrs={"operation": "MULTIPLY_ADD"}, + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, + input_kwargs={"X": multiply_add, "Y": separate_xyz.outputs["Y"]}, + ) + + group = nw.new_node( + nodegroup_positive_modulo().name, + input_kwargs={0: combine_xyz, 1: combine_xyz_1}, + ) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_3.outputs["Vector"], 1: group}, + attrs={"operation": "SUBTRACT"}, + ) + + snap_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz, 1: combine_xyz_1}, + attrs={"operation": "SNAP"}, + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, + input_kwargs={"Vector": snap_1.outputs["Vector"]}, + attrs={"noise_dimensions": "4D"}, + ) + + separate_color = nw.new_node( + Nodes.SeparateColor, + input_kwargs={"Color": white_noise_texture.outputs["Color"]}, + ) + + map_range = nw.new_node( + Nodes.MapRange, + input_kwargs={"Value": separate_color.outputs["Red"], 3: -1.0000}, + ) + + rotate_amount = nw.new_node(Nodes.Value, label="Rotate amount") + rotate_amount.outputs[0].default_value = 0.0000 + + multiply_7 = nw.new_node( + Nodes.Math, + input_kwargs={0: map_range.outputs["Result"], 1: rotate_amount}, + attrs={"operation": "MULTIPLY"}, + ) + + vector_rotate = nw.new_node( + Nodes.VectorRotate, + input_kwargs={"Vector": subtract.outputs["Vector"], "Angle": multiply_7}, + attrs={"rotation_type": "Z_AXIS"}, + ) + + absolute = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: vector_rotate}, + attrs={"operation": "ABSOLUTE"}, + ) + + subtract_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_3.outputs["Vector"], 1: absolute.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + separate_xyz_1 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": subtract_1.outputs["Vector"]} + ) + + smooth_min = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_1.outputs["X"], + 1: separate_xyz_1.outputs["Y"], + 2: 0.0000, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: group_input.outputs["border"], 6: smooth_min}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + separate_xyz_2 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": snap_1.outputs["Vector"]} + ) + + separate_xyz_3 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_1} + ) + + multiply_8 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["X"], 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz_2.outputs["X"], 1: multiply_8}, + ) + + multiply_9 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["X"]}, + attrs={"operation": "MULTIPLY"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group_3, 1: multiply_9}, + attrs={"operation": "GREATER_THAN"}, + ) + + reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": less_than}) + + multiply_10 = nw.new_node( + Nodes.Math, + input_kwargs={0: greater_than, 1: reroute_1}, + attrs={"operation": "MULTIPLY"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_1.outputs[2], + "Tile Color": white_noise_texture.outputs["Color"], + "Tile Type 1": less_than_1, + "Tile Type 2": multiply_10, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/cheveron.py b/infinigen/assets/materials/tiles/cheveron.py new file mode 100644 index 000000000..e7994bc15 --- /dev/null +++ b/infinigen/assets/materials/tiles/cheveron.py @@ -0,0 +1,209 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup("nodegroup_cheveron", singleton=False, type="ShaderNodeTree") +def nodegroup_cheveron(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + reroute_1 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]} + ) + + brick_width = nw.new_node(Nodes.Value, label="Brick Width") + brick_width.outputs[0].default_value = 1.0000 + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": reroute_1, "Y": brick_width} + ) + + scale = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz, "Scale": 0.5000}, + attrs={"operation": "SCALE"}, + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": scale.outputs["Vector"]} + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["X"], 1: reroute_1}, + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_1, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute_1, 1: multiply}, + attrs={"operation": "SUBTRACT"}, + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: reroute_1}, + attrs={"operation": "SNAP"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute_1, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_2 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap, 1: multiply_1} + ) + + greater_than = nw.new_node( + Nodes.Math, input_kwargs={0: group_2}, attrs={"operation": "GREATER_THAN"} + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract, 1: greater_than}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: group_1}) + + rot_amount = nw.new_node(Nodes.Value, label="rot amount") + rot_amount.outputs[0].default_value = 1.0000 + + multiply_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: add, 1: rot_amount}, + attrs={"operation": "MULTIPLY"}, + ) + + add_1 = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz.outputs["Y"], 1: multiply_3} + ) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: add_1, 1: brick_width} + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_1, "Y": group} + ) + + subtract_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_1, 1: reroute}, + attrs={"operation": "SUBTRACT"}, + ) + + absolute = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract_1.outputs["Vector"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + subtract_2 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: reroute, 1: absolute.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + separate_xyz_1 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": subtract_2.outputs["Vector"]} + ) + + smooth_min = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_1.outputs["X"], + 1: separate_xyz_1.outputs["Y"], + 2: 0.1000, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: group_input.outputs["border"], 6: smooth_min}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + snap_1 = nw.new_node( + Nodes.Math, input_kwargs={0: add_1, 1: brick_width}, attrs={"operation": "SNAP"} + ) + + snap_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: reroute_1}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap_2} + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_3} + ) + + snap_3 = nw.new_node( + Nodes.Math, input_kwargs={0: add_1, 1: brick_width}, attrs={"operation": "SNAP"} + ) + + multiply_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_3, 1: multiply_4} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_1.outputs[2], + "Tile Color": white_noise_texture.outputs["Color"], + "Tile Type 1": greater_than, + "Tile Type 2": group_3, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/diamond.py b/infinigen/assets/materials/tiles/diamond.py new file mode 100644 index 000000000..f6c6061e8 --- /dev/null +++ b/infinigen/assets/materials/tiles/diamond.py @@ -0,0 +1,441 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup( + "nodegroup_diamond_single", singleton=False, type="ShaderNodeTree" +) +def nodegroup_diamond_single(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + value_1 = nw.new_node(Nodes.Value) + value_1.outputs[0].default_value = 0.7070 + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Width", 0.0000), + ], + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Width"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute, 1: 1.5000}, + attrs={"operation": "MULTIPLY"}, + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + divide = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: multiply}, attrs={"operation": "DIVIDE"} + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Width"], 1: 0.8660}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: divide, 1: multiply_1}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz.outputs["X"], 1: multiply_2} + ) + + combine_xyz_2 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": add, "Y": separate_xyz.outputs["Y"]} + ) + + multiply_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute, 1: 1.7321}, + attrs={"operation": "MULTIPLY"}, + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": multiply_3, "Y": reroute} + ) + + separate_xyz_1 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz} + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: add, 1: separate_xyz_1.outputs["X"]}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_1 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap}) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_2, 1: combine_xyz_1}, + attrs={"operation": "SUBTRACT"}, + ) + + scale = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz, "Scale": 0.5000}, + attrs={"operation": "SCALE"}, + ) + + subtract_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract.outputs["Vector"], 1: scale.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + value_3 = nw.new_node(Nodes.Value) + value_3.outputs[0].default_value = 1.0000 + + divide_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: value_3, 1: scale.outputs["Vector"]}, + attrs={"operation": "DIVIDE"}, + ) + + multiply_4 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract_1.outputs["Vector"], 1: divide_1.outputs["Vector"]}, + attrs={"operation": "MULTIPLY"}, + ) + + vector_rotate = nw.new_node( + Nodes.VectorRotate, + input_kwargs={"Vector": multiply_4.outputs["Vector"], "Angle": 0.7854}, + ) + + absolute = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: vector_rotate}, + attrs={"operation": "ABSOLUTE"}, + ) + + subtract_2 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: value_1, 1: absolute.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_1} + ) + + divide_2 = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: multiply}, attrs={"operation": "DIVIDE"} + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide_2, 1: 2.0000} + ) + + greater_than = nw.new_node( + Nodes.Math, input_kwargs={0: group_1}, attrs={"operation": "GREATER_THAN"} + ) + + divide_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: snap_1, 1: separate_xyz_1.outputs["X"]}, + attrs={"operation": "DIVIDE"}, + ) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide_3, 1: 2.0000} + ) + + greater_than_1 = nw.new_node( + Nodes.Math, input_kwargs={0: group}, attrs={"operation": "GREATER_THAN"} + ) + + multiply_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: greater_than, 1: greater_than_1}, + attrs={"operation": "MULTIPLY"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "UV": subtract_2.outputs["Vector"], + "Color": white_noise_texture.outputs["Color"], + "Value": multiply_5, + }, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_diamond", singleton=False, type="ShaderNodeTree") +def nodegroup_diamond(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + reroute_1 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Flatness"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["border"], 1: 1.5000}, + attrs={"operation": "MULTIPLY"}, + ) + + reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply}) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = 0.5000 + + mapping = nw.new_node( + Nodes.Mapping, + input_kwargs={"Vector": group_input.outputs["Coordinate"], "Scale": value}, + ) + + value_1 = nw.new_node(Nodes.Value) + value_1.outputs[0].default_value = 1.0000 + + group = nw.new_node( + nodegroup_diamond_single().name, + input_kwargs={"Coordinate": mapping, "Width": value_1}, + ) + + separate_xyz_3 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group.outputs["UV"]} + ) + + value_3 = nw.new_node(Nodes.Value) + value_3.outputs[0].default_value = 0.0000 + + smooth_min = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_3.outputs["X"], + 1: separate_xyz_3.outputs["Y"], + 2: value_3, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: smooth_min}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: reroute_1, + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, input_kwargs={0: value_1}, attrs={"operation": "MULTIPLY"} + ) + + combine_xyz = nw.new_node(Nodes.CombineXYZ, input_kwargs={"Y": multiply_1}) + + vector_rotate = nw.new_node( + Nodes.VectorRotate, + input_kwargs={"Vector": mapping, "Center": combine_xyz, "Angle": -2.0944}, + ) + + group_1 = nw.new_node( + nodegroup_diamond_single().name, + input_kwargs={"Coordinate": vector_rotate, "Width": value_1}, + ) + + separate_xyz_4 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_1.outputs["UV"]} + ) + + smooth_min_1 = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_4.outputs["X"], + 1: separate_xyz_4.outputs["Y"], + 2: value_3, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix_2 = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: smooth_min_1}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_3 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: reroute_1, + 6: mix_2.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + mix_4 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: mix_3.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + vector_rotate_1 = nw.new_node( + Nodes.VectorRotate, + input_kwargs={"Vector": mapping, "Center": combine_xyz, "Angle": 2.0944}, + ) + + group_2 = nw.new_node( + nodegroup_diamond_single().name, + input_kwargs={"Coordinate": vector_rotate_1, "Width": value_1}, + ) + + separate_xyz_5 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_2.outputs["UV"]} + ) + + smooth_min_2 = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_5.outputs["X"], + 1: separate_xyz_5.outputs["Y"], + 2: value_3, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: smooth_min_2}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: reroute_1, + 6: mix_5.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + mix_7 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: mix_6.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_8 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: group.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_9 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: group_1.outputs["Color"], 7: mix_3.outputs[2]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_11 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_8.outputs[2], 7: mix_9.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_10 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_6.outputs[2], 7: group_2.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_12 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_11.outputs[2], 7: mix_10.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_1.outputs[2], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_6.outputs[2], 1: group_2.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: group.outputs["Value"], 1: mix_1.outputs[2]}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_3.outputs[2], 1: group_1.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_3, 1: multiply_4}) + + add_1 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: add}) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: add_1, 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_7.outputs[2], + "Tile Color": mix_12.outputs[2], + "Tile Type 1": greater_than, + "Tile Type 2": greater_than_1, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/herringbone.py b/infinigen/assets/materials/tiles/herringbone.py new file mode 100644 index 000000000..e4a0ae164 --- /dev/null +++ b/infinigen/assets/materials/tiles/herringbone.py @@ -0,0 +1,350 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup("nodegroup_mix", singleton=False, type="ShaderNodeTree") +def nodegroup_mix(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketFloat", "Mask", 0.0000), + ("NodeSocketVector", "Vector 1", (0.0000, 0.0000, 0.0000)), + ("NodeSocketVector", "Vector 2", (0.0000, 0.0000, 0.0000)), + ], + ) + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: group_input.outputs["Mask"]}, + attrs={"operation": "SUBTRACT"}, + ) + + multiply = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Vector 2"], 1: subtract}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={ + 0: group_input.outputs["Vector 1"], + 1: group_input.outputs["Mask"], + }, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply.outputs["Vector"], 1: multiply_1.outputs["Vector"]}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={"Vector": add.outputs["Vector"]}, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup( + "nodegroup_herringbone", singleton=False, type="ShaderNodeTree" +) +def nodegroup_herringbone(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + reroute_1 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]} + ) + + brick_width = nw.new_node(Nodes.Value, label="Brick Width") + brick_width.outputs[0].default_value = 1.0000 + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": reroute_1, "Y": brick_width} + ) + + scale = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz, "Scale": 0.5000}, + attrs={"operation": "SCALE"}, + ) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, + input_kwargs={ + "X": 1.0000, + "Y": group_input.outputs["Subtiles Number"], + "Z": 1.0000, + }, + ) + + divide = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: scale.outputs["Vector"], 1: combine_xyz_3}, + attrs={"operation": "DIVIDE"}, + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": divide.outputs["Vector"]} + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: brick_width}, + attrs={"operation": "SNAP"}, + ) + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: snap}, + attrs={"operation": "SUBTRACT"}, + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract, 1: reroute_1}, + attrs={"operation": "SNAP"}, + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute_1, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_1, 1: multiply} + ) + + greater_than = nw.new_node( + Nodes.Math, input_kwargs={0: group_1}, attrs={"operation": "GREATER_THAN"} + ) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: subtract, 1: reroute_1}, + ) + + divide_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: group_input.outputs["Subtiles Number"]}, + attrs={"operation": "DIVIDE"}, + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["Y"], 1: divide_1}, + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group, "Y": group_3} + ) + + snap_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: brick_width}, + attrs={"operation": "SNAP"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: snap_2, 1: brick_width}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_1, 1: brick_width}) + + subtract_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: add}, + attrs={"operation": "SUBTRACT"}, + ) + + group_2 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: subtract_1, 1: reroute_1}, + ) + + divide_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: group_input.outputs["Subtiles Number"]}, + attrs={"operation": "DIVIDE"}, + ) + + group_4 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["X"], 1: divide_2}, + ) + + combine_xyz_2 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_2, "Y": group_4} + ) + + group_5 = nw.new_node( + nodegroup_mix().name, + input_kwargs={ + "Mask": greater_than, + "Vector 1": combine_xyz_1, + "Vector 2": combine_xyz_2, + }, + ) + + subtract_2 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_5, 1: reroute}, + attrs={"operation": "SUBTRACT"}, + ) + + absolute = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract_2.outputs["Vector"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + subtract_3 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: reroute, 1: absolute.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + separate_xyz_1 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": subtract_3.outputs["Vector"]} + ) + + smooth_min = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_1.outputs["X"], + 1: separate_xyz_1.outputs["Y"], + 2: 0.0000, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: group_input.outputs["border"], 6: smooth_min}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + snap_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract, 1: reroute_1}, + attrs={"operation": "SNAP"}, + ) + + snap_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: divide_1}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_6 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_3, "Y": snap_4} + ) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = 0.5000 + + add_1 = nw.new_node(Nodes.VectorMath, input_kwargs={0: combine_xyz_6, 1: value}) + + snap_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract_1, 1: reroute_1}, + attrs={"operation": "SNAP"}, + ) + + snap_6 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: divide_2}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_5 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_5, "Y": snap_6} + ) + + group_6 = nw.new_node( + nodegroup_mix().name, + input_kwargs={ + "Mask": greater_than, + "Vector 1": add_1.outputs["Vector"], + "Vector 2": combine_xyz_5, + }, + ) + + white_noise_texture_1 = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": group_6} + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: divide_1, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_9 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_4, 1: multiply_2} + ) + + multiply_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: divide_2, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_7 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_6, 1: multiply_3} + ) + + group_8 = nw.new_node( + nodegroup_mix().name, + input_kwargs={"Mask": greater_than, "Vector 1": group_9, "Vector 2": group_7}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_1.outputs[2], + "Tile Color": white_noise_texture_1.outputs["Color"], + "Tile Type 1": greater_than, + "Tile Type 2": group_8, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/hexagon.py b/infinigen/assets/materials/tiles/hexagon.py new file mode 100644 index 000000000..8eb586627 --- /dev/null +++ b/infinigen/assets/materials/tiles/hexagon.py @@ -0,0 +1,424 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup( + "nodegroup_distance_to_axis", singleton=False, type="ShaderNodeTree" +) +def nodegroup_distance_to_axis(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Vector", (0.0000, 0.0000, 0.0000)), + ("NodeSocketVector", "Axis", (0.0000, 0.0000, 0.0000)), + ], + ) + + length = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Vector"]}, + attrs={"operation": "LENGTH"}, + ) + + power = nw.new_node( + Nodes.Math, + input_kwargs={0: length.outputs["Value"], 1: 2.0000}, + attrs={"operation": "POWER"}, + ) + + normalize = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Axis"]}, + attrs={"operation": "NORMALIZE"}, + ) + + dot_product = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Vector"], 1: normalize.outputs["Vector"]}, + attrs={"operation": "DOT_PRODUCT"}, + ) + + power_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: dot_product.outputs["Value"], 1: 2.0000}, + attrs={"operation": "POWER"}, + ) + + subtract = nw.new_node( + Nodes.Math, input_kwargs={0: power, 1: power_1}, attrs={"operation": "SUBTRACT"} + ) + + sqrt = nw.new_node( + Nodes.Math, input_kwargs={0: subtract}, attrs={"operation": "SQRT"} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={"Distance": sqrt}, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_hex_single", singleton=False, type="ShaderNodeTree") +def nodegroup_hex_single(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Size", 0.5000), + ], + ) + + separate_xyz_3 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Size"], 1: 1.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Size"], 1: 1.7321}, + attrs={"operation": "MULTIPLY"}, + ) + + combine_xyz_2 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": multiply, "Y": multiply_1} + ) + + separate_xyz_4 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_2} + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]}, + attrs={"operation": "SNAP"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: 0.5774}, attrs={"operation": "MULTIPLY"} + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: multiply_2, 1: separate_xyz_3.outputs["X"]} + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]}, + ) + + group_4 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]}, + ) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_3, "Y": group_4} + ) + + multiply_3 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_2, 1: (0.5000, 0.3333, 0.0000)}, + attrs={"operation": "MULTIPLY"}, + ) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_3, 1: multiply_3.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": subtract.outputs["Vector"]} + ) + + group = nw.new_node( + nodegroup_distance_to_axis().name, + input_kwargs={"Vector": reroute, "Axis": (0.0000, 1.0000, 0.0000)}, + ) + + group_1 = nw.new_node( + nodegroup_distance_to_axis().name, + input_kwargs={"Vector": reroute, "Axis": (0.8660, -0.5000, 0.0000)}, + ) + + group_2 = nw.new_node( + nodegroup_distance_to_axis().name, + input_kwargs={"Vector": reroute, "Axis": (-0.8660, -0.5000, 0.0000)}, + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group, "Y": group_1, "Z": group_2} + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]}, + attrs={"operation": "SNAP"}, + ) + + snap_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap_2}) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz} + ) + + divide = nw.new_node( + Nodes.Math, + input_kwargs={0: snap_2, 1: separate_xyz_4.outputs["X"]}, + attrs={"operation": "DIVIDE"}, + ) + + group_5 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide, 1: 2.0000} + ) + + greater_than = nw.new_node( + Nodes.Math, input_kwargs={0: group_5}, attrs={"operation": "GREATER_THAN"} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "UV": combine_xyz_1, + "Color": white_noise_texture.outputs["Color"], + "Value": greater_than, + }, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_hexagon", singleton=False, type="ShaderNodeTree") +def nodegroup_hexagon(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["border"], 1: 0.8660}, + attrs={"operation": "MULTIPLY"}, + ) + + reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply}) + + size = nw.new_node(Nodes.Value, label="Size") + size.outputs[0].default_value = 1.0000 + + multiply_1 = nw.new_node( + Nodes.Math, input_kwargs={0: size}, attrs={"operation": "MULTIPLY"} + ) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = 0.5000 + + mapping = nw.new_node( + Nodes.Mapping, + input_kwargs={"Vector": group_input.outputs["Coordinate"], "Scale": value}, + ) + + group_5 = nw.new_node( + nodegroup_hex_single().name, input_kwargs={"Coordinate": mapping, "Size": size} + ) + + separate_xyz_5 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_5.outputs["UV"]} + ) + + value_3 = nw.new_node(Nodes.Value) + value_3.outputs[0].default_value = 0.0000 + + smooth_max = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_5.outputs["X"], + 1: separate_xyz_5.outputs["Y"], + 2: value_3, + }, + attrs={"operation": "SMOOTH_MAX"}, + ) + + smooth_max_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: smooth_max, 1: separate_xyz_5.outputs["Z"], 2: value_3}, + attrs={"operation": "SMOOTH_MAX"}, + ) + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_1, 1: smooth_max_1}, + attrs={"operation": "SUBTRACT"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: subtract}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, input_kwargs={0: size}, attrs={"operation": "MULTIPLY"} + ) + + multiply_3 = nw.new_node( + Nodes.Math, input_kwargs={0: size, 1: 0.8660}, attrs={"operation": "MULTIPLY"} + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": multiply_2, "Y": multiply_3} + ) + + multiply_4 = nw.new_node( + Nodes.Math, input_kwargs={0: size, 1: 99.0000}, attrs={"operation": "MULTIPLY"} + ) + + combine_xyz_1 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": multiply_4}) + + add = nw.new_node(Nodes.VectorMath, input_kwargs={0: combine_xyz, 1: combine_xyz_1}) + + add_1 = nw.new_node( + Nodes.VectorMath, input_kwargs={0: mapping, 1: add.outputs["Vector"]} + ) + + group_6 = nw.new_node( + nodegroup_hex_single().name, + input_kwargs={"Coordinate": add_1.outputs["Vector"], "Size": size}, + ) + + separate_xyz_6 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_6.outputs["UV"]} + ) + + smooth_max_2 = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_6.outputs["X"], + 1: separate_xyz_6.outputs["Y"], + 2: value_3, + }, + attrs={"operation": "SMOOTH_MAX"}, + ) + + smooth_max_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: smooth_max_2, 1: separate_xyz_6.outputs["Z"], 2: value_3}, + attrs={"operation": "SMOOTH_MAX"}, + ) + + subtract_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_1, 1: smooth_max_3}, + attrs={"operation": "SUBTRACT"}, + ) + + mix_3 = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: subtract_1}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_2 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix_3.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + mix_4 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: mix_2.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_1.outputs[2], 7: group_5.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_2.outputs[2], 7: group_6.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_7 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_5.outputs[2], 7: mix_6.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_1.outputs[2], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + multiply_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_1.outputs[2], 1: group_5.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_5, 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_4.outputs[2], + "Tile Color": mix_7.outputs[2], + "Tile Type 1": greater_than, + "Tile Type 2": greater_than_1, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/shell.py b/infinigen/assets/materials/tiles/shell.py new file mode 100644 index 000000000..03fb45f46 --- /dev/null +++ b/infinigen/assets/materials/tiles/shell.py @@ -0,0 +1,387 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup("nodegroup_half_shell", singleton=False, type="ShaderNodeTree") +def nodegroup_half_shell(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Radius", 0.0000), + ("NodeSocketFloatFactor", "Edge", 0.0000), + ("NodeSocketFloatFactor", "3D-ness", 0.8333), + ], + ) + + separate_xyz_4 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Radius"], 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["X"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: group_input.outputs["Radius"]} + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["Y"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + add_1 = nw.new_node( + Nodes.Math, input_kwargs={0: snap_1, 1: group_input.outputs["Radius"]} + ) + + combine_xyz_5 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": add, "Y": add_1}) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Coordinate"], 1: combine_xyz_5}, + attrs={"operation": "SUBTRACT"}, + ) + + separate_xyz_5 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": subtract.outputs["Vector"]} + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["Y"], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + subtract_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: greater_than}, + attrs={"operation": "SUBTRACT"}, + ) + + length = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract.outputs["Vector"]}, + attrs={"operation": "LENGTH"}, + ) + + absolute = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["X"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: absolute, 1: 1.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + divide = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_1, 1: length.outputs["Value"]}, + attrs={"operation": "DIVIDE"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["Y"], 1: -1.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + divide_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_2, 1: length.outputs["Value"]}, + attrs={"operation": "DIVIDE"}, + ) + + add_2 = nw.new_node(Nodes.Math, input_kwargs={0: divide, 1: divide_1}) + + multiply_3 = nw.new_node( + Nodes.Math, input_kwargs={0: add_2, 1: 0.7071}, attrs={"operation": "MULTIPLY"} + ) + + multiply_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_3, 1: 1.4142}, + attrs={"operation": "MULTIPLY"}, + ) + + power = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_4, 1: 2.0000}, + attrs={"operation": "POWER"}, + ) + + subtract_2 = nw.new_node( + Nodes.Math, input_kwargs={0: power, 1: 1.0000}, attrs={"operation": "SUBTRACT"} + ) + + sqrt = nw.new_node( + Nodes.Math, input_kwargs={0: subtract_2}, attrs={"operation": "SQRT"} + ) + + subtract_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_4, 1: sqrt}, + attrs={"operation": "SUBTRACT"}, + ) + + divide_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: length.outputs["Value"], 1: subtract_3}, + attrs={"operation": "DIVIDE"}, + ) + + multiply_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract_1, 1: divide_2}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_6 = nw.new_node( + Nodes.Math, + input_kwargs={0: greater_than, 1: length.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add_3 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_5, 1: multiply_6}) + + subtract_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Radius"], 1: add_3}, + attrs={"operation": "SUBTRACT"}, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Edge"], + 6: subtract_4, + 7: (0.2574, 0.2574, 0.2574, 1.0000), + }, + attrs={"clamp_factor": False, "blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["3D-ness"], + 6: mix_5.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + combine_xyz = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": snap, "Y": snap_1}) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz} + ) + + multiply_7 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_1, 1: multiply_7} + ) + + multiply_8 = nw.new_node( + Nodes.Math, input_kwargs={0: multiply}, attrs={"operation": "MULTIPLY"} + ) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_1, 1: multiply_8}, + attrs={"operation": "GREATER_THAN"}, + ) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap, 1: multiply_7} + ) + + greater_than_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: group, 1: multiply_8}, + attrs={"operation": "GREATER_THAN"}, + ) + + subtract_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: greater_than_1, 1: greater_than_2}, + attrs={"operation": "SUBTRACT"}, + ) + + absolute_1 = nw.new_node( + Nodes.Math, input_kwargs={0: subtract_5}, attrs={"operation": "ABSOLUTE"} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_6.outputs[2], + "Color": white_noise_texture.outputs["Color"], + "Even": absolute_1, + }, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_shell", singleton=False, type="ShaderNodeTree") +def nodegroup_shell(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + radius = nw.new_node(Nodes.Value, label="Radius") + radius.outputs[0].default_value = 1.0000 + + reroute_1 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["border"]} + ) + + power = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Flatness"], 1: 1.5000}, + attrs={"operation": "POWER"}, + ) + + reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": power}) + + group = nw.new_node( + nodegroup_half_shell().name, + input_kwargs={ + "Coordinate": group_input.outputs["Coordinate"], + "Radius": radius, + "Edge": reroute_1, + "3D-ness": reroute, + }, + ) + + combine_xyz_5 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": radius, "Y": radius} + ) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = 99.0000 + + multiply = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_5, 1: value}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node( + Nodes.VectorMath, + input_kwargs={ + 0: group_input.outputs["Coordinate"], + 1: multiply.outputs["Vector"], + }, + ) + + group_1 = nw.new_node( + nodegroup_half_shell().name, + input_kwargs={ + "Coordinate": add.outputs["Vector"], + "Radius": radius, + "Edge": reroute_1, + "3D-ness": reroute, + }, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: 1.0000, + 6: group.outputs["Result"], + 7: group_1.outputs["Result"], + }, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group.outputs["Result"], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: greater_than, 7: group.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_1.outputs["Result"], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + mix_7 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: greater_than_1, 7: group_1.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_8 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_6.outputs[2], 7: mix_7.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: greater_than_1, 1: group_1.outputs["Even"]}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: group.outputs["Even"], 1: greater_than}, + attrs={"operation": "MULTIPLY"}, + ) + + add_1 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_1, 1: multiply_2}) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_5.outputs[2], + "Tile Color": mix_8.outputs[2], + "Tile Type 1": greater_than, + "Tile Type 2": add_1, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/spanish_bound.py b/infinigen/assets/materials/tiles/spanish_bound.py new file mode 100644 index 000000000..921c987ff --- /dev/null +++ b/infinigen/assets/materials/tiles/spanish_bound.py @@ -0,0 +1,452 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo, nodegroup_u_v_recenter + + +@node_utils.to_nodegroup( + "nodegroup_spanish_bond", singleton=False, type="ShaderNodeTree" +) +def nodegroup_spanish_bond(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + separate_xyz = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + brick_width = nw.new_node(Nodes.Value, label="Brick Width") + brick_width.outputs[0].default_value = 1.0000 + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: brick_width}, + attrs={"operation": "SNAP"}, + ) + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: snap}, + attrs={"operation": "SUBTRACT"}, + ) + + reroute_3 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Aspect Ratio"]} + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: reroute_3, 1: brick_width}) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: subtract, 1: add} + ) + + reroute_2 = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Subtiles Number"]} + ) + + divide = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: reroute_2}, + attrs={"operation": "DIVIDE"}, + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["Y"], 1: divide}, + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group, "Y": group_3} + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": reroute_3, "Y": brick_width} + ) + + scale = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz, "Scale": 0.5000}, + attrs={"operation": "SCALE"}, + ) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": 1.0000, "Y": reroute_2, "Z": 1.0000} + ) + + divide_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: scale.outputs["Vector"], 1: combine_xyz_3}, + attrs={"operation": "DIVIDE"}, + ) + + group_10 = nw.new_node( + nodegroup_u_v_recenter().name, + input_kwargs={"UV": combine_xyz_1, "HalfSize": divide_1.outputs["Vector"]}, + ) + + group_5 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap, 1: add} + ) + + add_1 = nw.new_node(Nodes.Math, input_kwargs={0: brick_width}) + + subtract_1 = nw.new_node( + Nodes.Math, input_kwargs={0: add, 1: add_1}, attrs={"operation": "SUBTRACT"} + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group_5, 1: subtract_1}, + attrs={"operation": "GREATER_THAN"}, + ) + + less_than = nw.new_node( + Nodes.Math, input_kwargs={0: group_5}, attrs={"operation": "LESS_THAN"} + ) + + add_2 = nw.new_node(Nodes.Math, input_kwargs={0: greater_than, 1: less_than}) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group, 1: reroute_3}, + attrs={"operation": "GREATER_THAN"}, + ) + + big_tiles = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: greater_than_1}, + label="big tiles", + attrs={"operation": "SUBTRACT"}, + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: add_2, 1: big_tiles}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_10, 1: multiply}, + attrs={"operation": "MULTIPLY"}, + ) + + add_3 = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz.outputs["X"], 1: brick_width} + ) + + snap_1 = nw.new_node( + Nodes.Math, input_kwargs={0: add_3, 1: brick_width}, attrs={"operation": "SNAP"} + ) + + add_4 = nw.new_node( + Nodes.Math, input_kwargs={0: separate_xyz.outputs["Y"], 1: snap_1} + ) + + reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": add}) + + group_2 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: add_4, 1: reroute_1} + ) + + divide_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: brick_width, 1: reroute_2}, + attrs={"operation": "DIVIDE"}, + ) + + group_4 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz.outputs["X"], 1: divide_2}, + ) + + combine_xyz_5 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_2, "Y": group_4} + ) + + group_12 = nw.new_node( + nodegroup_u_v_recenter().name, + input_kwargs={"UV": combine_xyz_5, "HalfSize": divide_1.outputs["Vector"]}, + ) + + group_7 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: snap_1, 1: add} + ) + + add_5 = nw.new_node(Nodes.Math, input_kwargs={0: brick_width}) + + subtract_2 = nw.new_node( + Nodes.Math, input_kwargs={0: add, 1: add_5}, attrs={"operation": "SUBTRACT"} + ) + + greater_than_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_7, 1: subtract_2}, + attrs={"operation": "GREATER_THAN"}, + ) + + less_than_1 = nw.new_node( + Nodes.Math, input_kwargs={0: group_7}, attrs={"operation": "LESS_THAN"} + ) + + add_6 = nw.new_node(Nodes.Math, input_kwargs={0: greater_than_2, 1: less_than_1}) + + greater_than_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_2, 1: reroute_3}, + attrs={"operation": "GREATER_THAN"}, + ) + + big_tiles_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: greater_than_3}, + label="big tiles", + attrs={"operation": "SUBTRACT"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: add_6, 1: big_tiles_1}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_3 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_12, 1: multiply_2}, + attrs={"operation": "MULTIPLY"}, + ) + + add_7 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_1.outputs["Vector"], 1: multiply_3.outputs["Vector"]}, + ) + + add_8 = nw.new_node(Nodes.Math, input_kwargs={0: multiply, 1: multiply_2}) + + subtract_3 = nw.new_node( + Nodes.Math, input_kwargs={0: 1.0000, 1: add_8}, attrs={"operation": "SUBTRACT"} + ) + + combine_xyz_2 = nw.new_node( + Nodes.CombineXYZ, + input_kwargs={"X": separate_xyz.outputs["X"], "Y": separate_xyz.outputs["Y"]}, + ) + + separate_xyz_2 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_2} + ) + + subtract_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_2.outputs["Y"], 1: brick_width}, + attrs={"operation": "SUBTRACT"}, + ) + + reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": add}) + + group_6 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: subtract_4, 1: reroute}, + ) + + subtract_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: reroute_3, 1: brick_width}, + attrs={"operation": "SUBTRACT"}, + ) + + absolute = nw.new_node( + Nodes.Math, input_kwargs={0: subtract_5}, attrs={"operation": "ABSOLUTE"} + ) + + center_subdivide = nw.new_node(Nodes.Value, label="Center Subdivide") + center_subdivide.outputs[0].default_value = 1.0000 + + divide_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: absolute, 1: center_subdivide}, + attrs={"operation": "DIVIDE"}, + ) + + group_8 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: group_6, 1: divide_3} + ) + + group_1 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz_2.outputs["X"], 1: reroute}, + ) + + group_11 = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: group_1, 1: divide_3} + ) + + combine_xyz_4 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_8, "Y": group_11} + ) + + divide_4 = nw.new_node( + Nodes.Math, input_kwargs={0: absolute, 1: 2.0000}, attrs={"operation": "DIVIDE"} + ) + + divide_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: divide_4, 1: center_subdivide}, + attrs={"operation": "DIVIDE"}, + ) + + group_9 = nw.new_node( + nodegroup_u_v_recenter().name, + input_kwargs={"UV": combine_xyz_4, "HalfSize": divide_5}, + ) + + multiply_4 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract_3, 1: group_9}, + attrs={"operation": "MULTIPLY"}, + ) + + add_9 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: add_7.outputs["Vector"], 1: multiply_4.outputs["Vector"]}, + ) + + separate_xyz_1 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": add_9.outputs["Vector"]} + ) + + smooth_min = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_1.outputs["X"], + 1: separate_xyz_1.outputs["Y"], + 2: 0.0500, + }, + attrs={"operation": "SMOOTH_MIN"}, + ) + + mix = nw.new_node( + Nodes.Mix, + input_kwargs={0: group_input.outputs["border"], 6: smooth_min}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + snap_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["Y"], 1: divide}, + attrs={"operation": "SNAP"}, + ) + + snap_3 = nw.new_node( + Nodes.Math, input_kwargs={0: subtract, 1: add}, attrs={"operation": "SNAP"} + ) + + combine_xyz_7 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_2, "Y": snap_3} + ) + + multiply_5 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply, 1: combine_xyz_7}, + attrs={"operation": "MULTIPLY"}, + ) + + snap_4 = nw.new_node( + Nodes.Math, input_kwargs={0: add_4, 1: reroute_1}, attrs={"operation": "SNAP"} + ) + + snap_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz.outputs["X"], 1: divide_2}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_8 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_4, "Y": snap_5} + ) + + multiply_6 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_2, 1: combine_xyz_8}, + attrs={"operation": "MULTIPLY"}, + ) + + add_10 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: multiply_5.outputs["Vector"], 1: multiply_6.outputs["Vector"]}, + ) + + snap_6 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract_4, 1: reroute}, + attrs={"operation": "SNAP"}, + ) + + snap_7 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_2.outputs["X"], 1: reroute}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_9 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_6, "Y": snap_7} + ) + + multiply_7 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_9, 1: subtract_3}, + attrs={"operation": "MULTIPLY"}, + ) + + add_11 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: add_10.outputs["Vector"], 1: multiply_7.outputs["Vector"]}, + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": add_11.outputs["Vector"]} + ) + + greater_than_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract_3, 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_1.outputs[2], + "Tile Color": white_noise_texture.outputs["Color"], + "Tile Type 1": greater_than_4, + "Tile Type 2": greater_than_4, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/star.py b/infinigen/assets/materials/tiles/star.py new file mode 100644 index 000000000..2303f11bf --- /dev/null +++ b/infinigen/assets/materials/tiles/star.py @@ -0,0 +1,563 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + + +@node_utils.to_nodegroup( + "nodegroup_star_single", singleton=False, type="ShaderNodeTree" +) +def nodegroup_star_single(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Radius", 0.0000), + ("NodeSocketFloatFactor", "Edge", 0.0000), + ("NodeSocketFloatFactor", "3D-ness", 0.8333), + ], + ) + + separate_xyz_4 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Radius"], 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["X"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: group_input.outputs["Radius"]} + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["Y"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + add_1 = nw.new_node( + Nodes.Math, input_kwargs={0: snap_1, 1: group_input.outputs["Radius"]} + ) + + combine_xyz_5 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": add, "Y": add_1}) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Coordinate"], 1: combine_xyz_5}, + attrs={"operation": "SUBTRACT"}, + ) + + length = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract.outputs["Vector"]}, + attrs={"operation": "LENGTH"}, + ) + + separate_xyz_5 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": subtract.outputs["Vector"]} + ) + + absolute = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["X"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: absolute, 1: 1.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + divide = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_1, 1: length.outputs["Value"]}, + attrs={"operation": "DIVIDE"}, + ) + + absolute_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["Y"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: absolute_1, 1: 1.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + divide_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_2, 1: length.outputs["Value"]}, + attrs={"operation": "DIVIDE"}, + ) + + add_2 = nw.new_node(Nodes.Math, input_kwargs={0: divide, 1: divide_1}) + + multiply_3 = nw.new_node( + Nodes.Math, input_kwargs={0: add_2, 1: 0.7071}, attrs={"operation": "MULTIPLY"} + ) + + multiply_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_3, 1: 1.4142}, + attrs={"operation": "MULTIPLY"}, + ) + + power = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_4, 1: 2.0000}, + attrs={"operation": "POWER"}, + ) + + subtract_1 = nw.new_node( + Nodes.Math, input_kwargs={0: power, 1: 1.0000}, attrs={"operation": "SUBTRACT"} + ) + + sqrt = nw.new_node( + Nodes.Math, input_kwargs={0: subtract_1}, attrs={"operation": "SQRT"} + ) + + subtract_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_4, 1: sqrt}, + attrs={"operation": "SUBTRACT"}, + ) + + divide_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: length.outputs["Value"], 1: subtract_2}, + attrs={"operation": "DIVIDE"}, + ) + + subtract_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Radius"], 1: divide_2}, + attrs={"operation": "SUBTRACT"}, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Edge"], + 6: subtract_3, + 7: (0.2574, 0.2574, 0.2574, 1.0000), + }, + attrs={"clamp_factor": False, "blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["3D-ness"], + 6: mix_5.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_5} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_6.outputs[2], + "Color": white_noise_texture.outputs["Color"], + }, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup( + "nodegroup_moon_single", singleton=False, type="ShaderNodeTree" +) +def nodegroup_moon_single(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Radius", 0.0000), + ("NodeSocketFloatFactor", "Edge", 0.0000), + ("NodeSocketFloatFactor", "3D-ness", 0.8333), + ], + ) + + separate_xyz_4 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Radius"], 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["X"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: group_input.outputs["Radius"]} + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["Y"], 1: multiply}, + attrs={"operation": "SNAP"}, + ) + + add_1 = nw.new_node( + Nodes.Math, input_kwargs={0: snap_1, 1: group_input.outputs["Radius"]} + ) + + combine_xyz_5 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": add, "Y": add_1}) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Coordinate"], 1: combine_xyz_5}, + attrs={"operation": "SUBTRACT"}, + ) + + separate_xyz_5 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": subtract.outputs["Vector"]} + ) + + sign = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["X"]}, + attrs={"operation": "SIGN"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: sign, 1: group_input.outputs["Radius"]}, + attrs={"operation": "MULTIPLY"}, + ) + + sign_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["Y"]}, + attrs={"operation": "SIGN"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: sign_1, 1: group_input.outputs["Radius"]}, + attrs={"operation": "MULTIPLY"}, + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": multiply_1, "Y": multiply_2} + ) + + add_2 = nw.new_node( + Nodes.VectorMath, input_kwargs={0: combine_xyz, 1: combine_xyz_5} + ) + + subtract_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["Coordinate"], 1: add_2.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + length = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract_1.outputs["Vector"]}, + attrs={"operation": "LENGTH"}, + ) + + absolute = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["X"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + absolute_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_5.outputs["Y"]}, + attrs={"operation": "ABSOLUTE"}, + ) + + add_3 = nw.new_node(Nodes.Math, input_kwargs={0: absolute, 1: absolute_1}) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: add_3, 1: group_input.outputs["Radius"]}, + attrs={"operation": "GREATER_THAN"}, + ) + + subtract_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: 1.0000, 1: greater_than}, + attrs={"operation": "SUBTRACT"}, + ) + + multiply_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: length.outputs["Value"], 1: subtract_2}, + attrs={"operation": "MULTIPLY"}, + ) + + length_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: subtract.outputs["Vector"]}, + attrs={"operation": "LENGTH"}, + ) + + multiply_4 = nw.new_node( + Nodes.Math, + input_kwargs={0: greater_than, 1: length_1.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add_4 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_3, 1: multiply_4}) + + subtract_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Radius"], 1: add_4}, + attrs={"operation": "SUBTRACT"}, + ) + + multiply_5 = nw.new_node( + Nodes.Math, + input_kwargs={0: subtract_3, 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Edge"], + 6: multiply_5, + 7: (0.2574, 0.2574, 0.2574, 1.0000), + }, + attrs={"clamp_factor": False, "blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["3D-ness"], + 6: mix_5.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + snap_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["X"], 1: group_input.outputs["Radius"]}, + attrs={"operation": "SNAP"}, + ) + + snap_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_4.outputs["Y"], 1: group_input.outputs["Radius"]}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_6 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_2, "Y": snap_3} + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_6} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_6.outputs[2], + "Color": white_noise_texture.outputs["Color"], + }, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_star", singleton=False, type="ShaderNodeTree") +def nodegroup_star(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": group_input.outputs["Coordinate"]} + ) + + radius = nw.new_node(Nodes.Value, label="Radius") + radius.outputs[0].default_value = 2.0000 + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: radius, 1: -100.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + combine_xyz_6 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": multiply, "Y": multiply} + ) + + add = nw.new_node(Nodes.VectorMath, input_kwargs={0: reroute, 1: combine_xyz_6}) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["border"], 1: 2.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply_1}) + + power = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Flatness"], 1: 4.0000}, + attrs={"operation": "POWER"}, + ) + + reroute_2 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": power}) + + group_2 = nw.new_node( + nodegroup_moon_single().name, + input_kwargs={ + "Coordinate": add.outputs["Vector"], + "Radius": radius, + "Edge": reroute_1, + "3D-ness": reroute_2, + }, + ) + + group = nw.new_node( + nodegroup_star_single().name, + input_kwargs={ + "Coordinate": reroute, + "Radius": radius, + "Edge": reroute_1, + "3D-ness": reroute_2, + }, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: radius, 1: 99.0000}, + attrs={"operation": "MULTIPLY"}, + ) + + reroute_3 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply_2}) + + combine_xyz_5 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": reroute_3, "Y": reroute_3} + ) + + add_1 = nw.new_node(Nodes.VectorMath, input_kwargs={0: reroute, 1: combine_xyz_5}) + + group_1 = nw.new_node( + nodegroup_star_single().name, + input_kwargs={ + "Coordinate": add_1.outputs["Vector"], + "Radius": radius, + "Edge": reroute_1, + "3D-ness": reroute_2, + }, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: 1.0000, + 6: group.outputs["Result"], + 7: group_1.outputs["Result"], + }, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: group_2.outputs["Result"], 7: mix_5.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_8 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: group.outputs["Result"], 7: group.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_9 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: 1.0000, + 6: group_1.outputs["Result"], + 7: group_1.outputs["Color"], + }, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_10 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_8.outputs[2], 7: mix_9.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_7 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: 1.0000, + 6: group_2.outputs["Result"], + 7: group_2.outputs["Color"], + }, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_11 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_10.outputs[2], 7: mix_7.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: group_2.outputs["Result"], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_6.outputs[2], + "Tile Color": mix_11.outputs[2], + "Tile Type 1": greater_than, + "Tile Type 2": greater_than, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/triangle.py b/infinigen/assets/materials/tiles/triangle.py new file mode 100644 index 000000000..602e80c94 --- /dev/null +++ b/infinigen/assets/materials/tiles/triangle.py @@ -0,0 +1,379 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + +from .utils import nodegroup_scalar_positive_modulo + + +@node_utils.to_nodegroup( + "nodegroup_triangle_single", singleton=False, type="ShaderNodeTree" +) +def nodegroup_triangle_single(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + value_2 = nw.new_node(Nodes.Value) + value_2.outputs[0].default_value = 0.0000 + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Size", 0.5000), + ], + ) + + separate_xyz_3 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_input.outputs["Coordinate"]} + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Size"], 1: 0.8660}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["Size"], 1: 0.7500}, + attrs={"operation": "MULTIPLY"}, + ) + + combine_xyz_2 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": multiply, "Y": multiply_1} + ) + + separate_xyz_4 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": combine_xyz_2} + ) + + snap = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]}, + attrs={"operation": "SNAP"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, input_kwargs={0: snap, 1: 0.5774}, attrs={"operation": "MULTIPLY"} + ) + + add = nw.new_node( + Nodes.Math, input_kwargs={0: multiply_2, 1: separate_xyz_3.outputs["X"]} + ) + + group_3 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]}, + ) + + group_4 = nw.new_node( + nodegroup_scalar_positive_modulo().name, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]}, + ) + + combine_xyz_3 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": group_3, "Y": group_4} + ) + + multiply_3 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_2, 1: (0.5000, 0.3333, 0.0000)}, + attrs={"operation": "MULTIPLY"}, + ) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: combine_xyz_3, 1: multiply_3.outputs["Vector"]}, + attrs={"operation": "SUBTRACT"}, + ) + + reroute = nw.new_node( + Nodes.Reroute, input_kwargs={"Input": subtract.outputs["Vector"]} + ) + + dot_product = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: reroute, 1: (0.0000, 1.0000, 0.0000)}, + attrs={"operation": "DOT_PRODUCT"}, + ) + + dot_product_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: reroute, 1: (0.8660, -0.5000, 0.0000)}, + attrs={"operation": "DOT_PRODUCT"}, + ) + + dot_product_2 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: reroute, 1: (-0.8660, -0.5000, 0.0000)}, + attrs={"operation": "DOT_PRODUCT"}, + ) + + combine_xyz = nw.new_node( + Nodes.CombineXYZ, + input_kwargs={ + "X": dot_product.outputs["Value"], + "Y": dot_product_1.outputs["Value"], + "Z": dot_product_2.outputs["Value"], + }, + ) + + subtract_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: value_2, 1: combine_xyz}, + attrs={"operation": "SUBTRACT"}, + ) + + snap_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: separate_xyz_3.outputs["Y"], 1: separate_xyz_4.outputs["Y"]}, + attrs={"operation": "SNAP"}, + ) + + snap_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: add, 1: separate_xyz_4.outputs["X"]}, + attrs={"operation": "SNAP"}, + ) + + combine_xyz_1 = nw.new_node( + Nodes.CombineXYZ, input_kwargs={"X": snap_1, "Y": snap_2} + ) + + white_noise_texture = nw.new_node( + Nodes.WhiteNoiseTexture, input_kwargs={"Vector": combine_xyz_1} + ) + + divide = nw.new_node( + Nodes.Math, + input_kwargs={0: snap_2, 1: separate_xyz_4.outputs["X"]}, + attrs={"operation": "DIVIDE"}, + ) + + group = nw.new_node( + nodegroup_scalar_positive_modulo().name, input_kwargs={0: divide, 1: 2.0000} + ) + + greater_than = nw.new_node( + Nodes.Math, input_kwargs={0: group}, attrs={"operation": "GREATER_THAN"} + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "UV": subtract_1.outputs["Vector"], + "Color": white_noise_texture.outputs["Color"], + "Value": greater_than, + }, + attrs={"is_active_output": True}, + ) + + +@node_utils.to_nodegroup("nodegroup_triangle", singleton=False, type="ShaderNodeTree") +def nodegroup_triangle(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "Coordinate", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloat", "Subtiles Number", 1.0000), + ("NodeSocketFloat", "Aspect Ratio", 5.0000), + ("NodeSocketFloatFactor", "border", 0.1000), + ("NodeSocketFloatFactor", "Flatness", 0.9000), + ], + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs["border"], 1: 0.5774}, + attrs={"operation": "MULTIPLY"}, + ) + + reroute = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply}) + + value_6 = nw.new_node(Nodes.Value) + value_6.outputs[0].default_value = 1.0000 + + multiply_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: value_6, 1: 0.2500}, + attrs={"operation": "MULTIPLY"}, + ) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = 0.4330 + + mapping_1 = nw.new_node( + Nodes.Mapping, + input_kwargs={"Vector": group_input.outputs["Coordinate"], "Scale": value}, + ) + + reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": mapping_1}) + + group_8 = nw.new_node( + nodegroup_triangle_single().name, + input_kwargs={"Coordinate": reroute_1, "Size": value_6}, + ) + + separate_xyz_5 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_8.outputs["UV"]} + ) + + value_4 = nw.new_node(Nodes.Value) + value_4.outputs[0].default_value = 0.0000 + + smooth_max = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_5.outputs["X"], + 1: separate_xyz_5.outputs["Y"], + 2: value_4, + }, + attrs={"operation": "SMOOTH_MAX"}, + ) + + smooth_max_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: smooth_max, 1: separate_xyz_5.outputs["Z"], 2: value_4}, + attrs={"operation": "SMOOTH_MAX"}, + ) + + subtract = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_1, 1: smooth_max_1}, + attrs={"operation": "SUBTRACT"}, + ) + + mix_1 = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: subtract}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_4 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix_1.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + vector_rotate = nw.new_node( + Nodes.VectorRotate, input_kwargs={"Vector": reroute_1, "Angle": 3.1416} + ) + + group_7 = nw.new_node( + nodegroup_triangle_single().name, + input_kwargs={"Coordinate": vector_rotate, "Size": value_6}, + ) + + separate_xyz_6 = nw.new_node( + Nodes.SeparateXYZ, input_kwargs={"Vector": group_7.outputs["UV"]} + ) + + smooth_max_2 = nw.new_node( + Nodes.Math, + input_kwargs={ + 0: separate_xyz_6.outputs["X"], + 1: separate_xyz_6.outputs["Y"], + 2: value_4, + }, + attrs={"operation": "SMOOTH_MAX"}, + ) + + smooth_max_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: smooth_max_2, 1: separate_xyz_6.outputs["Z"], 2: value_4}, + attrs={"operation": "SMOOTH_MAX"}, + ) + + subtract_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: multiply_1, 1: smooth_max_3}, + attrs={"operation": "SUBTRACT"}, + ) + + mix_3 = nw.new_node( + Nodes.Mix, + input_kwargs={0: reroute, 6: subtract_1}, + attrs={"blend_type": "BURN", "data_type": "RGBA"}, + ) + + mix_2 = nw.new_node( + Nodes.Mix, + input_kwargs={ + 0: group_input.outputs["Flatness"], + 6: mix_3.outputs[2], + 7: (1.0000, 1.0000, 1.0000, 1.0000), + }, + attrs={"blend_type": "DODGE", "data_type": "RGBA"}, + ) + + mix_5 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: mix_2.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + mix_7 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_2.outputs[2], 7: group_7.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_6 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_4.outputs[2], 7: group_8.outputs["Color"]}, + attrs={"blend_type": "MULTIPLY", "data_type": "RGBA"}, + ) + + mix_8 = nw.new_node( + Nodes.Mix, + input_kwargs={0: 1.0000, 6: mix_7.outputs[2], 7: mix_6.outputs[2]}, + attrs={"blend_type": "ADD", "data_type": "RGBA"}, + ) + + greater_than = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_4.outputs[2], 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + multiply_2 = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_4.outputs[2], 1: group_8.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + multiply_3 = nw.new_node( + Nodes.Math, + input_kwargs={0: mix_2.outputs[2], 1: group_7.outputs["Value"]}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: multiply_3}) + + greater_than_1 = nw.new_node( + Nodes.Math, + input_kwargs={0: add, 1: 0.0000}, + attrs={"operation": "GREATER_THAN"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={ + "Result": mix_5.outputs[2], + "Tile Color": mix_8.outputs[2], + "Tile Type 1": greater_than, + "Tile Type 2": greater_than_1, + }, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tiles/utils.py b/infinigen/assets/materials/tiles/utils.py new file mode 100644 index 000000000..61e1617e7 --- /dev/null +++ b/infinigen/assets/materials/tiles/utils.py @@ -0,0 +1,99 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Yiming Zuo + +from infinigen.core.nodes import node_utils +from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler + + +@node_utils.to_nodegroup( + "nodegroup_scalar_positive_modulo", singleton=False, type="ShaderNodeTree" +) +def nodegroup_scalar_positive_modulo(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketFloat", "input_1", 0.5000), + ("NodeSocketFloat", "input_2", 0.5000), + ], + ) + + modulo = nw.new_node( + Nodes.Math, + input_kwargs={0: group_input.outputs[0], 1: group_input.outputs[1]}, + attrs={"operation": "MODULO"}, + ) + + less_than = nw.new_node( + Nodes.Math, + input_kwargs={0: modulo, 1: 0.0000}, + attrs={"operation": "LESS_THAN"}, + ) + + multiply = nw.new_node( + Nodes.Math, + input_kwargs={0: less_than, 1: group_input.outputs[1]}, + attrs={"operation": "MULTIPLY"}, + ) + + add = nw.new_node(Nodes.Math, input_kwargs={0: modulo, 1: multiply}) + + group_output = nw.new_node( + Nodes.GroupOutput, input_kwargs={"Value": add}, attrs={"is_active_output": True} + ) + + +@node_utils.to_nodegroup( + "nodegroup_u_v_recenter", singleton=False, type="ShaderNodeTree" +) +def nodegroup_u_v_recenter(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + group_input = nw.new_node( + Nodes.GroupInput, + expose_input=[ + ("NodeSocketVector", "UV", (0.0000, 0.0000, 0.0000)), + ("NodeSocketVector", "HalfSize", (0.0000, 0.0000, 0.0000)), + ("NodeSocketFloatAngle", "Rot Angle", 0.0000), + ], + ) + + subtract = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: group_input.outputs["UV"], 1: group_input.outputs["HalfSize"]}, + attrs={"operation": "SUBTRACT"}, + ) + + vector_rotate = nw.new_node( + Nodes.VectorRotate, + input_kwargs={ + "Vector": subtract.outputs["Vector"], + "Angle": group_input.outputs["Rot Angle"], + }, + ) + + absolute = nw.new_node( + Nodes.VectorMath, + input_kwargs={0: vector_rotate}, + attrs={"operation": "ABSOLUTE"}, + ) + + subtract_1 = nw.new_node( + Nodes.VectorMath, + input_kwargs={ + 0: group_input.outputs["HalfSize"], + 1: absolute.outputs["Vector"], + }, + attrs={"operation": "SUBTRACT"}, + ) + + group_output = nw.new_node( + Nodes.GroupOutput, + input_kwargs={"Vector": subtract_1.outputs["Vector"]}, + attrs={"is_active_output": True}, + ) diff --git a/infinigen/assets/materials/tongue.py b/infinigen/assets/materials/tongue.py index 2bb618755..bec370d02 100644 --- a/infinigen/assets/materials/tongue.py +++ b/infinigen/assets/materials/tongue.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/materials/two_color_spots.py b/infinigen/assets/materials/two_color_spots.py index a9fe2b2c2..a54177c79 100644 --- a/infinigen/assets/materials/two_color_spots.py +++ b/infinigen/assets/materials/two_color_spots.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/twocolorz.py b/infinigen/assets/materials/twocolorz.py index 918529a61..3e57bcdff 100644 --- a/infinigen/assets/materials/twocolorz.py +++ b/infinigen/assets/materials/twocolorz.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/materials/utils/surface_utils.py b/infinigen/assets/materials/utils/surface_utils.py index 2d6ff380e..7edb9cc39 100644 --- a/infinigen/assets/materials/utils/surface_utils.py +++ b/infinigen/assets/materials/utils/surface_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang, Lingjie Mei diff --git a/infinigen/assets/materials/vase_shaders.py b/infinigen/assets/materials/vase_shaders.py index 4b61d2c97..d50b2b528 100644 --- a/infinigen/assets/materials/vase_shaders.py +++ b/infinigen/assets/materials/vase_shaders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/water.py b/infinigen/assets/materials/water.py index 4b8100aa4..bc678bc22 100644 --- a/infinigen/assets/materials/water.py +++ b/infinigen/assets/materials/water.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma, Alex Raistrick diff --git a/infinigen/assets/materials/waterfall_material.py b/infinigen/assets/materials/waterfall_material.py index a500035da..2adb18511 100644 --- a/infinigen/assets/materials/waterfall_material.py +++ b/infinigen/assets/materials/waterfall_material.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/assets/materials/wear_tear/procedural_edge_wear.py b/infinigen/assets/materials/wear_tear/procedural_edge_wear.py index 5fdd2c068..fa4a8cdba 100644 --- a/infinigen/assets/materials/wear_tear/procedural_edge_wear.py +++ b/infinigen/assets/materials/wear_tear/procedural_edge_wear.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Meenal Parakh diff --git a/infinigen/assets/materials/wear_tear/procedural_scratch.py b/infinigen/assets/materials/wear_tear/procedural_scratch.py index 304815408..8e6501b38 100644 --- a/infinigen/assets/materials/wear_tear/procedural_scratch.py +++ b/infinigen/assets/materials/wear_tear/procedural_scratch.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Meenal Parakh diff --git a/infinigen/assets/materials/woods/composite_wood_tile.py b/infinigen/assets/materials/woods/composite_wood_tile.py index 5566c6042..518e334c4 100644 --- a/infinigen/assets/materials/woods/composite_wood_tile.py +++ b/infinigen/assets/materials/woods/composite_wood_tile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/materials/woods/crossed_wood_tile.py b/infinigen/assets/materials/woods/crossed_wood_tile.py index 737f11307..b70b1638a 100644 --- a/infinigen/assets/materials/woods/crossed_wood_tile.py +++ b/infinigen/assets/materials/woods/crossed_wood_tile.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei -from .. import tile +from infinigen.assets.materials import tile + from .wood import shader_wood diff --git a/infinigen/assets/materials/woods/hexagon_wood_tile.py b/infinigen/assets/materials/woods/hexagon_wood_tile.py index ee414dd10..e72fce125 100644 --- a/infinigen/assets/materials/woods/hexagon_wood_tile.py +++ b/infinigen/assets/materials/woods/hexagon_wood_tile.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei -from .. import tile +from infinigen.assets.materials import tile + from .wood import shader_wood diff --git a/infinigen/assets/materials/woods/non_wood_tile.py b/infinigen/assets/materials/woods/non_wood_tile.py index d9824728f..633b9f288 100644 --- a/infinigen/assets/materials/woods/non_wood_tile.py +++ b/infinigen/assets/materials/woods/non_wood_tile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -15,7 +15,8 @@ def apply( shape=None, **kwargs, ): - from .. import tile + from infinigen.assets.materials import tile + from .wood import shader_wood shader_funcs = tile.get_shader_funcs() diff --git a/infinigen/assets/materials/woods/square_wood_tile.py b/infinigen/assets/materials/woods/square_wood_tile.py index 768fb3be2..ef1fdffca 100644 --- a/infinigen/assets/materials/woods/square_wood_tile.py +++ b/infinigen/assets/materials/woods/square_wood_tile.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei -from .. import tile +from infinigen.assets.materials import tile + from .wood import shader_wood diff --git a/infinigen/assets/materials/woods/staggered_wood_tile.py b/infinigen/assets/materials/woods/staggered_wood_tile.py index 4bee3aa9c..268e070bd 100644 --- a/infinigen/assets/materials/woods/staggered_wood_tile.py +++ b/infinigen/assets/materials/woods/staggered_wood_tile.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei -from .. import tile +from infinigen.assets.materials import tile + from .wood import shader_wood diff --git a/infinigen/assets/materials/woods/tiled_wood.py b/infinigen/assets/materials/woods/tiled_wood.py index 1351be44c..0a7addb74 100644 --- a/infinigen/assets/materials/woods/tiled_wood.py +++ b/infinigen/assets/materials/woods/tiled_wood.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/materials/woods/wood.py b/infinigen/assets/materials/woods/wood.py index 91c02bf75..60cbe405c 100644 --- a/infinigen/assets/materials/woods/wood.py +++ b/infinigen/assets/materials/woods/wood.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo @@ -8,12 +8,11 @@ from numpy.random import uniform from infinigen.assets.materials import common +from infinigen.assets.utils.object import new_cube from infinigen.core.nodes import Nodes, NodeWrangler from infinigen.core.util.color import hsv2rgba, rgb2hsv from infinigen.core.util.random import log_uniform -from ...utils.object import new_cube - def get_color(): from infinigen.assets.materials.bark_random import get_random_bark_params diff --git a/infinigen/assets/materials/woods/wood_old.py b/infinigen/assets/materials/woods/wood_old.py index 63ac59b60..676730d3e 100644 --- a/infinigen/assets/materials/woods/wood_old.py +++ b/infinigen/assets/materials/woods/wood_old.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang, Lingjie Mei diff --git a/infinigen/assets/materials/woods/wood_tile.py b/infinigen/assets/materials/woods/wood_tile.py index 7d874fe64..8fa01b374 100644 --- a/infinigen/assets/materials/woods/wood_tile.py +++ b/infinigen/assets/materials/woods/wood_tile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/appliances/beverage_fridge.py b/infinigen/assets/objects/appliances/beverage_fridge.py index b37e2db7a..20f31fd37 100644 --- a/infinigen/assets/objects/appliances/beverage_fridge.py +++ b/infinigen/assets/objects/appliances/beverage_fridge.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/appliances/dishwasher.py b/infinigen/assets/objects/appliances/dishwasher.py index 9f6b3de30..d05483b6c 100644 --- a/infinigen/assets/objects/appliances/dishwasher.py +++ b/infinigen/assets/objects/appliances/dishwasher.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/appliances/microwave.py b/infinigen/assets/objects/appliances/microwave.py index c5a373d6c..e7b5d597b 100644 --- a/infinigen/assets/objects/appliances/microwave.py +++ b/infinigen/assets/objects/appliances/microwave.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/appliances/oven.py b/infinigen/assets/objects/appliances/oven.py index 5f3179693..685378c35 100644 --- a/infinigen/assets/objects/appliances/oven.py +++ b/infinigen/assets/objects/appliances/oven.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/appliances/tv.py b/infinigen/assets/objects/appliances/tv.py index b94d9c5a6..57cdaacac 100644 --- a/infinigen/assets/objects/appliances/tv.py +++ b/infinigen/assets/objects/appliances/tv.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/bathroom/__init__.py b/infinigen/assets/objects/bathroom/__init__.py index b2bff87e9..2451a0355 100644 --- a/infinigen/assets/objects/bathroom/__init__.py +++ b/infinigen/assets/objects/bathroom/__init__.py @@ -1,8 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei - from .bathroom_sink import BathroomSinkFactory, StandingSinkFactory from .bathtub import BathtubFactory from .hardware import HardwareFactory diff --git a/infinigen/assets/objects/bathroom/bathroom_sink.py b/infinigen/assets/objects/bathroom/bathroom_sink.py index 9bbcfbee1..47ab56356 100644 --- a/infinigen/assets/objects/bathroom/bathroom_sink.py +++ b/infinigen/assets/objects/bathroom/bathroom_sink.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/bathroom/bathtub.py b/infinigen/assets/objects/bathroom/bathtub.py index 8a6f0528f..6e900faf1 100644 --- a/infinigen/assets/objects/bathroom/bathtub.py +++ b/infinigen/assets/objects/bathroom/bathtub.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/bathroom/hardware.py b/infinigen/assets/objects/bathroom/hardware.py index 49d42c371..8b4ce5e4d 100644 --- a/infinigen/assets/objects/bathroom/hardware.py +++ b/infinigen/assets/objects/bathroom/hardware.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/bathroom/toilet.py b/infinigen/assets/objects/bathroom/toilet.py index 1c1d03378..dc7ebee03 100644 --- a/infinigen/assets/objects/bathroom/toilet.py +++ b/infinigen/assets/objects/bathroom/toilet.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/__init__.py b/infinigen/assets/objects/cactus/__init__.py index 9e97f4e30..2d1cbd5ec 100644 --- a/infinigen/assets/objects/cactus/__init__.py +++ b/infinigen/assets/objects/cactus/__init__.py @@ -1,9 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei -# Date: April 13 2023 - from .columnar import ColumnarBaseCactusFactory from .generate import ( CactusFactory, diff --git a/infinigen/assets/objects/cactus/base.py b/infinigen/assets/objects/cactus/base.py index 5dad2b470..ff2bee6e0 100644 --- a/infinigen/assets/objects/cactus/base.py +++ b/infinigen/assets/objects/cactus/base.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/columnar.py b/infinigen/assets/objects/cactus/columnar.py index dc3ac8586..72ec8f1d2 100644 --- a/infinigen/assets/objects/cactus/columnar.py +++ b/infinigen/assets/objects/cactus/columnar.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/generate.py b/infinigen/assets/objects/cactus/generate.py index b61762b67..faaf21e81 100644 --- a/infinigen/assets/objects/cactus/generate.py +++ b/infinigen/assets/objects/cactus/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/globular.py b/infinigen/assets/objects/cactus/globular.py index 5d3d116f4..8d7170317 100644 --- a/infinigen/assets/objects/cactus/globular.py +++ b/infinigen/assets/objects/cactus/globular.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/kalidium.py b/infinigen/assets/objects/cactus/kalidium.py index 7b74874a5..7decd1ade 100644 --- a/infinigen/assets/objects/cactus/kalidium.py +++ b/infinigen/assets/objects/cactus/kalidium.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/pricky_pear.py b/infinigen/assets/objects/cactus/pricky_pear.py index 47f37d288..0b98ef7f1 100644 --- a/infinigen/assets/objects/cactus/pricky_pear.py +++ b/infinigen/assets/objects/cactus/pricky_pear.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/cactus/spike.py b/infinigen/assets/objects/cactus/spike.py index 7a9615cc0..4b530d25a 100644 --- a/infinigen/assets/objects/cactus/spike.py +++ b/infinigen/assets/objects/cactus/spike.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/clothes/__init__.py b/infinigen/assets/objects/clothes/__init__.py index 5a0bb9209..a2fe1378f 100644 --- a/infinigen/assets/objects/clothes/__init__.py +++ b/infinigen/assets/objects/clothes/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/clothes/blanket.py b/infinigen/assets/objects/clothes/blanket.py index fbd38b03d..3c51a7ea9 100644 --- a/infinigen/assets/objects/clothes/blanket.py +++ b/infinigen/assets/objects/clothes/blanket.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/clothes/pants.py b/infinigen/assets/objects/clothes/pants.py index dbc1b9132..1202d313b 100644 --- a/infinigen/assets/objects/clothes/pants.py +++ b/infinigen/assets/objects/clothes/pants.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/clothes/shirt.py b/infinigen/assets/objects/clothes/shirt.py index 7669e7465..c99fe8501 100644 --- a/infinigen/assets/objects/clothes/shirt.py +++ b/infinigen/assets/objects/clothes/shirt.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/clothes/towel.py b/infinigen/assets/objects/clothes/towel.py index 860b39bae..84cfb46e8 100644 --- a/infinigen/assets/objects/clothes/towel.py +++ b/infinigen/assets/objects/clothes/towel.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/cloud/cloud.py b/infinigen/assets/objects/cloud/cloud.py index 9779c1082..1ef474faf 100644 --- a/infinigen/assets/objects/cloud/cloud.py +++ b/infinigen/assets/objects/cloud/cloud.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hei Law diff --git a/infinigen/assets/objects/cloud/generate.py b/infinigen/assets/objects/cloud/generate.py index d565bba1d..c1aa5229d 100644 --- a/infinigen/assets/objects/cloud/generate.py +++ b/infinigen/assets/objects/cloud/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hei Law diff --git a/infinigen/assets/objects/cloud/node.py b/infinigen/assets/objects/cloud/node.py index a81e62a9c..af83b86e3 100644 --- a/infinigen/assets/objects/cloud/node.py +++ b/infinigen/assets/objects/cloud/node.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hei Law diff --git a/infinigen/assets/objects/corals/__init__.py b/infinigen/assets/objects/corals/__init__.py index 47754a5d1..f1e5896dd 100644 --- a/infinigen/assets/objects/corals/__init__.py +++ b/infinigen/assets/objects/corals/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/base.py b/infinigen/assets/objects/corals/base.py index b415f7a4b..8fcac9d6b 100644 --- a/infinigen/assets/objects/corals/base.py +++ b/infinigen/assets/objects/corals/base.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/diff_growth.py b/infinigen/assets/objects/corals/diff_growth.py index 8b985ff9f..7adc5b5c6 100644 --- a/infinigen/assets/objects/corals/diff_growth.py +++ b/infinigen/assets/objects/corals/diff_growth.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/elkhorn.py b/infinigen/assets/objects/corals/elkhorn.py index cfb06ae37..e955debb8 100644 --- a/infinigen/assets/objects/corals/elkhorn.py +++ b/infinigen/assets/objects/corals/elkhorn.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/fan.py b/infinigen/assets/objects/corals/fan.py index a6122f821..8f671be22 100644 --- a/infinigen/assets/objects/corals/fan.py +++ b/infinigen/assets/objects/corals/fan.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/generate.py b/infinigen/assets/objects/corals/generate.py index c3742a080..b00a6dd36 100644 --- a/infinigen/assets/objects/corals/generate.py +++ b/infinigen/assets/objects/corals/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/laplacian.py b/infinigen/assets/objects/corals/laplacian.py index 8e9d2c487..355b5a816 100644 --- a/infinigen/assets/objects/corals/laplacian.py +++ b/infinigen/assets/objects/corals/laplacian.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/reaction_diffusion.py b/infinigen/assets/objects/corals/reaction_diffusion.py index d1a13f5ad..bcaa18ffe 100644 --- a/infinigen/assets/objects/corals/reaction_diffusion.py +++ b/infinigen/assets/objects/corals/reaction_diffusion.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/star.py b/infinigen/assets/objects/corals/star.py index db504bb91..bc61b6357 100644 --- a/infinigen/assets/objects/corals/star.py +++ b/infinigen/assets/objects/corals/star.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/tentacles.py b/infinigen/assets/objects/corals/tentacles.py index 39b552e59..d7eb27042 100644 --- a/infinigen/assets/objects/corals/tentacles.py +++ b/infinigen/assets/objects/corals/tentacles.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/tree.py b/infinigen/assets/objects/corals/tree.py index 46177a520..17ed70bfe 100644 --- a/infinigen/assets/objects/corals/tree.py +++ b/infinigen/assets/objects/corals/tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/corals/tube.py b/infinigen/assets/objects/corals/tube.py index 9d0bb374b..934c8a569 100644 --- a/infinigen/assets/objects/corals/tube.py +++ b/infinigen/assets/objects/corals/tube.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/beetle.py b/infinigen/assets/objects/creatures/beetle.py index c48c0bf11..ae88377e0 100644 --- a/infinigen/assets/objects/creatures/beetle.py +++ b/infinigen/assets/objects/creatures/beetle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/bird.py b/infinigen/assets/objects/creatures/bird.py index b1907ae23..75080b015 100644 --- a/infinigen/assets/objects/creatures/bird.py +++ b/infinigen/assets/objects/creatures/bird.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/assets/objects/creatures/carnivore.py b/infinigen/assets/objects/creatures/carnivore.py index bec9f3589..a70fb60ea 100644 --- a/infinigen/assets/objects/creatures/carnivore.py +++ b/infinigen/assets/objects/creatures/carnivore.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/crustacean.py b/infinigen/assets/objects/creatures/crustacean.py index 91a21687a..d0318615c 100644 --- a/infinigen/assets/objects/creatures/crustacean.py +++ b/infinigen/assets/objects/creatures/crustacean.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/fish.py b/infinigen/assets/objects/creatures/fish.py index b24985ff7..0c0161dc8 100644 --- a/infinigen/assets/objects/creatures/fish.py +++ b/infinigen/assets/objects/creatures/fish.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -374,7 +374,7 @@ def fish_school_params(self): particle_size=U(0.3, 1), size_random=U(0.1, 0.7), use_rotation_instance=True, - lifetime=bpy.context.scene.frame_end - bpy.context.scene.frame_start, + lifetime=bpy.context.scene.frame_end - bpy.context.scene.frame_start + 1, warmup_frames=1, emit_duration=0, # all particles appear immediately emit_from="VOLUME", diff --git a/infinigen/assets/objects/creatures/herbivore.py b/infinigen/assets/objects/creatures/herbivore.py index 8a8db083c..941dbcc79 100644 --- a/infinigen/assets/objects/creatures/herbivore.py +++ b/infinigen/assets/objects/creatures/herbivore.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/insects/dragonfly.py b/infinigen/assets/objects/creatures/insects/dragonfly.py index bc76a2593..738acf048 100644 --- a/infinigen/assets/objects/creatures/insects/dragonfly.py +++ b/infinigen/assets/objects/creatures/insects/dragonfly.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/antenna/dragonfly_antenna.py b/infinigen/assets/objects/creatures/insects/parts/antenna/dragonfly_antenna.py index ab56c7da9..be9db5ac3 100644 --- a/infinigen/assets/objects/creatures/insects/parts/antenna/dragonfly_antenna.py +++ b/infinigen/assets/objects/creatures/insects/parts/antenna/dragonfly_antenna.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py b/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py index 330f4df9a..9dab4c5d9 100644 --- a/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py +++ b/infinigen/assets/objects/creatures/insects/parts/body/dragonfly_body.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py b/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py index 7d7a18a90..73ce2b41c 100644 --- a/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py +++ b/infinigen/assets/objects/creatures/insects/parts/eye/dragonfly_eye.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/hair/principled_hair.py b/infinigen/assets/objects/creatures/insects/parts/hair/principled_hair.py index dfe27a4ec..f3d8ac645 100644 --- a/infinigen/assets/objects/creatures/insects/parts/hair/principled_hair.py +++ b/infinigen/assets/objects/creatures/insects/parts/hair/principled_hair.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py b/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py index 0010f1e4b..7dec045a3 100644 --- a/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py +++ b/infinigen/assets/objects/creatures/insects/parts/head/dragonfly_head.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/leg/dragonfly_leg.py b/infinigen/assets/objects/creatures/insects/parts/leg/dragonfly_leg.py index bec3c08d9..7d83213e7 100644 --- a/infinigen/assets/objects/creatures/insects/parts/leg/dragonfly_leg.py +++ b/infinigen/assets/objects/creatures/insects/parts/leg/dragonfly_leg.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/mouth/dragonfly_mouth.py b/infinigen/assets/objects/creatures/insects/parts/mouth/dragonfly_mouth.py index d7abd8c2f..f0e6e434e 100644 --- a/infinigen/assets/objects/creatures/insects/parts/mouth/dragonfly_mouth.py +++ b/infinigen/assets/objects/creatures/insects/parts/mouth/dragonfly_mouth.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py b/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py index f32c8db86..0ff9ceb1c 100644 --- a/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py +++ b/infinigen/assets/objects/creatures/insects/parts/tail/dragonfly_tail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/parts/wing/dragonfly_wing.py b/infinigen/assets/objects/creatures/insects/parts/wing/dragonfly_wing.py index 960182ba0..1e6282c88 100644 --- a/infinigen/assets/objects/creatures/insects/parts/wing/dragonfly_wing.py +++ b/infinigen/assets/objects/creatures/insects/parts/wing/dragonfly_wing.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/utils/geom_utils.py b/infinigen/assets/objects/creatures/insects/utils/geom_utils.py index 5aed4b65f..6874ec382 100644 --- a/infinigen/assets/objects/creatures/insects/utils/geom_utils.py +++ b/infinigen/assets/objects/creatures/insects/utils/geom_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/insects/utils/shader_utils.py b/infinigen/assets/objects/creatures/insects/utils/shader_utils.py index 5731e032d..31826f4f7 100644 --- a/infinigen/assets/objects/creatures/insects/utils/shader_utils.py +++ b/infinigen/assets/objects/creatures/insects/utils/shader_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/creatures/jellyfish.py b/infinigen/assets/objects/creatures/jellyfish.py index 58b395bbc..dab5cc95d 100644 --- a/infinigen/assets/objects/creatures/jellyfish.py +++ b/infinigen/assets/objects/creatures/jellyfish.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/beak.py b/infinigen/assets/objects/creatures/parts/beak.py index bd65ad3ec..d216de863 100644 --- a/infinigen/assets/objects/creatures/parts/beak.py +++ b/infinigen/assets/objects/creatures/parts/beak.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/creatures/parts/body.py b/infinigen/assets/objects/creatures/parts/body.py index 14838d9bb..2f21db7d2 100644 --- a/infinigen/assets/objects/creatures/parts/body.py +++ b/infinigen/assets/objects/creatures/parts/body.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/chameleon.py b/infinigen/assets/objects/creatures/parts/chameleon.py index 7ed41fbb0..a62ca6712 100644 --- a/infinigen/assets/objects/creatures/parts/chameleon.py +++ b/infinigen/assets/objects/creatures/parts/chameleon.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/creatures/parts/crustacean/antenna.py b/infinigen/assets/objects/creatures/parts/crustacean/antenna.py index 800ee98bf..bf0552f1c 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/antenna.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/antenna.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/crustacean/body.py b/infinigen/assets/objects/creatures/parts/crustacean/body.py index 7f27977d7..ddda30ce1 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/body.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/body.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/creatures/parts/crustacean/claw.py b/infinigen/assets/objects/creatures/parts/crustacean/claw.py index 9d760ec59..56fc72656 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/claw.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/claw.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/crustacean/eye.py b/infinigen/assets/objects/creatures/parts/crustacean/eye.py index b8a231422..a16c0f90f 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/eye.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/eye.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/crustacean/fin.py b/infinigen/assets/objects/creatures/parts/crustacean/fin.py index 1bee6e541..9974b4b9c 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/fin.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/fin.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/crustacean/leg.py b/infinigen/assets/objects/creatures/parts/crustacean/leg.py index b98c1fcfc..aba4a0f57 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/leg.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/leg.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/crustacean/tail.py b/infinigen/assets/objects/creatures/parts/crustacean/tail.py index 62e948cad..64e2f2c05 100644 --- a/infinigen/assets/objects/creatures/parts/crustacean/tail.py +++ b/infinigen/assets/objects/creatures/parts/crustacean/tail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/eye.py b/infinigen/assets/objects/creatures/parts/eye.py index 48f8b27bf..f4bf9737a 100644 --- a/infinigen/assets/objects/creatures/parts/eye.py +++ b/infinigen/assets/objects/creatures/parts/eye.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/eye_new.py b/infinigen/assets/objects/creatures/parts/eye_new.py index 9df9dbe6a..15de54705 100644 --- a/infinigen/assets/objects/creatures/parts/eye_new.py +++ b/infinigen/assets/objects/creatures/parts/eye_new.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/objects/creatures/parts/fin_old.py b/infinigen/assets/objects/creatures/parts/fin_old.py index 55ae0016d..5cc2da580 100644 --- a/infinigen/assets/objects/creatures/parts/fin_old.py +++ b/infinigen/assets/objects/creatures/parts/fin_old.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/foot.py b/infinigen/assets/objects/creatures/parts/foot.py index 990d3edb8..64b0b3aab 100644 --- a/infinigen/assets/objects/creatures/parts/foot.py +++ b/infinigen/assets/objects/creatures/parts/foot.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/generic_nurbs.py b/infinigen/assets/objects/creatures/parts/generic_nurbs.py index ecb5bbe61..af1a7a27e 100644 --- a/infinigen/assets/objects/creatures/parts/generic_nurbs.py +++ b/infinigen/assets/objects/creatures/parts/generic_nurbs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/head.py b/infinigen/assets/objects/creatures/parts/head.py index 791c739ad..e8feea2e4 100644 --- a/infinigen/assets/objects/creatures/parts/head.py +++ b/infinigen/assets/objects/creatures/parts/head.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/head_detail.py b/infinigen/assets/objects/creatures/parts/head_detail.py index 1382d9282..1bd1d5920 100644 --- a/infinigen/assets/objects/creatures/parts/head_detail.py +++ b/infinigen/assets/objects/creatures/parts/head_detail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/hoof.py b/infinigen/assets/objects/creatures/parts/hoof.py index 70a67c696..79f9ca58b 100644 --- a/infinigen/assets/objects/creatures/parts/hoof.py +++ b/infinigen/assets/objects/creatures/parts/hoof.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/creatures/parts/horn.py b/infinigen/assets/objects/creatures/parts/horn.py index 6f55adadd..0f3be8dfc 100644 --- a/infinigen/assets/objects/creatures/parts/horn.py +++ b/infinigen/assets/objects/creatures/parts/horn.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/creatures/parts/leg.py b/infinigen/assets/objects/creatures/parts/leg.py index 714010bde..c6eea0ada 100644 --- a/infinigen/assets/objects/creatures/parts/leg.py +++ b/infinigen/assets/objects/creatures/parts/leg.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/reptile_detail.py b/infinigen/assets/objects/creatures/parts/reptile_detail.py index 9e9c2f8e4..55596db7b 100644 --- a/infinigen/assets/objects/creatures/parts/reptile_detail.py +++ b/infinigen/assets/objects/creatures/parts/reptile_detail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/creatures/parts/ridged_fin.py b/infinigen/assets/objects/creatures/parts/ridged_fin.py index a57b619bc..2708bb011 100644 --- a/infinigen/assets/objects/creatures/parts/ridged_fin.py +++ b/infinigen/assets/objects/creatures/parts/ridged_fin.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang diff --git a/infinigen/assets/objects/creatures/parts/tail.py b/infinigen/assets/objects/creatures/parts/tail.py index ca442ed31..b6a1aef42 100644 --- a/infinigen/assets/objects/creatures/parts/tail.py +++ b/infinigen/assets/objects/creatures/parts/tail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/parts/utils/draw.py b/infinigen/assets/objects/creatures/parts/utils/draw.py index e3f933949..735430d1c 100644 --- a/infinigen/assets/objects/creatures/parts/utils/draw.py +++ b/infinigen/assets/objects/creatures/parts/utils/draw.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/parts/wings.py b/infinigen/assets/objects/creatures/parts/wings.py index 2cfa03c6f..73aded341 100644 --- a/infinigen/assets/objects/creatures/parts/wings.py +++ b/infinigen/assets/objects/creatures/parts/wings.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/assets/objects/creatures/reptile.py b/infinigen/assets/objects/creatures/reptile.py index b0c187af0..4896154f2 100644 --- a/infinigen/assets/objects/creatures/reptile.py +++ b/infinigen/assets/objects/creatures/reptile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/assets/objects/creatures/util/animation/curve_slither.py b/infinigen/assets/objects/creatures/util/animation/curve_slither.py index 4fd197db9..99691e273 100644 --- a/infinigen/assets/objects/creatures/util/animation/curve_slither.py +++ b/infinigen/assets/objects/creatures/util/animation/curve_slither.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/animation/driver_repeated.py b/infinigen/assets/objects/creatures/util/animation/driver_repeated.py index 1eb8b156d..29f533acb 100644 --- a/infinigen/assets/objects/creatures/util/animation/driver_repeated.py +++ b/infinigen/assets/objects/creatures/util/animation/driver_repeated.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/creatures/util/animation/driver_wiggle.py b/infinigen/assets/objects/creatures/util/animation/driver_wiggle.py index 76c00732c..55f0a9a2c 100644 --- a/infinigen/assets/objects/creatures/util/animation/driver_wiggle.py +++ b/infinigen/assets/objects/creatures/util/animation/driver_wiggle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/animation/idle.py b/infinigen/assets/objects/creatures/util/animation/idle.py index 19d2e903f..4b93906d0 100644 --- a/infinigen/assets/objects/creatures/util/animation/idle.py +++ b/infinigen/assets/objects/creatures/util/animation/idle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/animation/run_cycle.py b/infinigen/assets/objects/creatures/util/animation/run_cycle.py index dce9389e0..82666042b 100644 --- a/infinigen/assets/objects/creatures/util/animation/run_cycle.py +++ b/infinigen/assets/objects/creatures/util/animation/run_cycle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/boid_swarm.py b/infinigen/assets/objects/creatures/util/boid_swarm.py index 539c171ff..5c6f0bcb0 100644 --- a/infinigen/assets/objects/creatures/util/boid_swarm.py +++ b/infinigen/assets/objects/creatures/util/boid_swarm.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/cloth_sim.py b/infinigen/assets/objects/creatures/util/cloth_sim.py index f052d50da..691cb9e39 100644 --- a/infinigen/assets/objects/creatures/util/cloth_sim.py +++ b/infinigen/assets/objects/creatures/util/cloth_sim.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/creature.py b/infinigen/assets/objects/creatures/util/creature.py index cf835cdc0..ba6d7ee1d 100644 --- a/infinigen/assets/objects/creatures/util/creature.py +++ b/infinigen/assets/objects/creatures/util/creature.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/creature_parser.py b/infinigen/assets/objects/creatures/util/creature_parser.py index 4518ce26b..bd3f97304 100644 --- a/infinigen/assets/objects/creatures/util/creature_parser.py +++ b/infinigen/assets/objects/creatures/util/creature_parser.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/creature_util.py b/infinigen/assets/objects/creatures/util/creature_util.py index 7dfe5622b..cf627f46c 100644 --- a/infinigen/assets/objects/creatures/util/creature_util.py +++ b/infinigen/assets/objects/creatures/util/creature_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/genome.py b/infinigen/assets/objects/creatures/util/genome.py index dc80a78d0..88872b16d 100644 --- a/infinigen/assets/objects/creatures/util/genome.py +++ b/infinigen/assets/objects/creatures/util/genome.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/geonode_part.py b/infinigen/assets/objects/creatures/util/geonode_part.py index c42b7b6a0..771fb6321 100644 --- a/infinigen/assets/objects/creatures/util/geonode_part.py +++ b/infinigen/assets/objects/creatures/util/geonode_part.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/hair.py b/infinigen/assets/objects/creatures/util/hair.py index 14708f302..a0ab7d7aa 100644 --- a/infinigen/assets/objects/creatures/util/hair.py +++ b/infinigen/assets/objects/creatures/util/hair.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/join_smoothing.py b/infinigen/assets/objects/creatures/util/join_smoothing.py index 6784e5ec0..7413dc2b9 100644 --- a/infinigen/assets/objects/creatures/util/join_smoothing.py +++ b/infinigen/assets/objects/creatures/util/join_smoothing.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/joining.py b/infinigen/assets/objects/creatures/util/joining.py index 766ea3b88..2957e6fea 100644 --- a/infinigen/assets/objects/creatures/util/joining.py +++ b/infinigen/assets/objects/creatures/util/joining.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/part_util.py b/infinigen/assets/objects/creatures/util/part_util.py index db4ecd0a7..97b4d6321 100644 --- a/infinigen/assets/objects/creatures/util/part_util.py +++ b/infinigen/assets/objects/creatures/util/part_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/rigging.py b/infinigen/assets/objects/creatures/util/rigging.py index 33e5c6f45..14899a219 100644 --- a/infinigen/assets/objects/creatures/util/rigging.py +++ b/infinigen/assets/objects/creatures/util/rigging.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/creatures/util/tree.py b/infinigen/assets/objects/creatures/util/tree.py index be7a08c58..3ef529b42 100644 --- a/infinigen/assets/objects/creatures/util/tree.py +++ b/infinigen/assets/objects/creatures/util/tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/decor/aquarium_tank.py b/infinigen/assets/objects/decor/aquarium_tank.py index 64f356516..5a21340fa 100644 --- a/infinigen/assets/objects/decor/aquarium_tank.py +++ b/infinigen/assets/objects/decor/aquarium_tank.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/deformed_trees/base.py b/infinigen/assets/objects/deformed_trees/base.py index 1c57ff0df..a186554b4 100644 --- a/infinigen/assets/objects/deformed_trees/base.py +++ b/infinigen/assets/objects/deformed_trees/base.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/deformed_trees/fallen.py b/infinigen/assets/objects/deformed_trees/fallen.py index d32ff8058..a12524b6b 100644 --- a/infinigen/assets/objects/deformed_trees/fallen.py +++ b/infinigen/assets/objects/deformed_trees/fallen.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -9,7 +9,7 @@ import numpy as np from numpy.random import uniform -from infinigen.assets.deformed_trees.base import BaseDeformedTreeFactory +from infinigen.assets.objects.deformed_trees.base import BaseDeformedTreeFactory from infinigen.assets.utils.decorate import remove_vertices from infinigen.assets.utils.draw import cut_plane from infinigen.assets.utils.misc import assign_material diff --git a/infinigen/assets/objects/deformed_trees/generate.py b/infinigen/assets/objects/deformed_trees/generate.py index 6ad37b6fa..ff9bf938c 100644 --- a/infinigen/assets/objects/deformed_trees/generate.py +++ b/infinigen/assets/objects/deformed_trees/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. # Authors: Lingjie Mei @@ -6,12 +6,10 @@ import numpy as np -from infinigen.assets.deformed_trees import ( - FallenTreeFactory, - HollowTreeFactory, - RottenTreeFactory, -) -from infinigen.assets.deformed_trees.truncated import TruncatedTreeFactory +from infinigen.assets.objects.deformed_trees.fallen import FallenTreeFactory +from infinigen.assets.objects.deformed_trees.hollow import HollowTreeFactory +from infinigen.assets.objects.deformed_trees.rotten import RottenTreeFactory +from infinigen.assets.objects.deformed_trees.truncated import TruncatedTreeFactory from infinigen.core.placement.factory import AssetFactory from infinigen.core.util.math import FixedSeed diff --git a/infinigen/assets/objects/deformed_trees/hollow.py b/infinigen/assets/objects/deformed_trees/hollow.py index d25e71dbf..2c69a84e8 100644 --- a/infinigen/assets/objects/deformed_trees/hollow.py +++ b/infinigen/assets/objects/deformed_trees/hollow.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -9,7 +9,7 @@ import numpy as np from numpy.random import uniform -from infinigen.assets.deformed_trees.base import BaseDeformedTreeFactory +from infinigen.assets.objects.deformed_trees.base import BaseDeformedTreeFactory from infinigen.assets.utils.decorate import ( read_co, read_material_index, diff --git a/infinigen/assets/objects/deformed_trees/rotten.py b/infinigen/assets/objects/deformed_trees/rotten.py index 2ccace381..bb1b3335b 100644 --- a/infinigen/assets/objects/deformed_trees/rotten.py +++ b/infinigen/assets/objects/deformed_trees/rotten.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -8,7 +8,7 @@ import numpy as np from numpy.random import uniform -from infinigen.assets.deformed_trees.base import BaseDeformedTreeFactory +from infinigen.assets.objects.deformed_trees.base import BaseDeformedTreeFactory from infinigen.assets.utils.decorate import ( read_material_index, remove_vertices, diff --git a/infinigen/assets/objects/deformed_trees/truncated.py b/infinigen/assets/objects/deformed_trees/truncated.py index 85a7bd72c..27760dab4 100644 --- a/infinigen/assets/objects/deformed_trees/truncated.py +++ b/infinigen/assets/objects/deformed_trees/truncated.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -8,7 +8,7 @@ import numpy as np from numpy.random import uniform -from infinigen.assets.deformed_trees import FallenTreeFactory +from infinigen.assets.objects.deformed_trees import FallenTreeFactory from infinigen.assets.utils.decorate import read_co from infinigen.core import surface from infinigen.core.nodes.node_info import Nodes diff --git a/infinigen/assets/objects/elements/__init__.py b/infinigen/assets/objects/elements/__init__.py index bb6ba94a0..1f83d4a6b 100644 --- a/infinigen/assets/objects/elements/__init__.py +++ b/infinigen/assets/objects/elements/__init__.py @@ -1,8 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei - from .doors import ( DoorCasingFactory, GlassPanelDoorFactory, diff --git a/infinigen/assets/objects/elements/doors/__init__.py b/infinigen/assets/objects/elements/doors/__init__.py index 0779c93e3..7495c597f 100644 --- a/infinigen/assets/objects/elements/doors/__init__.py +++ b/infinigen/assets/objects/elements/doors/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/doors/base.py b/infinigen/assets/objects/elements/doors/base.py index 243a5f1dc..e8d9c5526 100644 --- a/infinigen/assets/objects/elements/doors/base.py +++ b/infinigen/assets/objects/elements/doors/base.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/elements/doors/casing.py b/infinigen/assets/objects/elements/doors/casing.py index 4989d358e..fae398787 100644 --- a/infinigen/assets/objects/elements/doors/casing.py +++ b/infinigen/assets/objects/elements/doors/casing.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/elements/doors/lite.py b/infinigen/assets/objects/elements/doors/lite.py index 44345186a..c18143cb3 100644 --- a/infinigen/assets/objects/elements/doors/lite.py +++ b/infinigen/assets/objects/elements/doors/lite.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/doors/louver.py b/infinigen/assets/objects/elements/doors/louver.py index 8b50e2ba9..c0c6adf23 100644 --- a/infinigen/assets/objects/elements/doors/louver.py +++ b/infinigen/assets/objects/elements/doors/louver.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/doors/panel.py b/infinigen/assets/objects/elements/doors/panel.py index d355e531c..fc507e9cf 100644 --- a/infinigen/assets/objects/elements/doors/panel.py +++ b/infinigen/assets/objects/elements/doors/panel.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/nature_shelf_trinkets/generate.py b/infinigen/assets/objects/elements/nature_shelf_trinkets/generate.py index 685ea8243..f8a5119fb 100644 --- a/infinigen/assets/objects/elements/nature_shelf_trinkets/generate.py +++ b/infinigen/assets/objects/elements/nature_shelf_trinkets/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Stamatis Alexandropulos diff --git a/infinigen/assets/objects/elements/pillars.py b/infinigen/assets/objects/elements/pillars.py index b1c949909..503ab42b6 100644 --- a/infinigen/assets/objects/elements/pillars.py +++ b/infinigen/assets/objects/elements/pillars.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/rug.py b/infinigen/assets/objects/elements/rug.py index 12e3da63a..88cf00493 100644 --- a/infinigen/assets/objects/elements/rug.py +++ b/infinigen/assets/objects/elements/rug.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/staircases/__init__.py b/infinigen/assets/objects/elements/staircases/__init__.py index 74998c43a..53b007411 100644 --- a/infinigen/assets/objects/elements/staircases/__init__.py +++ b/infinigen/assets/objects/elements/staircases/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/staircases/cantilever.py b/infinigen/assets/objects/elements/staircases/cantilever.py index 0aa49f538..f56e5b778 100644 --- a/infinigen/assets/objects/elements/staircases/cantilever.py +++ b/infinigen/assets/objects/elements/staircases/cantilever.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/staircases/curved.py b/infinigen/assets/objects/elements/staircases/curved.py index dab01e79a..12f97400d 100644 --- a/infinigen/assets/objects/elements/staircases/curved.py +++ b/infinigen/assets/objects/elements/staircases/curved.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/elements/staircases/generate.py b/infinigen/assets/objects/elements/staircases/generate.py index 1ca67f1f2..511aae0c1 100644 --- a/infinigen/assets/objects/elements/staircases/generate.py +++ b/infinigen/assets/objects/elements/staircases/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/staircases/l_shaped.py b/infinigen/assets/objects/elements/staircases/l_shaped.py index 0b6b9f81b..7c54f48a0 100644 --- a/infinigen/assets/objects/elements/staircases/l_shaped.py +++ b/infinigen/assets/objects/elements/staircases/l_shaped.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/staircases/spiral.py b/infinigen/assets/objects/elements/staircases/spiral.py index 86c00f217..076b198af 100644 --- a/infinigen/assets/objects/elements/staircases/spiral.py +++ b/infinigen/assets/objects/elements/staircases/spiral.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/elements/staircases/straight.py b/infinigen/assets/objects/elements/staircases/straight.py index aab5836b0..79d6e3d2a 100644 --- a/infinigen/assets/objects/elements/staircases/straight.py +++ b/infinigen/assets/objects/elements/staircases/straight.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -77,7 +77,7 @@ def __init__(self, factory_seed, coarse=False): self.hole_size = log_uniform(0.6, 1.0) probs = np.array([3, 2, 2, 2]) self.step_surface = np.random.choice( - [wood, plaster, concrete, fabrics], p=probs / probs.sum() + [wood, plaster, concrete, fabrics.fabric_random], p=probs / probs.sum() ) self.has_rail = self.support_type in ["single-rail", "double-rail"] @@ -87,7 +87,7 @@ def __init__(self, factory_seed, coarse=False): self.rail_height = log_uniform(0.08, 0.12) probs = np.array([3, 2, 2, 1]) self.rail_surface = np.random.choice( - [metal, plaster, concrete, fabrics], p=probs / probs.sum() + [metal, plaster, concrete, fabrics.fabric_random], p=probs / probs.sum() ) self.has_tread = not self.has_step or uniform() < 0.75 @@ -111,7 +111,7 @@ def __init__(self, factory_seed, coarse=False): self.side_thickness = uniform(0.03, 0.08) probs = np.array([3, 3, 1, 2]) self.side_surface = np.random.choice( - [wood, metal, plaster, fabrics], p=probs / probs.sum() + [wood, metal, plaster, fabrics.fabric_random], p=probs / probs.sum() ) self.has_column = self.support_type == "chord" @@ -128,7 +128,7 @@ def __init__(self, factory_seed, coarse=False): ] probs = np.array([3, 2, 3]) self.handrail_surface = np.random.choice( - [wood, metal, fabrics], p=probs / probs.sum() + [wood, metal, fabrics.fabric_random], p=probs / probs.sum() ) self.post_height = log_uniform(0.8, 1.2) @@ -138,7 +138,7 @@ def __init__(self, factory_seed, coarse=False): self.is_post_circular = uniform() < 0.5 probs = np.array([3, 3, 2]) self.post_surface = np.random.choice( - [wood, metal, fabrics], p=probs / probs.sum() + [wood, metal, fabrics.fabric_random], p=probs / probs.sum() ) self.has_vertical_post = self.handrail_type == "vertical-post" diff --git a/infinigen/assets/objects/elements/staircases/u_shaped.py b/infinigen/assets/objects/elements/staircases/u_shaped.py index 5c126c713..bb7278f4d 100644 --- a/infinigen/assets/objects/elements/staircases/u_shaped.py +++ b/infinigen/assets/objects/elements/staircases/u_shaped.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/elements/warehouses/__init__.py b/infinigen/assets/objects/elements/warehouses/__init__.py index cc3b176fa..a0434b96c 100644 --- a/infinigen/assets/objects/elements/warehouses/__init__.py +++ b/infinigen/assets/objects/elements/warehouses/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/warehouses/pallet.py b/infinigen/assets/objects/elements/warehouses/pallet.py index 5bcf54df0..669dc04a7 100644 --- a/infinigen/assets/objects/elements/warehouses/pallet.py +++ b/infinigen/assets/objects/elements/warehouses/pallet.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/elements/warehouses/rack.py b/infinigen/assets/objects/elements/warehouses/rack.py index 6bcf5d11b..a73bd9b02 100644 --- a/infinigen/assets/objects/elements/warehouses/rack.py +++ b/infinigen/assets/objects/elements/warehouses/rack.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/fruits/apple.py b/infinigen/assets/objects/fruits/apple.py index f9f3d55ce..d41fb191d 100644 --- a/infinigen/assets/objects/fruits/apple.py +++ b/infinigen/assets/objects/fruits/apple.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/blackberry.py b/infinigen/assets/objects/fruits/blackberry.py index b8eb7be21..b977e108c 100644 --- a/infinigen/assets/objects/fruits/blackberry.py +++ b/infinigen/assets/objects/fruits/blackberry.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/coconutgreen.py b/infinigen/assets/objects/fruits/coconutgreen.py index 1238d891e..0c6301fe6 100644 --- a/infinigen/assets/objects/fruits/coconutgreen.py +++ b/infinigen/assets/objects/fruits/coconutgreen.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/coconuthairy.py b/infinigen/assets/objects/fruits/coconuthairy.py index 6a207281b..8f5561e64 100644 --- a/infinigen/assets/objects/fruits/coconuthairy.py +++ b/infinigen/assets/objects/fruits/coconuthairy.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/compositional_fruit.py b/infinigen/assets/objects/fruits/compositional_fruit.py index a01666c75..6be470fa8 100644 --- a/infinigen/assets/objects/fruits/compositional_fruit.py +++ b/infinigen/assets/objects/fruits/compositional_fruit.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/cross_section_lib.py b/infinigen/assets/objects/fruits/cross_section_lib.py index 90f69006c..6d7417f01 100644 --- a/infinigen/assets/objects/fruits/cross_section_lib.py +++ b/infinigen/assets/objects/fruits/cross_section_lib.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/durian.py b/infinigen/assets/objects/fruits/durian.py index 9f326b6f8..638cdf78c 100644 --- a/infinigen/assets/objects/fruits/durian.py +++ b/infinigen/assets/objects/fruits/durian.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/fruit_utils.py b/infinigen/assets/objects/fruits/fruit_utils.py index 3f0e1f9cf..bac98645d 100644 --- a/infinigen/assets/objects/fruits/fruit_utils.py +++ b/infinigen/assets/objects/fruits/fruit_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/general_fruit.py b/infinigen/assets/objects/fruits/general_fruit.py index 9196b7c4b..85f3499f3 100644 --- a/infinigen/assets/objects/fruits/general_fruit.py +++ b/infinigen/assets/objects/fruits/general_fruit.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/pineapple.py b/infinigen/assets/objects/fruits/pineapple.py index d187188bb..d2a1f3abb 100644 --- a/infinigen/assets/objects/fruits/pineapple.py +++ b/infinigen/assets/objects/fruits/pineapple.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/seed_lib.py b/infinigen/assets/objects/fruits/seed_lib.py index 5d71da66a..f38512ac5 100644 --- a/infinigen/assets/objects/fruits/seed_lib.py +++ b/infinigen/assets/objects/fruits/seed_lib.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/starfruit.py b/infinigen/assets/objects/fruits/starfruit.py index 62ce61f43..a2b3f46fa 100644 --- a/infinigen/assets/objects/fruits/starfruit.py +++ b/infinigen/assets/objects/fruits/starfruit.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/stem_lib.py b/infinigen/assets/objects/fruits/stem_lib.py index 47dfaf439..ba4bef58b 100644 --- a/infinigen/assets/objects/fruits/stem_lib.py +++ b/infinigen/assets/objects/fruits/stem_lib.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/strawberry.py b/infinigen/assets/objects/fruits/strawberry.py index bd0f817c8..19bf1fe85 100644 --- a/infinigen/assets/objects/fruits/strawberry.py +++ b/infinigen/assets/objects/fruits/strawberry.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/apple_surface.py b/infinigen/assets/objects/fruits/surfaces/apple_surface.py index 49a09635e..a0da618ea 100644 --- a/infinigen/assets/objects/fruits/surfaces/apple_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/apple_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py b/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py index 7ad95e3e7..2f772c241 100644 --- a/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/blackberry_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py b/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py index 99f3cad1e..c76d4db05 100644 --- a/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/coconutgreen_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/coconuthairy_surface.py b/infinigen/assets/objects/fruits/surfaces/coconuthairy_surface.py index c65afccc9..b7d35918f 100644 --- a/infinigen/assets/objects/fruits/surfaces/coconuthairy_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/coconuthairy_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/durian_surface.py b/infinigen/assets/objects/fruits/surfaces/durian_surface.py index 290e40bb0..e1b005d2f 100644 --- a/infinigen/assets/objects/fruits/surfaces/durian_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/durian_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py b/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py index 475df34f8..f215522b4 100644 --- a/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/pineapple_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py b/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py index c27b3bbe2..f502ba6db 100644 --- a/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/starfruit_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py b/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py index 392f3f2f1..dad72914b 100644 --- a/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py +++ b/infinigen/assets/objects/fruits/surfaces/strawberry_surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/fruits/surfaces/surface_utils.py b/infinigen/assets/objects/fruits/surfaces/surface_utils.py index 439ea009d..67430cd39 100644 --- a/infinigen/assets/objects/fruits/surfaces/surface_utils.py +++ b/infinigen/assets/objects/fruits/surfaces/surface_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/grassland/__init__.py b/infinigen/assets/objects/grassland/__init__.py index c6019dea2..1faaa3a1b 100644 --- a/infinigen/assets/objects/grassland/__init__.py +++ b/infinigen/assets/objects/grassland/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/grassland/dandelion.py b/infinigen/assets/objects/grassland/dandelion.py index 508bdb798..74560fd2c 100644 --- a/infinigen/assets/objects/grassland/dandelion.py +++ b/infinigen/assets/objects/grassland/dandelion.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/grassland/flower.py b/infinigen/assets/objects/grassland/flower.py index a185f240f..3a00eb1a4 100644 --- a/infinigen/assets/objects/grassland/flower.py +++ b/infinigen/assets/objects/grassland/flower.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Alejandro Newell diff --git a/infinigen/assets/objects/grassland/flowerplant.py b/infinigen/assets/objects/grassland/flowerplant.py index a9e76be28..49958a5f0 100644 --- a/infinigen/assets/objects/grassland/flowerplant.py +++ b/infinigen/assets/objects/grassland/flowerplant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/grassland/grass_tuft.py b/infinigen/assets/objects/grassland/grass_tuft.py index d720d2837..75c293813 100644 --- a/infinigen/assets/objects/grassland/grass_tuft.py +++ b/infinigen/assets/objects/grassland/grass_tuft.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/lamp/ceiling_classic_lamp.py b/infinigen/assets/objects/lamp/ceiling_classic_lamp.py index 2e4ee2342..ed320038f 100644 --- a/infinigen/assets/objects/lamp/ceiling_classic_lamp.py +++ b/infinigen/assets/objects/lamp/ceiling_classic_lamp.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Stamatis Alexandropoulos diff --git a/infinigen/assets/objects/lamp/ceiling_lights.py b/infinigen/assets/objects/lamp/ceiling_lights.py index 860db0e70..8b30c92a8 100644 --- a/infinigen/assets/objects/lamp/ceiling_lights.py +++ b/infinigen/assets/objects/lamp/ceiling_lights.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/lamp/lamp.py b/infinigen/assets/objects/lamp/lamp.py index 5397ec1fc..9bdc905fe 100644 --- a/infinigen/assets/objects/lamp/lamp.py +++ b/infinigen/assets/objects/lamp/lamp.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/leaves/leaf.py b/infinigen/assets/objects/leaves/leaf.py index a9bd31249..f05f444eb 100644 --- a/infinigen/assets/objects/leaves/leaf.py +++ b/infinigen/assets/objects/leaves/leaf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell, Yiming Zuo, Alexander Raistrick diff --git a/infinigen/assets/objects/leaves/leaf_broadleaf.py b/infinigen/assets/objects/leaves/leaf_broadleaf.py index 7a1fc9153..2606506ef 100644 --- a/infinigen/assets/objects/leaves/leaf_broadleaf.py +++ b/infinigen/assets/objects/leaves/leaf_broadleaf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/leaves/leaf_ginko.py b/infinigen/assets/objects/leaves/leaf_ginko.py index c86065589..90c313f40 100644 --- a/infinigen/assets/objects/leaves/leaf_ginko.py +++ b/infinigen/assets/objects/leaves/leaf_ginko.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/leaves/leaf_maple.py b/infinigen/assets/objects/leaves/leaf_maple.py index 620292bbc..1119828a4 100644 --- a/infinigen/assets/objects/leaves/leaf_maple.py +++ b/infinigen/assets/objects/leaves/leaf_maple.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/leaves/leaf_pine.py b/infinigen/assets/objects/leaves/leaf_pine.py index e07ee8fe6..539d82256 100644 --- a/infinigen/assets/objects/leaves/leaf_pine.py +++ b/infinigen/assets/objects/leaves/leaf_pine.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/leaves/leaf_v2.py b/infinigen/assets/objects/leaves/leaf_v2.py index 8f503a94b..888fd82c7 100644 --- a/infinigen/assets/objects/leaves/leaf_v2.py +++ b/infinigen/assets/objects/leaves/leaf_v2.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/leaves/leaf_wrapped.py b/infinigen/assets/objects/leaves/leaf_wrapped.py index 0f5919954..4c4e9cb2d 100644 --- a/infinigen/assets/objects/leaves/leaf_wrapped.py +++ b/infinigen/assets/objects/leaves/leaf_wrapped.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/mollusk/__init__.py b/infinigen/assets/objects/mollusk/__init__.py index 4ee6f9a6b..bbee1bd8d 100644 --- a/infinigen/assets/objects/mollusk/__init__.py +++ b/infinigen/assets/objects/mollusk/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mollusk/base.py b/infinigen/assets/objects/mollusk/base.py index 50ba656b0..6b5e77bc8 100644 --- a/infinigen/assets/objects/mollusk/base.py +++ b/infinigen/assets/objects/mollusk/base.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mollusk/generate.py b/infinigen/assets/objects/mollusk/generate.py index 5320f15b4..9f02843d7 100644 --- a/infinigen/assets/objects/mollusk/generate.py +++ b/infinigen/assets/objects/mollusk/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mollusk/shell.py b/infinigen/assets/objects/mollusk/shell.py index f25b37fd2..998a40119 100644 --- a/infinigen/assets/objects/mollusk/shell.py +++ b/infinigen/assets/objects/mollusk/shell.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mollusk/snail.py b/infinigen/assets/objects/mollusk/snail.py index f8554e46a..ef5d72671 100644 --- a/infinigen/assets/objects/mollusk/snail.py +++ b/infinigen/assets/objects/mollusk/snail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/agave.py b/infinigen/assets/objects/monocot/agave.py index a53980bba..c8e120b92 100644 --- a/infinigen/assets/objects/monocot/agave.py +++ b/infinigen/assets/objects/monocot/agave.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/banana.py b/infinigen/assets/objects/monocot/banana.py index 3071150cb..ef581102e 100644 --- a/infinigen/assets/objects/monocot/banana.py +++ b/infinigen/assets/objects/monocot/banana.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/generate.py b/infinigen/assets/objects/monocot/generate.py index b172aae0c..5bcf3d2ef 100644 --- a/infinigen/assets/objects/monocot/generate.py +++ b/infinigen/assets/objects/monocot/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/grasses.py b/infinigen/assets/objects/monocot/grasses.py index 7ee174fa0..a2b6130e6 100644 --- a/infinigen/assets/objects/monocot/grasses.py +++ b/infinigen/assets/objects/monocot/grasses.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/growth.py b/infinigen/assets/objects/monocot/growth.py index e1782fc9c..7a0aa0e7b 100644 --- a/infinigen/assets/objects/monocot/growth.py +++ b/infinigen/assets/objects/monocot/growth.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/monocot/kelp.py b/infinigen/assets/objects/monocot/kelp.py index f32cdcbf5..0d49ac29f 100644 --- a/infinigen/assets/objects/monocot/kelp.py +++ b/infinigen/assets/objects/monocot/kelp.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/pinecone.py b/infinigen/assets/objects/monocot/pinecone.py index e863689cb..4a961729f 100644 --- a/infinigen/assets/objects/monocot/pinecone.py +++ b/infinigen/assets/objects/monocot/pinecone.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/tussock.py b/infinigen/assets/objects/monocot/tussock.py index 13bf520fe..0ff1258be 100644 --- a/infinigen/assets/objects/monocot/tussock.py +++ b/infinigen/assets/objects/monocot/tussock.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/monocot/veratrum.py b/infinigen/assets/objects/monocot/veratrum.py index 01cef3027..77f3d5394 100644 --- a/infinigen/assets/objects/monocot/veratrum.py +++ b/infinigen/assets/objects/monocot/veratrum.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/mushroom/cap.py b/infinigen/assets/objects/mushroom/cap.py index d2e3da10a..04dc8fd7c 100644 --- a/infinigen/assets/objects/mushroom/cap.py +++ b/infinigen/assets/objects/mushroom/cap.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mushroom/generate.py b/infinigen/assets/objects/mushroom/generate.py index 0b5891b8a..7902e3027 100644 --- a/infinigen/assets/objects/mushroom/generate.py +++ b/infinigen/assets/objects/mushroom/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mushroom/growth.py b/infinigen/assets/objects/mushroom/growth.py index 3ba06f728..140405741 100644 --- a/infinigen/assets/objects/mushroom/growth.py +++ b/infinigen/assets/objects/mushroom/growth.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/mushroom/stem.py b/infinigen/assets/objects/mushroom/stem.py index 7e56fa42a..b2d774940 100644 --- a/infinigen/assets/objects/mushroom/stem.py +++ b/infinigen/assets/objects/mushroom/stem.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/organizer/__init__.py b/infinigen/assets/objects/organizer/__init__.py index 9faff406e..225ad2a62 100644 --- a/infinigen/assets/objects/organizer/__init__.py +++ b/infinigen/assets/objects/organizer/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/organizer/basket.py b/infinigen/assets/objects/organizer/basket.py index 66636a1c1..171c0a947 100644 --- a/infinigen/assets/objects/organizer/basket.py +++ b/infinigen/assets/objects/organizer/basket.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/organizer/hook.py b/infinigen/assets/objects/organizer/hook.py index 5be1a829d..0fad2f758 100644 --- a/infinigen/assets/objects/organizer/hook.py +++ b/infinigen/assets/objects/organizer/hook.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/organizer/plate_rack.py b/infinigen/assets/objects/organizer/plate_rack.py index 23885c86f..73eba98b7 100644 --- a/infinigen/assets/objects/organizer/plate_rack.py +++ b/infinigen/assets/objects/organizer/plate_rack.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/particles/lichen.py b/infinigen/assets/objects/particles/lichen.py index e0337d522..15f2f8f3f 100644 --- a/infinigen/assets/objects/particles/lichen.py +++ b/infinigen/assets/objects/particles/lichen.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/particles/moss.py b/infinigen/assets/objects/particles/moss.py index 811236582..51ba736cf 100644 --- a/infinigen/assets/objects/particles/moss.py +++ b/infinigen/assets/objects/particles/moss.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/particles/particles.py b/infinigen/assets/objects/particles/particles.py index a514bcd55..97f9dbdd4 100644 --- a/infinigen/assets/objects/particles/particles.py +++ b/infinigen/assets/objects/particles/particles.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hei Law, Alexander Raistrick diff --git a/infinigen/assets/objects/particles/pine_needle.py b/infinigen/assets/objects/particles/pine_needle.py index 778764d9d..e0cae910e 100644 --- a/infinigen/assets/objects/particles/pine_needle.py +++ b/infinigen/assets/objects/particles/pine_needle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Lingjie Mei diff --git a/infinigen/assets/objects/rocks/blender_rock.py b/infinigen/assets/objects/rocks/blender_rock.py index 217c36015..52ae0aba3 100644 --- a/infinigen/assets/objects/rocks/blender_rock.py +++ b/infinigen/assets/objects/rocks/blender_rock.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/objects/rocks/boulder.py b/infinigen/assets/objects/rocks/boulder.py index 0feb92571..02bbd2658 100644 --- a/infinigen/assets/objects/rocks/boulder.py +++ b/infinigen/assets/objects/rocks/boulder.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/rocks/glowing_rocks.py b/infinigen/assets/objects/rocks/glowing_rocks.py index fafff3d3b..b4625a9c5 100644 --- a/infinigen/assets/objects/rocks/glowing_rocks.py +++ b/infinigen/assets/objects/rocks/glowing_rocks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/assets/objects/rocks/pile.py b/infinigen/assets/objects/rocks/pile.py index 320754ca3..17dfceea2 100644 --- a/infinigen/assets/objects/rocks/pile.py +++ b/infinigen/assets/objects/rocks/pile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/seating/__init__.py b/infinigen/assets/objects/seating/__init__.py index 8cc29004c..807659121 100644 --- a/infinigen/assets/objects/seating/__init__.py +++ b/infinigen/assets/objects/seating/__init__.py @@ -1,8 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei - from .bed import BedFactory from .bedframe import BedFrameFactory from .chairs import ( diff --git a/infinigen/assets/objects/seating/bed.py b/infinigen/assets/objects/seating/bed.py index c6ba18c7f..6742f612b 100644 --- a/infinigen/assets/objects/seating/bed.py +++ b/infinigen/assets/objects/seating/bed.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -45,7 +45,7 @@ def mattress_factory(self): @cached_property def quilt_factory(self): - from ..clothes.blanket import BlanketFactory + from infinigen.assets.objects.clothes.blanket import BlanketFactory factory = BlanketFactory(self.factory_seed, self.coarse) factory.width = self.mattress_factory.width * uniform(1.4, 1.6) @@ -54,7 +54,7 @@ def quilt_factory(self): @cached_property def comforter_factory(self): - from ..clothes.blanket import ComforterFactory + from infinigen.assets.objects.clothes.blanket import ComforterFactory factory = ComforterFactory(self.factory_seed, self.coarse) factory.width = self.mattress_factory.width * uniform(1.4, 1.8) @@ -63,7 +63,7 @@ def comforter_factory(self): @cached_property def box_comforter_factory(self): - from ..clothes.blanket import BoxComforterFactory + from infinigen.assets.objects.clothes.blanket import BoxComforterFactory factory = BoxComforterFactory(self.factory_seed, self.coarse) factory.width = self.mattress_factory.width * uniform(1.4, 1.8) @@ -72,7 +72,7 @@ def box_comforter_factory(self): @cached_property def cover_factory(self): - from ..clothes.blanket import BlanketFactory + from infinigen.assets.objects.clothes.blanket import BlanketFactory factory = BlanketFactory(self.factory_seed, self.coarse) factory.width = self.mattress_factory.width * uniform(1.6, 1.8) @@ -81,7 +81,7 @@ def cover_factory(self): @cached_property def towel_factory(self): - from ..clothes import TowelFactory + from infinigen.assets.objects.clothes import TowelFactory return TowelFactory(self.factory_seed) diff --git a/infinigen/assets/objects/seating/bedframe.py b/infinigen/assets/objects/seating/bedframe.py index d6555856b..76b892e7d 100644 --- a/infinigen/assets/objects/seating/bedframe.py +++ b/infinigen/assets/objects/seating/bedframe.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/seating/chairs/__init__.py b/infinigen/assets/objects/seating/chairs/__init__.py index a7f276345..600c2a83f 100644 --- a/infinigen/assets/objects/seating/chairs/__init__.py +++ b/infinigen/assets/objects/seating/chairs/__init__.py @@ -1,7 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei from .bar_chair import BarChairFactory from .chair import ChairFactory from .office_chair import OfficeChairFactory diff --git a/infinigen/assets/objects/seating/chairs/bar_chair.py b/infinigen/assets/objects/seating/chairs/bar_chair.py index 0bb805b4f..9f765024b 100644 --- a/infinigen/assets/objects/seating/chairs/bar_chair.py +++ b/infinigen/assets/objects/seating/chairs/bar_chair.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/seating/chairs/chair.py b/infinigen/assets/objects/seating/chairs/chair.py index d83e3f395..ffce7f90f 100644 --- a/infinigen/assets/objects/seating/chairs/chair.py +++ b/infinigen/assets/objects/seating/chairs/chair.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/seating/chairs/office_chair.py b/infinigen/assets/objects/seating/chairs/office_chair.py index 329c5ba04..5a7df2d69 100644 --- a/infinigen/assets/objects/seating/chairs/office_chair.py +++ b/infinigen/assets/objects/seating/chairs/office_chair.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/seating/chairs/seats/curvy_seats.py b/infinigen/assets/objects/seating/chairs/seats/curvy_seats.py index 5e131c936..9c69277c4 100644 --- a/infinigen/assets/objects/seating/chairs/seats/curvy_seats.py +++ b/infinigen/assets/objects/seating/chairs/seats/curvy_seats.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/seating/chairs/seats/round_seats.py b/infinigen/assets/objects/seating/chairs/seats/round_seats.py index eea4cd75b..464dda384 100644 --- a/infinigen/assets/objects/seating/chairs/seats/round_seats.py +++ b/infinigen/assets/objects/seating/chairs/seats/round_seats.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/seating/mattress.py b/infinigen/assets/objects/seating/mattress.py index a7a0bbc28..fede8e7fa 100644 --- a/infinigen/assets/objects/seating/mattress.py +++ b/infinigen/assets/objects/seating/mattress.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/seating/pillow.py b/infinigen/assets/objects/seating/pillow.py index d87d4a3a6..578c8e991 100644 --- a/infinigen/assets/objects/seating/pillow.py +++ b/infinigen/assets/objects/seating/pillow.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -52,7 +52,9 @@ def __init__(self, factory_seed, coarse=False): self.extrude_thickness = ( self.thickness * log_uniform(1, 8) if uniform() < 0.5 else 0 ) - self.surface = np.random.choice([art.ArtFabric(self.factory_seed), fabrics]) + self.surface = np.random.choice( + [art.ArtFabric(self.factory_seed), fabrics.fabric_random] + ) self.has_seam = uniform() < 0.3 and not self.shape == "torus" self.seam_radius = uniform(0.01, 0.02) diff --git a/infinigen/assets/objects/seating/sofa.py b/infinigen/assets/objects/seating/sofa.py index 4ab7c1931..33172d707 100644 --- a/infinigen/assets/objects/seating/sofa.py +++ b/infinigen/assets/objects/seating/sofa.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Stamatis Alexandropolous, Yiming Zuo diff --git a/infinigen/assets/objects/shelves/cabinet.py b/infinigen/assets/objects/shelves/cabinet.py index 93527d63f..dece3fceb 100644 --- a/infinigen/assets/objects/shelves/cabinet.py +++ b/infinigen/assets/objects/shelves/cabinet.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/cell_shelf.py b/infinigen/assets/objects/shelves/cell_shelf.py index e36a60223..51be1a021 100644 --- a/infinigen/assets/objects/shelves/cell_shelf.py +++ b/infinigen/assets/objects/shelves/cell_shelf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/countertop.py b/infinigen/assets/objects/shelves/countertop.py index e2ff31b74..0ef7de3f6 100644 --- a/infinigen/assets/objects/shelves/countertop.py +++ b/infinigen/assets/objects/shelves/countertop.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/shelves/doors.py b/infinigen/assets/objects/shelves/doors.py index 0f237e794..5a81bb082 100644 --- a/infinigen/assets/objects/shelves/doors.py +++ b/infinigen/assets/objects/shelves/doors.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/shelves/drawers.py b/infinigen/assets/objects/shelves/drawers.py index baed2c69e..973ff1df7 100644 --- a/infinigen/assets/objects/shelves/drawers.py +++ b/infinigen/assets/objects/shelves/drawers.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/kitchen_cabinet.py b/infinigen/assets/objects/shelves/kitchen_cabinet.py index d2d487ebe..bbd500ad7 100644 --- a/infinigen/assets/objects/shelves/kitchen_cabinet.py +++ b/infinigen/assets/objects/shelves/kitchen_cabinet.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/kitchen_space.py b/infinigen/assets/objects/shelves/kitchen_space.py index a13f5776a..709bef24d 100644 --- a/infinigen/assets/objects/shelves/kitchen_space.py +++ b/infinigen/assets/objects/shelves/kitchen_space.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo, Stamatis Alexandropoulos diff --git a/infinigen/assets/objects/shelves/large_shelf.py b/infinigen/assets/objects/shelves/large_shelf.py index ae6ffe7e8..75a2261e6 100644 --- a/infinigen/assets/objects/shelves/large_shelf.py +++ b/infinigen/assets/objects/shelves/large_shelf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/simple_bookcase.py b/infinigen/assets/objects/shelves/simple_bookcase.py index 4f6b83e84..6f4b72ddf 100644 --- a/infinigen/assets/objects/shelves/simple_bookcase.py +++ b/infinigen/assets/objects/shelves/simple_bookcase.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/simple_desk.py b/infinigen/assets/objects/shelves/simple_desk.py index 422d09f22..d9632337e 100644 --- a/infinigen/assets/objects/shelves/simple_desk.py +++ b/infinigen/assets/objects/shelves/simple_desk.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/single_cabinet.py b/infinigen/assets/objects/shelves/single_cabinet.py index f319ac392..9c8e1fcea 100644 --- a/infinigen/assets/objects/shelves/single_cabinet.py +++ b/infinigen/assets/objects/shelves/single_cabinet.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/triangle_shelf.py b/infinigen/assets/objects/shelves/triangle_shelf.py index 7d7fba9c6..3af3af80e 100644 --- a/infinigen/assets/objects/shelves/triangle_shelf.py +++ b/infinigen/assets/objects/shelves/triangle_shelf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/shelves/utils.py b/infinigen/assets/objects/shelves/utils.py index 2f0fa73f2..05de03da6 100644 --- a/infinigen/assets/objects/shelves/utils.py +++ b/infinigen/assets/objects/shelves/utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/fern.py b/infinigen/assets/objects/small_plants/fern.py index 4a66f72ed..072c4cd6e 100644 --- a/infinigen/assets/objects/small_plants/fern.py +++ b/infinigen/assets/objects/small_plants/fern.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/leaf_general.py b/infinigen/assets/objects/small_plants/leaf_general.py index 6882cb1e4..18c2c24a6 100644 --- a/infinigen/assets/objects/small_plants/leaf_general.py +++ b/infinigen/assets/objects/small_plants/leaf_general.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/leaf_heart.py b/infinigen/assets/objects/small_plants/leaf_heart.py index 52eda2981..f8a171861 100644 --- a/infinigen/assets/objects/small_plants/leaf_heart.py +++ b/infinigen/assets/objects/small_plants/leaf_heart.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/num_leaf_grass.py b/infinigen/assets/objects/small_plants/num_leaf_grass.py index 98f1246ab..743458e51 100644 --- a/infinigen/assets/objects/small_plants/num_leaf_grass.py +++ b/infinigen/assets/objects/small_plants/num_leaf_grass.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/snake_plant.py b/infinigen/assets/objects/small_plants/snake_plant.py index e101a7aca..8433361b2 100644 --- a/infinigen/assets/objects/small_plants/snake_plant.py +++ b/infinigen/assets/objects/small_plants/snake_plant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/spider_plant.py b/infinigen/assets/objects/small_plants/spider_plant.py index ff4b68567..0e76b7c1f 100644 --- a/infinigen/assets/objects/small_plants/spider_plant.py +++ b/infinigen/assets/objects/small_plants/spider_plant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/small_plants/succulent.py b/infinigen/assets/objects/small_plants/succulent.py index 640ee5dcc..cdf92fdc3 100644 --- a/infinigen/assets/objects/small_plants/succulent.py +++ b/infinigen/assets/objects/small_plants/succulent.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/table_decorations/book.py b/infinigen/assets/objects/table_decorations/book.py index dc41242b0..1372778f2 100644 --- a/infinigen/assets/objects/table_decorations/book.py +++ b/infinigen/assets/objects/table_decorations/book.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import math diff --git a/infinigen/assets/objects/table_decorations/sink.py b/infinigen/assets/objects/table_decorations/sink.py index c4899c0c4..4de90faa5 100644 --- a/infinigen/assets/objects/table_decorations/sink.py +++ b/infinigen/assets/objects/table_decorations/sink.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/assets/objects/table_decorations/utils.py b/infinigen/assets/objects/table_decorations/utils.py index 340781c88..575c1a539 100644 --- a/infinigen/assets/objects/table_decorations/utils.py +++ b/infinigen/assets/objects/table_decorations/utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/table_decorations/vase.py b/infinigen/assets/objects/table_decorations/vase.py index 576d9c105..89bffeef3 100644 --- a/infinigen/assets/objects/table_decorations/vase.py +++ b/infinigen/assets/objects/table_decorations/vase.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/__init__.py b/infinigen/assets/objects/tables/__init__.py index 7fddf378a..9621eff7e 100644 --- a/infinigen/assets/objects/tables/__init__.py +++ b/infinigen/assets/objects/tables/__init__.py @@ -1,7 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Lingjie Mei from .cocktail_table import TableCocktailFactory from .dining_table import CoffeeTableFactory, SideTableFactory, TableDiningFactory from .table_top import TableTopFactory diff --git a/infinigen/assets/objects/tables/cocktail_table.py b/infinigen/assets/objects/tables/cocktail_table.py index 8decf48bf..bded7b73f 100644 --- a/infinigen/assets/objects/tables/cocktail_table.py +++ b/infinigen/assets/objects/tables/cocktail_table.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/assets/objects/tables/dining_table.py b/infinigen/assets/objects/tables/dining_table.py index 923ba07f8..630510eec 100644 --- a/infinigen/assets/objects/tables/dining_table.py +++ b/infinigen/assets/objects/tables/dining_table.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/legs/single_stand.py b/infinigen/assets/objects/tables/legs/single_stand.py index 45ad29833..0b225cdd7 100644 --- a/infinigen/assets/objects/tables/legs/single_stand.py +++ b/infinigen/assets/objects/tables/legs/single_stand.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/legs/square.py b/infinigen/assets/objects/tables/legs/square.py index 72d51f6c6..b2b2dc34f 100644 --- a/infinigen/assets/objects/tables/legs/square.py +++ b/infinigen/assets/objects/tables/legs/square.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/legs/straight.py b/infinigen/assets/objects/tables/legs/straight.py index ca47ffed3..324d600f8 100644 --- a/infinigen/assets/objects/tables/legs/straight.py +++ b/infinigen/assets/objects/tables/legs/straight.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/legs/wheeled.py b/infinigen/assets/objects/tables/legs/wheeled.py index 5360fe0aa..7ecc78e5b 100644 --- a/infinigen/assets/objects/tables/legs/wheeled.py +++ b/infinigen/assets/objects/tables/legs/wheeled.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/lofting.py b/infinigen/assets/objects/tables/lofting.py index d5e12f82d..591607d91 100644 --- a/infinigen/assets/objects/tables/lofting.py +++ b/infinigen/assets/objects/tables/lofting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/strechers.py b/infinigen/assets/objects/tables/strechers.py index 021fc9948..88acadead 100644 --- a/infinigen/assets/objects/tables/strechers.py +++ b/infinigen/assets/objects/tables/strechers.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/table_top.py b/infinigen/assets/objects/tables/table_top.py index 8cb002b0a..607aad3ea 100644 --- a/infinigen/assets/objects/tables/table_top.py +++ b/infinigen/assets/objects/tables/table_top.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tables/table_utils.py b/infinigen/assets/objects/tables/table_utils.py index ea2a30c62..5ae73e339 100644 --- a/infinigen/assets/objects/tables/table_utils.py +++ b/infinigen/assets/objects/tables/table_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/tableware/__init__.py b/infinigen/assets/objects/tableware/__init__.py index 66098264b..44278c2a4 100644 --- a/infinigen/assets/objects/tableware/__init__.py +++ b/infinigen/assets/objects/tableware/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/base.py b/infinigen/assets/objects/tableware/base.py index 5eb014251..7dd2af265 100644 --- a/infinigen/assets/objects/tableware/base.py +++ b/infinigen/assets/objects/tableware/base.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/bottle.py b/infinigen/assets/objects/tableware/bottle.py index 3012e535b..8b32d70d0 100644 --- a/infinigen/assets/objects/tableware/bottle.py +++ b/infinigen/assets/objects/tableware/bottle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/tableware/bowl.py b/infinigen/assets/objects/tableware/bowl.py index 2ff8655f2..d260eb912 100644 --- a/infinigen/assets/objects/tableware/bowl.py +++ b/infinigen/assets/objects/tableware/bowl.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/can.py b/infinigen/assets/objects/tableware/can.py index 5b53ba126..635a22876 100644 --- a/infinigen/assets/objects/tableware/can.py +++ b/infinigen/assets/objects/tableware/can.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/tableware/chopsticks.py b/infinigen/assets/objects/tableware/chopsticks.py index 6c3600607..358088d24 100644 --- a/infinigen/assets/objects/tableware/chopsticks.py +++ b/infinigen/assets/objects/tableware/chopsticks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/cup.py b/infinigen/assets/objects/tableware/cup.py index 7cb3cef12..ffaeed975 100644 --- a/infinigen/assets/objects/tableware/cup.py +++ b/infinigen/assets/objects/tableware/cup.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/food_bag.py b/infinigen/assets/objects/tableware/food_bag.py index 17f095fa7..41a6bfd99 100644 --- a/infinigen/assets/objects/tableware/food_bag.py +++ b/infinigen/assets/objects/tableware/food_bag.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/tableware/food_box.py b/infinigen/assets/objects/tableware/food_box.py index d0a282d0b..f0e8ed76e 100644 --- a/infinigen/assets/objects/tableware/food_box.py +++ b/infinigen/assets/objects/tableware/food_box.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/fork.py b/infinigen/assets/objects/tableware/fork.py index 43f8ea862..8929129c4 100644 --- a/infinigen/assets/objects/tableware/fork.py +++ b/infinigen/assets/objects/tableware/fork.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/tableware/fruit_container.py b/infinigen/assets/objects/tableware/fruit_container.py index 0461976e8..09ced21c1 100644 --- a/infinigen/assets/objects/tableware/fruit_container.py +++ b/infinigen/assets/objects/tableware/fruit_container.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/jar.py b/infinigen/assets/objects/tableware/jar.py index 38fadfaf7..1f46f7d1a 100644 --- a/infinigen/assets/objects/tableware/jar.py +++ b/infinigen/assets/objects/tableware/jar.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/tableware/knife.py b/infinigen/assets/objects/tableware/knife.py index 61cf0d04d..c4515e23a 100644 --- a/infinigen/assets/objects/tableware/knife.py +++ b/infinigen/assets/objects/tableware/knife.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import bmesh diff --git a/infinigen/assets/objects/tableware/lid.py b/infinigen/assets/objects/tableware/lid.py index 43687a6b6..4233432ef 100644 --- a/infinigen/assets/objects/tableware/lid.py +++ b/infinigen/assets/objects/tableware/lid.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/pan.py b/infinigen/assets/objects/tableware/pan.py index 545687562..f19d9505f 100644 --- a/infinigen/assets/objects/tableware/pan.py +++ b/infinigen/assets/objects/tableware/pan.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/objects/tableware/plant_container.py b/infinigen/assets/objects/tableware/plant_container.py index eec7662b3..b278b4ef1 100644 --- a/infinigen/assets/objects/tableware/plant_container.py +++ b/infinigen/assets/objects/tableware/plant_container.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/plate.py b/infinigen/assets/objects/tableware/plate.py index 294613c66..461b78f46 100644 --- a/infinigen/assets/objects/tableware/plate.py +++ b/infinigen/assets/objects/tableware/plate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/pot.py b/infinigen/assets/objects/tableware/pot.py index 626513c62..68d5999fc 100644 --- a/infinigen/assets/objects/tableware/pot.py +++ b/infinigen/assets/objects/tableware/pot.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/spoon.py b/infinigen/assets/objects/tableware/spoon.py index fba137164..c77a251d3 100644 --- a/infinigen/assets/objects/tableware/spoon.py +++ b/infinigen/assets/objects/tableware/spoon.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/tableware/wineglass.py b/infinigen/assets/objects/tableware/wineglass.py index 09967240f..07dd8890c 100644 --- a/infinigen/assets/objects/tableware/wineglass.py +++ b/infinigen/assets/objects/tableware/wineglass.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/trees/branch.py b/infinigen/assets/objects/trees/branch.py index f16c4d512..645861c50 100644 --- a/infinigen/assets/objects/trees/branch.py +++ b/infinigen/assets/objects/trees/branch.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/trees/generate.py b/infinigen/assets/objects/trees/generate.py index f0a0f95f6..32ca44f7a 100644 --- a/infinigen/assets/objects/trees/generate.py +++ b/infinigen/assets/objects/trees/generate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Yiming Zuo, Alejandro Newell, Lingjie Mei diff --git a/infinigen/assets/objects/trees/tree.py b/infinigen/assets/objects/trees/tree.py index 3ec735a29..35fa7ba30 100644 --- a/infinigen/assets/objects/trees/tree.py +++ b/infinigen/assets/objects/trees/tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell diff --git a/infinigen/assets/objects/trees/tree_flower.py b/infinigen/assets/objects/trees/tree_flower.py index 504a18fee..97ca26671 100644 --- a/infinigen/assets/objects/trees/tree_flower.py +++ b/infinigen/assets/objects/trees/tree_flower.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/assets/objects/trees/treeconfigs.py b/infinigen/assets/objects/trees/treeconfigs.py index 00129a860..2e4d34e93 100644 --- a/infinigen/assets/objects/trees/treeconfigs.py +++ b/infinigen/assets/objects/trees/treeconfigs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell diff --git a/infinigen/assets/objects/trees/utils/geometrynodes.py b/infinigen/assets/objects/trees/utils/geometrynodes.py index a3e8f714f..b4b04adf6 100644 --- a/infinigen/assets/objects/trees/utils/geometrynodes.py +++ b/infinigen/assets/objects/trees/utils/geometrynodes.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell diff --git a/infinigen/assets/objects/trees/utils/helper.py b/infinigen/assets/objects/trees/utils/helper.py index af4dd5915..cc65aedf6 100644 --- a/infinigen/assets/objects/trees/utils/helper.py +++ b/infinigen/assets/objects/trees/utils/helper.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell diff --git a/infinigen/assets/objects/trees/utils/materials.py b/infinigen/assets/objects/trees/utils/materials.py index 682a52e35..faed9453a 100644 --- a/infinigen/assets/objects/trees/utils/materials.py +++ b/infinigen/assets/objects/trees/utils/materials.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell, Lingjie Mei diff --git a/infinigen/assets/objects/trees/utils/mesh.py b/infinigen/assets/objects/trees/utils/mesh.py index d4115961f..21417993a 100644 --- a/infinigen/assets/objects/trees/utils/mesh.py +++ b/infinigen/assets/objects/trees/utils/mesh.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell diff --git a/infinigen/assets/objects/tropic_plants/coconut_tree.py b/infinigen/assets/objects/tropic_plants/coconut_tree.py index 22dfa36bd..c21b14f17 100644 --- a/infinigen/assets/objects/tropic_plants/coconut_tree.py +++ b/infinigen/assets/objects/tropic_plants/coconut_tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/tropic_plants/leaf_banana_tree.py b/infinigen/assets/objects/tropic_plants/leaf_banana_tree.py index 30f0f397c..d13001fd5 100644 --- a/infinigen/assets/objects/tropic_plants/leaf_banana_tree.py +++ b/infinigen/assets/objects/tropic_plants/leaf_banana_tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/tropic_plants/leaf_palm_plant.py b/infinigen/assets/objects/tropic_plants/leaf_palm_plant.py index 78cb49f17..64da62d7e 100644 --- a/infinigen/assets/objects/tropic_plants/leaf_palm_plant.py +++ b/infinigen/assets/objects/tropic_plants/leaf_palm_plant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/tropic_plants/leaf_palm_tree.py b/infinigen/assets/objects/tropic_plants/leaf_palm_tree.py index 294323d81..2e309ba58 100644 --- a/infinigen/assets/objects/tropic_plants/leaf_palm_tree.py +++ b/infinigen/assets/objects/tropic_plants/leaf_palm_tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/tropic_plants/palm_tree.py b/infinigen/assets/objects/tropic_plants/palm_tree.py index a2d717426..3abd5562b 100644 --- a/infinigen/assets/objects/tropic_plants/palm_tree.py +++ b/infinigen/assets/objects/tropic_plants/palm_tree.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/tropic_plants/tropic_plant_utils.py b/infinigen/assets/objects/tropic_plants/tropic_plant_utils.py index 50713010e..f79a31d8a 100644 --- a/infinigen/assets/objects/tropic_plants/tropic_plant_utils.py +++ b/infinigen/assets/objects/tropic_plants/tropic_plant_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/objects/underwater/seaweed.py b/infinigen/assets/objects/underwater/seaweed.py index 24de8f78f..c7539840d 100644 --- a/infinigen/assets/objects/underwater/seaweed.py +++ b/infinigen/assets/objects/underwater/seaweed.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this # source tree. diff --git a/infinigen/assets/objects/underwater/urchin.py b/infinigen/assets/objects/underwater/urchin.py index f03691e20..458245fd9 100644 --- a/infinigen/assets/objects/underwater/urchin.py +++ b/infinigen/assets/objects/underwater/urchin.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/wall_decorations/__init__.py b/infinigen/assets/objects/wall_decorations/__init__.py index e266a6e3c..18aa4c3b2 100644 --- a/infinigen/assets/objects/wall_decorations/__init__.py +++ b/infinigen/assets/objects/wall_decorations/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/wall_decorations/balloon.py b/infinigen/assets/objects/wall_decorations/balloon.py index ce8363e19..bf031b533 100644 --- a/infinigen/assets/objects/wall_decorations/balloon.py +++ b/infinigen/assets/objects/wall_decorations/balloon.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/wall_decorations/range_hood.py b/infinigen/assets/objects/wall_decorations/range_hood.py index 6a4111e84..e7198d543 100644 --- a/infinigen/assets/objects/wall_decorations/range_hood.py +++ b/infinigen/assets/objects/wall_decorations/range_hood.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/objects/wall_decorations/skirting_board.py b/infinigen/assets/objects/wall_decorations/skirting_board.py index 563197421..7b1f4f3b5 100644 --- a/infinigen/assets/objects/wall_decorations/skirting_board.py +++ b/infinigen/assets/objects/wall_decorations/skirting_board.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo, Lingjie Mei, Alexander Raistrick diff --git a/infinigen/assets/objects/wall_decorations/wall_art.py b/infinigen/assets/objects/wall_decorations/wall_art.py index c8210955c..c1601d069 100644 --- a/infinigen/assets/objects/wall_decorations/wall_art.py +++ b/infinigen/assets/objects/wall_decorations/wall_art.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/wall_decorations/wall_shelf.py b/infinigen/assets/objects/wall_decorations/wall_shelf.py index b5e4d7de6..17f5f1de7 100644 --- a/infinigen/assets/objects/wall_decorations/wall_shelf.py +++ b/infinigen/assets/objects/wall_decorations/wall_shelf.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/objects/windows/__init__.py b/infinigen/assets/objects/windows/__init__.py index 34b6cf7a4..853069004 100644 --- a/infinigen/assets/objects/windows/__init__.py +++ b/infinigen/assets/objects/windows/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/assets/objects/windows/window.py b/infinigen/assets/objects/windows/window.py index 5647c2967..b8ae662cd 100644 --- a/infinigen/assets/objects/windows/window.py +++ b/infinigen/assets/objects/windows/window.py @@ -1,10 +1,9 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: # - Hongyu Wen: primary author # - Alexander Raistrick: update window glass - import random import bpy @@ -13,7 +12,10 @@ from numpy.random import uniform from numpy.random import uniform as U -from infinigen.assets.materials import metal_shader_list, wood_shader_list +from infinigen.assets.material_assignments import AssetList +from infinigen.assets.materials import ( + glass_shader_list, +) from infinigen.assets.utils.autobevel import BevelSharp from infinigen.core import surface from infinigen.core.nodes import node_utils @@ -21,7 +23,6 @@ from infinigen.core.placement.factory import AssetFactory from infinigen.core.util import blender as butil from infinigen.core.util.blender import deep_clone_obj -from infinigen.core.util.color import color_category from infinigen.core.util.math import FixedSeed, clip_gaussian @@ -60,92 +61,73 @@ def shader_window_glass(nw: NodeWrangler): class WindowFactory(AssetFactory): - def __init__(self, factory_seed, coarse=False, curtain=None, shutter=None): + def __init__( + self, + factory_seed, + dimensions=None, + coarse=False, + open=None, + curtain=None, + shutter=None, + ): super(WindowFactory, self).__init__(factory_seed, coarse=coarse) with FixedSeed(factory_seed): - self.params = self.sample_parameters() + # Leave the parameters sampling to the create_asset function + # self.params = self.sample_parameters(dimensions, open, curtain, shutter) + + self.params = {} + self.material_params, self.scratch, self.edge_wear = ( + self.get_material_params() + ) self.beveler = BevelSharp() + self.open = open self.curtain = curtain self.shutter = shutter + self.params.update(self.material_params) @staticmethod - def sample_parameters(): - frame_width = U(0.05, 0.1) - sub_frame_width = U(0.01, frame_width) - sub_frame_h_amount = RI(1, 2) - sub_frame_v_amount = RI(1, 2) - glass_thickness = U(0.01, 0.03) - - shutter_panel_radius = U(0.001, 0.003) - shutter_width = U(0.03, 0.05) - shutter_thickness = U(0.003, 0.007) - shutter_rotation = U(0, 1) - shutter_inverval = shutter_width + U(0.001, 0.003) - - curtain_frame_depth = U(0.05, 0.1) - curtain_depth = U(0.03, curtain_frame_depth) - curtain_frame_radius = U(0.01, 0.02) - - shader_frame_material_choice = random.choice(wood_shader_list) - shader_curtain_frame_material_choice = random.choice(metal_shader_list) - shader_curtain_material_choice = shader_curtain_material - - params = { - "FrameWidth": frame_width, - "SubFrameWidth": sub_frame_width, - "SubPanelHAmount": sub_frame_h_amount, - "SubPanelVAmount": sub_frame_v_amount, - "GlassThickness": glass_thickness, - "CurtainFrameDepth": curtain_frame_depth, - "CurtainDepth": curtain_depth, - "CurtainFrameRadius": curtain_frame_radius, - "ShutterPanelRadius": shutter_panel_radius, - "ShutterWidth": shutter_width, - "ShutterThickness": shutter_thickness, - "ShutterRotation": shutter_rotation, - "ShutterInterval": shutter_inverval, - "FrameMaterial": surface.shaderfunc_to_material( - shader_frame_material_choice, vertical=True - ), - "CurtainFrameMaterial": surface.shaderfunc_to_material( - shader_curtain_frame_material_choice - ), - "CurtainMaterial": surface.shaderfunc_to_material( - shader_curtain_material_choice - ), - "Material": surface.shaderfunc_to_material(shader_window_glass), - } - return params - - def sample_asset_params( - self, dimensions=None, open=None, curtain=None, shutter=None - ): + def sample_parameters(dimensions, open, curtain, shutter): if dimensions is None: width = U(1, 4) height = U(1, 4) - frame_thickness = U(0.05, 0.15) + frame_thickness = U(0.05, 0.15) * min(width, height) else: width, height, frame_thickness = dimensions + frame_width = U(0.02, 0.05) * min(min(width, height), 2) + + panel_width = min(U(0.8, 1.5), width) + panel_height = min(U(panel_width, 3), height) + panel_v_amount = max(width // panel_width, 1) + panel_h_amount = max(height // panel_height, 1) - panel_h_amount = RI(1, 2) - v_ = width / height * panel_h_amount - panel_v_amount = int(uniform(v_ * 1.6, v_ * 2.5)) + glass_thickness = U(0.01, 0.03) + sub_frame_width = U(glass_thickness, frame_width) + sub_frame_thickness = U(glass_thickness, frame_thickness) + + sub_panel_width = U(0.4, min(panel_width, 1)) + sub_panel_height = U(0.4, min(panel_height, 1)) + sub_panel_height = max( + min(sub_panel_height, 2 * sub_panel_width), 0.5 * sub_panel_width + ) + sub_frame_v_amount = max(panel_width // sub_panel_width, 1) + sub_frame_h_amount = max(panel_height // sub_panel_height, 1) if open is None: open = U(0, 1) < 0.5 - if shutter is None: - shutter = U(0, 1) < 0.5 - + shutter = U(0, 1) < 0.2 if curtain is None: - curtain = U(0, 1) < 0.5 + curtain = U(0, 1) < 0.3 if curtain: open = False - sub_frame_thickness = U(0.01, frame_thickness) open = False # keep windows closed on generation, let articulation module handle this later on open_type = RI(0, 3) + if panel_v_amount % 2 == 1: + open_type = RI(1, 3) + open_h_angle = 0 + open_v_angle = 0 open_offset = 0 oe_offset = 0 if open_type == 0: @@ -160,41 +142,96 @@ def sample_asset_params( open_offset = U(0, width / panel_h_amount) else: open_offset = 0 - open_h_angle = U(0, 0.3) if open_type == 1 and open else 0 - open_v_angle = -U(0, 0.3) if open_type == 2 and open else 0 + if open_type == 1 and open: + open_h_angle = U(0.5, 1.2) + if open_type == 2 and open: + open_v_angle = -U(0.5, 1.2) + shutter_panel_radius = U(0.001, 0.003) + shutter_width = U(0.03, 0.05) + shutter_thickness = U(0.003, 0.007) + shutter_rotation = U(0, 1) + shutter_inverval = shutter_width + U(0.001, 0.003) + + curtain_frame_depth = U(0.05, 0.1) + curtain_depth = U(0.03, curtain_frame_depth) curtain_interval_number = int(width / U(0.08, 0.2)) + curtain_frame_radius = U(0.01, 0.02) curtain_mid_l = -U(0, width / 2) curtain_mid_r = U(0, width / 2) - return { - **self.params, + + params = { "Width": width, "Height": height, + "FrameWidth": frame_width, "FrameThickness": frame_thickness, "PanelHAmount": panel_h_amount, "PanelVAmount": panel_v_amount, + "SubFrameWidth": sub_frame_width, "SubFrameThickness": sub_frame_thickness, + "SubPanelHAmount": sub_frame_h_amount, + "SubPanelVAmount": sub_frame_v_amount, + "GlassThickness": glass_thickness, "OpenHAngle": open_h_angle, "OpenVAngle": open_v_angle, "OpenOffset": open_offset, "OEOffset": oe_offset, "Curtain": curtain, + "CurtainFrameDepth": curtain_frame_depth, + "CurtainDepth": curtain_depth, "CurtainIntervalNumber": curtain_interval_number, + "CurtainFrameRadius": curtain_frame_radius, "CurtainMidL": curtain_mid_l, "CurtainMidR": curtain_mid_r, "Shutter": shutter, + "ShutterPanelRadius": shutter_panel_radius, + "ShutterWidth": shutter_width, + "ShutterThickness": shutter_thickness, + "ShutterRotation": shutter_rotation, + "ShutterInterval": shutter_inverval, } + return params + + def get_material_params(self): + material_assignments = AssetList["WindowFactory"]() + params = { + "FrameMaterial": material_assignments["frame"].assign_material(), + "CurtainFrameMaterial": material_assignments[ + "curtain_frame" + ].assign_material(), + "CurtainMaterial": material_assignments["curtain"].assign_material(), + "Material": random.choice(glass_shader_list), + } + + wrapped_params = { + k: surface.shaderfunc_to_material(v) for k, v in params.items() + } + + scratch_prob, edge_wear_prob = material_assignments["wear_tear_prob"] + scratch, edge_wear = material_assignments["wear_tear"] + + is_scratch = np.random.uniform() < scratch_prob + is_edge_wear = np.random.uniform() < edge_wear_prob + if not is_scratch: + scratch = None + + if not is_edge_wear: + edge_wear = None + + return wrapped_params, scratch, edge_wear def create_asset(self, dimensions=None, open=None, realized=True, **params): - obj = butil.spawn_cube() + obj_params = self.sample_parameters( + dimensions, open, self.curtain, self.shutter + ) + self.params.update(obj_params) + obj = butil.spawn_cube() butil.modify_mesh( obj, "NODES", node_group=nodegroup_window_geometry(), - ng_inputs=self.sample_asset_params( - dimensions, open, self.curtain, self.shutter - ), + ng_inputs=self.params, apply=realized, ) @@ -520,6 +557,8 @@ def nodegroup_window_geometry(nw: NodeWrangler): combine_xyz_3 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"Y": multiply_10}) + reroute_1 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply_2}) + modulo_1 = nw.new_node( Nodes.Math, input_kwargs={0: floor, 1: 2.0000}, attrs={"operation": "MODULO"} ) @@ -530,7 +569,11 @@ def nodegroup_window_geometry(nw: NodeWrangler): attrs={"operation": "MULTIPLY"}, ) - add_4 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_2, 1: multiply_11}) + reroute_2 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply_11}) + + add_4 = nw.new_node(Nodes.Math, input_kwargs={0: reroute_1, 1: reroute_2}) + + reroute_3 = nw.new_node(Nodes.Reroute, input_kwargs={"Input": multiply_4}) modulo_2 = nw.new_node( Nodes.Math, @@ -544,7 +587,7 @@ def nodegroup_window_geometry(nw: NodeWrangler): attrs={"operation": "MULTIPLY"}, ) - add_5 = nw.new_node(Nodes.Math, input_kwargs={0: multiply_4, 1: multiply_12}) + add_5 = nw.new_node(Nodes.Math, input_kwargs={0: reroute_3, 1: multiply_12}) combine_xyz_2 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": add_4, "Y": add_5}) @@ -566,7 +609,7 @@ def nodegroup_window_geometry(nw: NodeWrangler): combine_xyz_5 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"X": multiply_13}) multiply_14 = nw.new_node( - Nodes.Math, input_kwargs={0: add_3, 1: -0.5000}, attrs={"operation": "MULTIPLY"} + Nodes.Math, input_kwargs={0: add_3, 1: -1.000}, attrs={"operation": "MULTIPLY"} ) combine_xyz_6 = nw.new_node(Nodes.CombineXYZ, input_kwargs={"Y": multiply_14}) @@ -1554,15 +1597,14 @@ def nodegroup_window_panel(nw: NodeWrangler): ) -def shader_curtain_material(nw: NodeWrangler): +def shader_glass_material(nw: NodeWrangler): # Code generated using version 2.6.5 of the node_transpiler principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, input_kwargs={ - "Base Color": color_category("textile"), - "Transmission": np.random.uniform(0, 1), - "Transmission Roughness": 1.0, + "Base Color": (0.0094, 0.0055, 0.8000, 1.0000), + "Roughness": 0.0000, }, ) @@ -1573,6 +1615,21 @@ def shader_curtain_material(nw: NodeWrangler): ) +def shader_curtain_material(nw: NodeWrangler): + # Code generated using version 2.6.5 of the node_transpiler + + principled_bsdf = nw.new_node( + Nodes.PrincipledBSDF, + input_kwargs={"Base Color": (0.8000, 0.0013, 0.3926, 1.0000)}, + ) + + material_output = nw.new_node( + Nodes.MaterialOutput, + input_kwargs={"Surface": principled_bsdf}, + attrs={"is_active_output": True}, + ) + + def shader_curtain_frame_material(nw: NodeWrangler): # Code generated using version 2.6.5 of the node_transpiler @@ -1603,15 +1660,66 @@ def shader_frame_material(nw: NodeWrangler): ) -def shader_glass_material(nw: NodeWrangler): +def shader_wood(nw: NodeWrangler): # Code generated using version 2.6.5 of the node_transpiler + texture_coordinate = nw.new_node(Nodes.TextureCoord) + + value = nw.new_node(Nodes.Value) + value.outputs[0].default_value = 1.0000 + + mapping = nw.new_node( + Nodes.Mapping, + input_kwargs={ + "Vector": texture_coordinate.outputs["Object"], + "Location": value, + "Rotation": (5.2370, 5.6072, 6.0194), + }, + ) + + mapping_1 = nw.new_node( + Nodes.Mapping, + input_kwargs={"Vector": mapping, "Scale": (2.9513, 8.5182, 3.9889)}, + ) + + musgrave_texture = nw.new_node( + Nodes.MusgraveTexture, + input_kwargs={"Vector": mapping_1, "W": 4.2017, "Scale": 2.3442}, + attrs={"musgrave_dimensions": "4D"}, + ) + + noise_texture = nw.new_node( + Nodes.NoiseTexture, + input_kwargs={"Vector": musgrave_texture, "W": 1.2453, "Scale": 2.6863}, + attrs={"noise_dimensions": "4D"}, + ) + + color_ramp = nw.new_node( + Nodes.ColorRamp, input_kwargs={"Fac": noise_texture.outputs["Fac"]} + ) + color_ramp.color_ramp.elements.new(0) + color_ramp.color_ramp.elements[0].position = 0.1384 + color_ramp.color_ramp.elements[0].color = [0.1472, 0.0000, 0.0000, 1.0000] + color_ramp.color_ramp.elements[1].position = 0.4108 + color_ramp.color_ramp.elements[1].color = [0.3093, 0.0934, 0.0000, 1.0000] + color_ramp.color_ramp.elements[2].position = 0.6232 + color_ramp.color_ramp.elements[2].color = [0.1108, 0.0256, 0.0335, 1.0000] + + color_ramp_1 = nw.new_node( + Nodes.ColorRamp, input_kwargs={"Fac": noise_texture.outputs["Fac"]} + ) + color_ramp_1.color_ramp.elements[0].position = 0.0000 + color_ramp_1.color_ramp.elements[0].color = [0.4855, 0.4855, 0.4855, 1.0000] + color_ramp_1.color_ramp.elements[1].position = 1.0000 + color_ramp_1.color_ramp.elements[1].color = [1.0000, 1.0000, 1.0000, 1.0000] + principled_bsdf = nw.new_node( Nodes.PrincipledBSDF, input_kwargs={ - "Base Color": (0.0094, 0.0055, 0.8000, 1.0000), - "Roughness": 0.0000, + "Base Color": color_ramp.outputs["Color"], + "Roughness": color_ramp_1.outputs["Color"], }, + attrs={"subsurface_method": "BURLEY"}, ) material_output = nw.new_node( diff --git a/infinigen/assets/placement/floating_objects.py b/infinigen/assets/placement/floating_objects.py new file mode 100644 index 000000000..aaf9df6c7 --- /dev/null +++ b/infinigen/assets/placement/floating_objects.py @@ -0,0 +1,171 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: David Yan + +import logging + +import bmesh +import bpy +import numpy as np +from mathutils.bvhtree import BVHTree + +from infinigen.core.placement.factory import AssetFactory +from infinigen.core.util import blender as butil +from infinigen.core.util.random import random_general as rg + +logger = logging.getLogger(__name__) + + +def create_bvh_tree_from_object(obj): + bm = bmesh.new() + bm.from_mesh(obj.data) + bm.transform(obj.matrix_world) + bvh = BVHTree.FromBMesh(bm) + bm.free() + return bvh + + +def check_bvh_intersection(bvh1, bvh2): + if isinstance(bvh2, list): + return any([check_bvh_intersection(bvh1, bvh) for bvh in bvh2]) + else: + return bvh1.overlap(bvh2) + + +def raycast_sample(min_dist, sensor_coords, pix_it, camera, bvhtree): + cam_location = camera.matrix_world.to_translation() + + for _ in range(1500): + x = pix_it[np.random.randint(0, pix_it.shape[0])][0] + y = pix_it[np.random.randint(0, pix_it.shape[0])][1] + + direction = (sensor_coords[y, x] - camera.matrix_world.translation).normalized() + + location, normal, index, distance = bvhtree.ray_cast(cam_location, direction) + + if location: + if distance <= min_dist: + continue + random_distance = np.random.uniform(min_dist, distance) + sampled_point = cam_location + direction.normalized() * random_distance + return sampled_point + + logger.info("Couldnt find far enough away pixel to raycast to") + return None + + +def bbox_sample(bbox): + raise NotImplementedError + + +class FloatingObjectPlacement: + def __init__( + self, + generators: list[AssetFactory], + camera: bpy.types.Object, + background_objs: bpy.types.Object | list[bpy.types.Object], + collision_objs: bpy.types.Object | list[bpy.types.Object], + bbox=None, + ): + self.generators = generators + self.camera = camera + + if not isinstance(background_objs, list): + background_objs = [background_objs] + self.background_objs = background_objs + + if not isinstance(collision_objs, list): + collision_objs = [collision_objs] + self.collision_objs = collision_objs + + self.bbox = bbox + + def place_objs( + self, + num_objs, + min_dist=1, + sample_retries=200, + raycast=True, + normalize=False, + collision_placed=False, + collision_existing=False, + ): + background_copied = butil.join_objects( + [butil.copy(obj) for obj in self.background_objs] + ) + room_bvh = create_bvh_tree_from_object(background_copied) + butil.delete(background_copied) + + if len(self.collision_objs) > 0: + objs_copied = butil.join_objects( + [butil.copy(obj) for obj in self.collision_objs] + ) + existing_obj_bvh = create_bvh_tree_from_object(objs_copied) + butil.delete(objs_copied) + else: + existing_obj_bvh = None + + placed_obj_bvhs = [] + + from infinigen.core.placement.camera import get_sensor_coords + + sensor_coords, pix_it = get_sensor_coords(self.camera, sparse=False) + num_place = rg(num_objs) + for i in range(num_place): + fac = np.random.choice(self.generators)(np.random.randint(1e7)) + asset = fac.spawn_asset(0) + fac.finalize_assets([asset]) + max_dim = max(asset.dimensions.x, asset.dimensions.y, asset.dimensions.z) + + if normalize: + if max_dim != 0: + normalize_scale = 0.5 / max( + asset.dimensions.x, asset.dimensions.y, asset.dimensions.z + ) + else: + normalize_scale = 1 + + asset.scale = (normalize_scale, normalize_scale, normalize_scale) + + for j in range(sample_retries): + if raycast: + point = raycast_sample( + min_dist, sensor_coords, pix_it, self.camera, room_bvh + ) + else: + point = bbox_sample() + + if point is None: + continue + + asset.rotation_mode = "XYZ" + asset.rotation_euler = np.random.uniform(-np.pi, np.pi, 3) + asset.location = point + + bpy.context.view_layer.update() # i can redo this later without view updates if necessary, but currently it doesn't incur significant overhead + bvh = create_bvh_tree_from_object(asset) + + if ( + check_bvh_intersection(bvh, room_bvh) + or ( + not collision_existing + and existing_obj_bvh is not None + and check_bvh_intersection(bvh, existing_obj_bvh) + ) + or ( + not collision_placed + and check_bvh_intersection(bvh, placed_obj_bvhs) + ) + ): + logger.debug(f"Sample {j} of asset {i} rejected, resampling...") + if i == sample_retries - 1: + butil.delete(asset) + else: + logger.info( + f"{self.__class__.__name__} placing object {i}/{num_place}, {asset.name=}" + ) + placed_obj_bvhs.append(bvh) + break diff --git a/infinigen/assets/scatters/chopped_trees.py b/infinigen/assets/scatters/chopped_trees.py index 54261a51f..dc25e6d67 100644 --- a/infinigen/assets/scatters/chopped_trees.py +++ b/infinigen/assets/scatters/chopped_trees.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick @@ -21,6 +21,7 @@ ) from infinigen.core.placement.instance_scatter import scatter_instances from infinigen.core.util import blender as butil +from infinigen.core.util import math as mutil from infinigen.core.util.math import randomspacing, rotate_match_directions logger = logging.getLogger(__name__) @@ -65,7 +66,7 @@ def chop_object(obj, n, cutter_size, max_tilt=15, thickness=0.03): def cutter(t): butil.select_none() - z = butil.lerp(bbox[:, -1].min(), bbox[:, -1].max(), t) + z = mutil.lerp(bbox[:, -1].min(), bbox[:, -1].max(), t) loc = (*bbox[:, :-1].mean(axis=0), z) bpy.ops.mesh.primitive_plane_add(size=cutter_size, location=loc) cut = bpy.context.active_object diff --git a/infinigen/assets/scatters/clothes.py b/infinigen/assets/scatters/clothes.py index cf4966756..1b0a5cf39 100644 --- a/infinigen/assets/scatters/clothes.py +++ b/infinigen/assets/scatters/clothes.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -9,6 +9,7 @@ import numpy as np from numpy.random import uniform +from infinigen.assets.objects.clothes import blanket, pants, shirt from infinigen.assets.objects.creatures.util.cloth_sim import bake_cloth from infinigen.assets.utils.decorate import read_co, subsurf from infinigen.core.placement.factory import make_asset_collection @@ -49,8 +50,6 @@ class ClothesCover: def __init__( self, bbox=(0.3, 0.7, 0.3, 0.7), factory_fn=None, width=None, size=None ): - from infinigen.assets.clothes import blanket, pants, shirt - probs = np.array([2, 1, 1]) if factory_fn is None: factory_fn = np.random.choice( diff --git a/infinigen/assets/scatters/coral_reef.py b/infinigen/assets/scatters/coral_reef.py index 99406c3cf..385249f6e 100644 --- a/infinigen/assets/scatters/coral_reef.py +++ b/infinigen/assets/scatters/coral_reef.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/decorative_plants.py b/infinigen/assets/scatters/decorative_plants.py index 3c3861d04..e4eaa1042 100644 --- a/infinigen/assets/scatters/decorative_plants.py +++ b/infinigen/assets/scatters/decorative_plants.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/scatters/fern.py b/infinigen/assets/scatters/fern.py index aafa8fd96..8955d3148 100644 --- a/infinigen/assets/scatters/fern.py +++ b/infinigen/assets/scatters/fern.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/scatters/flowerplant.py b/infinigen/assets/scatters/flowerplant.py index b2fa057f7..fb868e19b 100644 --- a/infinigen/assets/scatters/flowerplant.py +++ b/infinigen/assets/scatters/flowerplant.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Beining Han diff --git a/infinigen/assets/scatters/grass.py b/infinigen/assets/scatters/grass.py index 587aefb5b..9d455ff1d 100644 --- a/infinigen/assets/scatters/grass.py +++ b/infinigen/assets/scatters/grass.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alex Raistrick diff --git a/infinigen/assets/scatters/ground_leaves.py b/infinigen/assets/scatters/ground_leaves.py index cb3d8a90c..5f4a189d1 100644 --- a/infinigen/assets/scatters/ground_leaves.py +++ b/infinigen/assets/scatters/ground_leaves.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/scatters/ground_mushroom.py b/infinigen/assets/scatters/ground_mushroom.py index 959c11da3..a4f84615c 100644 --- a/infinigen/assets/scatters/ground_mushroom.py +++ b/infinigen/assets/scatters/ground_mushroom.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -39,3 +39,8 @@ def apply(self, obj, scale=0.3, density=1.0, selection=None): ) return scatter_obj + + +def apply(obj): + mushrooms = Mushrooms() + return mushrooms.apply(obj) diff --git a/infinigen/assets/scatters/ground_twigs.py b/infinigen/assets/scatters/ground_twigs.py index 97e2e0cd0..c8229c8fe 100644 --- a/infinigen/assets/scatters/ground_twigs.py +++ b/infinigen/assets/scatters/ground_twigs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick @@ -8,10 +8,10 @@ from numpy.random import uniform as U from infinigen.assets.objects.trees.generate import make_twig_collection, random_species +from infinigen.assets.utils.misc import toggle_hide, toggle_show from infinigen.core import surface from infinigen.core.placement.instance_scatter import scatter_instances -from ..utils.misc import toggle_hide, toggle_show from .chopped_trees import approx_settle_transform diff --git a/infinigen/assets/scatters/ivy.py b/infinigen/assets/scatters/ivy.py index 8230173c1..4f57cfc59 100644 --- a/infinigen/assets/scatters/ivy.py +++ b/infinigen/assets/scatters/ivy.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this # source tree. diff --git a/infinigen/assets/scatters/jellyfish.py b/infinigen/assets/scatters/jellyfish.py index 0e4d14210..d6925177a 100644 --- a/infinigen/assets/scatters/jellyfish.py +++ b/infinigen/assets/scatters/jellyfish.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/lichen.py b/infinigen/assets/scatters/lichen.py index 72d98c6a4..c525a7278 100644 --- a/infinigen/assets/scatters/lichen.py +++ b/infinigen/assets/scatters/lichen.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/mollusk.py b/infinigen/assets/scatters/mollusk.py index d56ad3134..4ea34096c 100644 --- a/infinigen/assets/scatters/mollusk.py +++ b/infinigen/assets/scatters/mollusk.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -32,7 +32,6 @@ def scaling(nw): ) scatter_obj = scatter_instances( - "mollusk", base_obj=obj, collection=mollusk, density=density, diff --git a/infinigen/assets/scatters/monocots.py b/infinigen/assets/scatters/monocots.py index 9496a26bd..2610977df 100644 --- a/infinigen/assets/scatters/monocots.py +++ b/infinigen/assets/scatters/monocots.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/moss.py b/infinigen/assets/scatters/moss.py index 75b6e086a..1c7eb28b6 100644 --- a/infinigen/assets/scatters/moss.py +++ b/infinigen/assets/scatters/moss.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -50,3 +50,8 @@ def instance_index(nw: NodeWrangler, n): ) return scatter_obj + + +def apply(obj): + moss_cover = MossCover() + return moss_cover.apply(obj) diff --git a/infinigen/assets/scatters/mushroom.py b/infinigen/assets/scatters/mushroom.py index 29edf0cfa..fb5583366 100644 --- a/infinigen/assets/scatters/mushroom.py +++ b/infinigen/assets/scatters/mushroom.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/pebbles.py b/infinigen/assets/scatters/pebbles.py index 3aefd2518..3fd47ddd0 100644 --- a/infinigen/assets/scatters/pebbles.py +++ b/infinigen/assets/scatters/pebbles.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/scatters/pine_needle.py b/infinigen/assets/scatters/pine_needle.py index 80efd578b..848a19c20 100644 --- a/infinigen/assets/scatters/pine_needle.py +++ b/infinigen/assets/scatters/pine_needle.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/pinecone.py b/infinigen/assets/scatters/pinecone.py index 9de858d5c..9fa19e9cc 100644 --- a/infinigen/assets/scatters/pinecone.py +++ b/infinigen/assets/scatters/pinecone.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/seashells.py b/infinigen/assets/scatters/seashells.py index d9945ccc0..2317700cf 100644 --- a/infinigen/assets/scatters/seashells.py +++ b/infinigen/assets/scatters/seashells.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/seaweed.py b/infinigen/assets/scatters/seaweed.py index ec8c2fade..9fb9c1335 100644 --- a/infinigen/assets/scatters/seaweed.py +++ b/infinigen/assets/scatters/seaweed.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/slime_mold.py b/infinigen/assets/scatters/slime_mold.py index c4342192a..9aa8aeeb2 100644 --- a/infinigen/assets/scatters/slime_mold.py +++ b/infinigen/assets/scatters/slime_mold.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -86,3 +86,7 @@ def weight(nw): assign_material(scatter_obj, shaderfunc_to_material(shader_mold, base_hue)) return scatter_obj + + +def apply(obj, selection=None): + SlimeMold().apply(obj, selection) diff --git a/infinigen/assets/scatters/snow_layer.py b/infinigen/assets/scatters/snow_layer.py index 64ad02d21..7915effdd 100644 --- a/infinigen/assets/scatters/snow_layer.py +++ b/infinigen/assets/scatters/snow_layer.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma @@ -12,6 +12,7 @@ class Snowlayer: def __init__(self): + bpy.ops.preferences.addon_enable(module="real_snow") pass def apply(self, obj, **kwargs): @@ -21,3 +22,9 @@ def apply(self, obj, **kwargs): snow = bpy.context.active_object tag_object(snow, "snow") tag_object(snow, "boulder") + + +def apply(obj): + snowlayer = Snowlayer() + snowlayer.apply(obj) + return snowlayer diff --git a/infinigen/assets/scatters/urchin.py b/infinigen/assets/scatters/urchin.py index 5e1a30a47..e7a43000c 100644 --- a/infinigen/assets/scatters/urchin.py +++ b/infinigen/assets/scatters/urchin.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/utils/cluster.py b/infinigen/assets/scatters/utils/cluster.py index 4ed8783ba..0eadd2053 100644 --- a/infinigen/assets/scatters/utils/cluster.py +++ b/infinigen/assets/scatters/utils/cluster.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/utils/selection.py b/infinigen/assets/scatters/utils/selection.py index 0da06a84a..dfd532193 100644 --- a/infinigen/assets/scatters/utils/selection.py +++ b/infinigen/assets/scatters/utils/selection.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/scatters/utils/wind.py b/infinigen/assets/scatters/utils/wind.py index 94fcfcada..1cc5c4bd8 100644 --- a/infinigen/assets/scatters/utils/wind.py +++ b/infinigen/assets/scatters/utils/wind.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Yiming Zuo diff --git a/infinigen/assets/utils/__init__.py b/infinigen/assets/utils/__init__.py index 65a46e14b..c80fae356 100644 --- a/infinigen/assets/utils/__init__.py +++ b/infinigen/assets/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/utils/autobevel.py b/infinigen/assets/utils/autobevel.py index 9e62b8e90..ca27f6767 100644 --- a/infinigen/assets/utils/autobevel.py +++ b/infinigen/assets/utils/autobevel.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/bbox_from_mesh.py b/infinigen/assets/utils/bbox_from_mesh.py index 8e762acd9..21d0edf8e 100644 --- a/infinigen/assets/utils/bbox_from_mesh.py +++ b/infinigen/assets/utils/bbox_from_mesh.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/decorate.py b/infinigen/assets/utils/decorate.py index 14fca777c..8582ea833 100644 --- a/infinigen/assets/utils/decorate.py +++ b/infinigen/assets/utils/decorate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/draw.py b/infinigen/assets/utils/draw.py index 5e95fc9a8..fbfdab1f9 100644 --- a/infinigen/assets/utils/draw.py +++ b/infinigen/assets/utils/draw.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/extract_nodegroup_parts.py b/infinigen/assets/utils/extract_nodegroup_parts.py index 8f07fcb5e..f0bf29e88 100644 --- a/infinigen/assets/utils/extract_nodegroup_parts.py +++ b/infinigen/assets/utils/extract_nodegroup_parts.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/geometry/curve.py b/infinigen/assets/utils/geometry/curve.py index 2b8f92bc1..607f499db 100644 --- a/infinigen/assets/utils/geometry/curve.py +++ b/infinigen/assets/utils/geometry/curve.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/geometry/lofting.py b/infinigen/assets/utils/geometry/lofting.py index 4b5e41561..2992204b3 100644 --- a/infinigen/assets/utils/geometry/lofting.py +++ b/infinigen/assets/utils/geometry/lofting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/geometry/metaballs.py b/infinigen/assets/utils/geometry/metaballs.py index 22aaeec2f..9b878d0e3 100644 --- a/infinigen/assets/utils/geometry/metaballs.py +++ b/infinigen/assets/utils/geometry/metaballs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/geometry/nurbs.py b/infinigen/assets/utils/geometry/nurbs.py index e9fba993f..66aec51b9 100644 --- a/infinigen/assets/utils/geometry/nurbs.py +++ b/infinigen/assets/utils/geometry/nurbs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/geometry/skin_ops.py b/infinigen/assets/utils/geometry/skin_ops.py index 6aba65159..b725b2eed 100644 --- a/infinigen/assets/utils/geometry/skin_ops.py +++ b/infinigen/assets/utils/geometry/skin_ops.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/laplacian.py b/infinigen/assets/utils/laplacian.py index 27f3c115c..44dd59873 100644 --- a/infinigen/assets/utils/laplacian.py +++ b/infinigen/assets/utils/laplacian.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/utils/mesh.py b/infinigen/assets/utils/mesh.py index 4a9559dd9..91c67190b 100644 --- a/infinigen/assets/utils/mesh.py +++ b/infinigen/assets/utils/mesh.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/misc.py b/infinigen/assets/utils/misc.py index 5ac931792..d486c2f7d 100644 --- a/infinigen/assets/utils/misc.py +++ b/infinigen/assets/utils/misc.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. import string diff --git a/infinigen/assets/utils/nodegroup.py b/infinigen/assets/utils/nodegroup.py index cb3fe13c8..fc76e0212 100644 --- a/infinigen/assets/utils/nodegroup.py +++ b/infinigen/assets/utils/nodegroup.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/nodegroups/attach.py b/infinigen/assets/utils/nodegroups/attach.py index 62e5d2152..e2869c365 100644 --- a/infinigen/assets/utils/nodegroups/attach.py +++ b/infinigen/assets/utils/nodegroups/attach.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/nodegroups/curve.py b/infinigen/assets/utils/nodegroups/curve.py index 84edba93f..d57a0f46c 100644 --- a/infinigen/assets/utils/nodegroups/curve.py +++ b/infinigen/assets/utils/nodegroups/curve.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/nodegroups/geometry.py b/infinigen/assets/utils/nodegroups/geometry.py index a14d1c522..01cb99576 100644 --- a/infinigen/assets/utils/nodegroups/geometry.py +++ b/infinigen/assets/utils/nodegroups/geometry.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/nodegroups/hair.py b/infinigen/assets/utils/nodegroups/hair.py index 8b9d0cb1b..149b778e0 100644 --- a/infinigen/assets/utils/nodegroups/hair.py +++ b/infinigen/assets/utils/nodegroups/hair.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/nodegroups/math.py b/infinigen/assets/utils/nodegroups/math.py index be0b92f7f..1f0e321d7 100644 --- a/infinigen/assets/utils/nodegroups/math.py +++ b/infinigen/assets/utils/nodegroups/math.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/nodegroups/sculpt_v1.py b/infinigen/assets/utils/nodegroups/sculpt_v1.py index 21d9c4ad0..3f0b359ff 100644 --- a/infinigen/assets/utils/nodegroups/sculpt_v1.py +++ b/infinigen/assets/utils/nodegroups/sculpt_v1.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/assets/utils/nodegroups/shader.py b/infinigen/assets/utils/nodegroups/shader.py index 2ecbda5c7..0f37f9b7a 100644 --- a/infinigen/assets/utils/nodegroups/shader.py +++ b/infinigen/assets/utils/nodegroups/shader.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Mingzhe Wang and Alexander Raistrick diff --git a/infinigen/assets/utils/object.py b/infinigen/assets/utils/object.py index 081d489fd..2359010b4 100644 --- a/infinigen/assets/utils/object.py +++ b/infinigen/assets/utils/object.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/assets/utils/physics.py b/infinigen/assets/utils/physics.py index d0f043f05..5f212c1a1 100644 --- a/infinigen/assets/utils/physics.py +++ b/infinigen/assets/utils/physics.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/utils/reaction_diffusion.py b/infinigen/assets/utils/reaction_diffusion.py index 5b65fc06c..e7e4db368 100644 --- a/infinigen/assets/utils/reaction_diffusion.py +++ b/infinigen/assets/utils/reaction_diffusion.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/utils/shapes.py b/infinigen/assets/utils/shapes.py index f39f7d433..461fb3189 100644 --- a/infinigen/assets/utils/shapes.py +++ b/infinigen/assets/utils/shapes.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/assets/utils/shortest_path.py b/infinigen/assets/utils/shortest_path.py index c6009e89c..a71b885b2 100644 --- a/infinigen/assets/utils/shortest_path.py +++ b/infinigen/assets/utils/shortest_path.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this # source tree. diff --git a/infinigen/assets/utils/uv.py b/infinigen/assets/utils/uv.py index ff9d518ee..8e3ca2c40 100644 --- a/infinigen/assets/utils/uv.py +++ b/infinigen/assets/utils/uv.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import logging diff --git a/infinigen/assets/weather/__init__.py b/infinigen/assets/weather/__init__.py index 97d26424c..b865e6f04 100644 --- a/infinigen/assets/weather/__init__.py +++ b/infinigen/assets/weather/__init__.py @@ -6,5 +6,6 @@ marine_snow_param_distribution, rain_param_distribution, snow_param_distribution, + spawn_emitter, ) from .wind_effectors import TurbulenceEffector, WindEffector diff --git a/infinigen/assets/weather/kole_clouds.py b/infinigen/assets/weather/kole_clouds.py index 283258956..557f31939 100644 --- a/infinigen/assets/weather/kole_clouds.py +++ b/infinigen/assets/weather/kole_clouds.py @@ -1,5 +1,7 @@ -# Derived from https://blenderartists.org/t/fluffy-mostly-procedural-clouds-for-cycles/1448689 -# Original node-graph created by ThomasKole https://blenderartists.org/u/ThomasKole and licensed CC-0 +# Copyright (C) 2023 + +# Portions of this file were autogenerated based on https://blenderartists.org/t/fluffy-mostly-procedural-clouds-for-cycles/1448689 +# Original node-graph created by ThomasKole https://blenderartists.org/u/ThomasKole and made available under a CC0 license import bpy import gin diff --git a/infinigen/assets/weather/particles.py b/infinigen/assets/weather/particles.py index 35c44f1f0..463bb3835 100644 --- a/infinigen/assets/weather/particles.py +++ b/infinigen/assets/weather/particles.py @@ -1,3 +1,12 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: +# - Hei Law: Initial rain / snow implementation +# - Alexander Raistrick: Refactor + import logging import typing @@ -12,6 +21,27 @@ logger = logging.getLogger(__name__) +def spawn_emitter(follow_cam, mesh_type, size, offset, name=None): + match mesh_type: + case "plane": + emitter = butil.spawn_plane(location=offset, size=size) + case "cube": + emitter = butil.spawn_cube(location=offset, size=size) + case _: + raise ValueError(f"Unknown mesh type {mesh_type}") + + butil.constrain_object(emitter, "COPY_LOCATION", use_offset=True, target=follow_cam) + + if name is None: + name = follow_cam.name + emitter.name = f"emitter({name=}, {mesh_type=})" + + emitter.hide_viewport = True + emitter.hide_render = True + + return emitter + + def rain_param_distribution(): drops_per_sec_m2 = uniform(0.05, 1) velocity = uniform(9, 20) diff --git a/infinigen/assets/weather/wind_effectors.py b/infinigen/assets/weather/wind_effectors.py index 5b5da035d..cc4f52485 100644 --- a/infinigen/assets/weather/wind_effectors.py +++ b/infinigen/assets/weather/wind_effectors.py @@ -1,3 +1,10 @@ +# Copyright (C) 2023, Princeton University. +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. + +# Authors: +# - Alexander Raistrick + + import bpy import gin import numpy as np diff --git a/infinigen/core/constraints/checks.py b/infinigen/core/constraints/checks.py index 2c86ef273..dd3d2fcb5 100644 --- a/infinigen/core/constraints/checks.py +++ b/infinigen/core/constraints/checks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/__init__.py b/infinigen/core/constraints/constraint_language/__init__.py index f45705bc0..e42563b7c 100644 --- a/infinigen/core/constraints/constraint_language/__init__.py +++ b/infinigen/core/constraints/constraint_language/__init__.py @@ -1,9 +1,3 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory -# of this source tree. - -# Authors: Alexander Raistrick, Karhan Kayan - from infinigen.core.tags import Negated, Semantics from .expression import ( diff --git a/infinigen/core/constraints/constraint_language/expression.py b/infinigen/core/constraints/constraint_language/expression.py index a585782e5..810ec67d4 100644 --- a/infinigen/core/constraints/constraint_language/expression.py +++ b/infinigen/core/constraints/constraint_language/expression.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/gather.py b/infinigen/core/constraints/constraint_language/gather.py index f70bad3e6..0efa74c70 100644 --- a/infinigen/core/constraints/constraint_language/gather.py +++ b/infinigen/core/constraints/constraint_language/gather.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/geometry.py b/infinigen/core/constraints/constraint_language/geometry.py index b34dd3c5e..5448d4982 100644 --- a/infinigen/core/constraints/constraint_language/geometry.py +++ b/infinigen/core/constraints/constraint_language/geometry.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/constraint_language/relations.py b/infinigen/core/constraints/constraint_language/relations.py index 399e43a24..8d5a5298f 100644 --- a/infinigen/core/constraints/constraint_language/relations.py +++ b/infinigen/core/constraints/constraint_language/relations.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/result.py b/infinigen/core/constraints/constraint_language/result.py index 136c39424..19a47382b 100644 --- a/infinigen/core/constraints/constraint_language/result.py +++ b/infinigen/core/constraints/constraint_language/result.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/set_reasoning.py b/infinigen/core/constraints/constraint_language/set_reasoning.py index 4febb1ee0..4045f6e5b 100644 --- a/infinigen/core/constraints/constraint_language/set_reasoning.py +++ b/infinigen/core/constraints/constraint_language/set_reasoning.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/types.py b/infinigen/core/constraints/constraint_language/types.py index 494e2d244..5dff9d83f 100644 --- a/infinigen/core/constraints/constraint_language/types.py +++ b/infinigen/core/constraints/constraint_language/types.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/constraint_language/util.py b/infinigen/core/constraints/constraint_language/util.py index 7720d4fbf..390893d9e 100644 --- a/infinigen/core/constraints/constraint_language/util.py +++ b/infinigen/core/constraints/constraint_language/util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import functools diff --git a/infinigen/core/constraints/evaluator/domain_contains.py b/infinigen/core/constraints/evaluator/domain_contains.py index 1162dbcff..2f271c2f7 100644 --- a/infinigen/core/constraints/evaluator/domain_contains.py +++ b/infinigen/core/constraints/evaluator/domain_contains.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/evaluator/eval_memo.py b/infinigen/core/constraints/evaluator/eval_memo.py index 06c7dba3e..dd638d626 100644 --- a/infinigen/core/constraints/evaluator/eval_memo.py +++ b/infinigen/core/constraints/evaluator/eval_memo.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/evaluator/evaluate.py b/infinigen/core/constraints/evaluator/evaluate.py index f2bc985c3..d63aade77 100644 --- a/infinigen/core/constraints/evaluator/evaluate.py +++ b/infinigen/core/constraints/evaluator/evaluate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/evaluator/indoor_util.py b/infinigen/core/constraints/evaluator/indoor_util.py index b043671ba..df5a2a701 100644 --- a/infinigen/core/constraints/evaluator/indoor_util.py +++ b/infinigen/core/constraints/evaluator/indoor_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/evaluator/node_impl/impl_bindings.py b/infinigen/core/constraints/evaluator/node_impl/impl_bindings.py index 1cdf4f3de..dce48d6bb 100644 --- a/infinigen/core/constraints/evaluator/node_impl/impl_bindings.py +++ b/infinigen/core/constraints/evaluator/node_impl/impl_bindings.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. diff --git a/infinigen/core/constraints/evaluator/node_impl/symmetry.py b/infinigen/core/constraints/evaluator/node_impl/symmetry.py index 4b8bf9c46..00d94f61e 100644 --- a/infinigen/core/constraints/evaluator/node_impl/symmetry.py +++ b/infinigen/core/constraints/evaluator/node_impl/symmetry.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/evaluator/node_impl/trimesh_geometry.py b/infinigen/core/constraints/evaluator/node_impl/trimesh_geometry.py index bc3e6d793..0d180b369 100644 --- a/infinigen/core/constraints/evaluator/node_impl/trimesh_geometry.py +++ b/infinigen/core/constraints/evaluator/node_impl/trimesh_geometry.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -595,7 +595,7 @@ def angle_alignment_cost_base( b_edges = [] for b_name, b_mesh in zip(b, b_meshes): b_poly = iu.project_to_xy_poly(b_mesh) - if b_poly is not None: + if (b_poly is not None) and (not b_poly.is_empty): if isinstance(b_poly, Polygon): for i, coord in enumerate(b_poly.exterior.coords[:-1]): start, end = coord, b_poly.exterior.coords[i + 1] diff --git a/infinigen/core/constraints/example_solver/annealing.py b/infinigen/core/constraints/example_solver/annealing.py index f93b254e1..f412d41f3 100644 --- a/infinigen/core/constraints/example_solver/annealing.py +++ b/infinigen/core/constraints/example_solver/annealing.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/geometry/dof.py b/infinigen/core/constraints/example_solver/geometry/dof.py index 193428662..211efe405 100644 --- a/infinigen/core/constraints/example_solver/geometry/dof.py +++ b/infinigen/core/constraints/example_solver/geometry/dof.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/example_solver/geometry/parse_scene.py b/infinigen/core/constraints/example_solver/geometry/parse_scene.py index bf1292dc1..6b371c7c4 100644 --- a/infinigen/core/constraints/example_solver/geometry/parse_scene.py +++ b/infinigen/core/constraints/example_solver/geometry/parse_scene.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/example_solver/geometry/planes.py b/infinigen/core/constraints/example_solver/geometry/planes.py index 28dd589f2..e01870e93 100644 --- a/infinigen/core/constraints/example_solver/geometry/planes.py +++ b/infinigen/core/constraints/example_solver/geometry/planes.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/example_solver/geometry/stability.py b/infinigen/core/constraints/example_solver/geometry/stability.py index cff9a574f..c42b28b1d 100644 --- a/infinigen/core/constraints/example_solver/geometry/stability.py +++ b/infinigen/core/constraints/example_solver/geometry/stability.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/example_solver/geometry/validity.py b/infinigen/core/constraints/example_solver/geometry/validity.py index 556c58fe5..a38f8697c 100644 --- a/infinigen/core/constraints/example_solver/geometry/validity.py +++ b/infinigen/core/constraints/example_solver/geometry/validity.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/core/constraints/example_solver/greedy/active_for_stage.py b/infinigen/core/constraints/example_solver/greedy/active_for_stage.py index 351584ef6..6be2c0e45 100644 --- a/infinigen/core/constraints/example_solver/greedy/active_for_stage.py +++ b/infinigen/core/constraints/example_solver/greedy/active_for_stage.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/greedy/all_substitutions.py b/infinigen/core/constraints/example_solver/greedy/all_substitutions.py index 4f7cdec3a..0d79c970f 100644 --- a/infinigen/core/constraints/example_solver/greedy/all_substitutions.py +++ b/infinigen/core/constraints/example_solver/greedy/all_substitutions.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/greedy/constraint_partition.py b/infinigen/core/constraints/example_solver/greedy/constraint_partition.py index 675d8e2db..4c500c403 100644 --- a/infinigen/core/constraints/example_solver/greedy/constraint_partition.py +++ b/infinigen/core/constraints/example_solver/greedy/constraint_partition.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/moves/addition.py b/infinigen/core/constraints/example_solver/moves/addition.py index b4fb2de27..9c5ee7db0 100644 --- a/infinigen/core/constraints/example_solver/moves/addition.py +++ b/infinigen/core/constraints/example_solver/moves/addition.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/moves/deletion.py b/infinigen/core/constraints/example_solver/moves/deletion.py index dd23aa93c..638a71fdd 100644 --- a/infinigen/core/constraints/example_solver/moves/deletion.py +++ b/infinigen/core/constraints/example_solver/moves/deletion.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/moves/moves.py b/infinigen/core/constraints/example_solver/moves/moves.py index d7473a745..94b32d0bb 100644 --- a/infinigen/core/constraints/example_solver/moves/moves.py +++ b/infinigen/core/constraints/example_solver/moves/moves.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/moves/pose.py b/infinigen/core/constraints/example_solver/moves/pose.py index 69d313bd4..9d53d9a3b 100644 --- a/infinigen/core/constraints/example_solver/moves/pose.py +++ b/infinigen/core/constraints/example_solver/moves/pose.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -11,8 +11,8 @@ from infinigen.core.constraints.constraint_language import util as iu from infinigen.core.constraints.example_solver.geometry import dof, validity +from infinigen.core.constraints.example_solver.state_def import State -from ..state_def import State from . import moves from .reassignment import pose_backup, restore_pose_backup diff --git a/infinigen/core/constraints/example_solver/moves/reassignment.py b/infinigen/core/constraints/example_solver/moves/reassignment.py index ac63df077..85ad847f7 100644 --- a/infinigen/core/constraints/example_solver/moves/reassignment.py +++ b/infinigen/core/constraints/example_solver/moves/reassignment.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -11,8 +11,8 @@ from infinigen.core.constraints.constraint_language.util import sync_trimesh from infinigen.core.constraints.example_solver.geometry import dof +from infinigen.core.constraints.example_solver.state_def import ObjectState, State -from ..state_def import ObjectState, State from . import moves diff --git a/infinigen/core/constraints/example_solver/moves/swap.py b/infinigen/core/constraints/example_solver/moves/swap.py index 57dfca8f0..a10672443 100644 --- a/infinigen/core/constraints/example_solver/moves/swap.py +++ b/infinigen/core/constraints/example_solver/moves/swap.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/populate.py b/infinigen/core/constraints/example_solver/populate.py index 9c0de0c44..2ee0bdc3c 100644 --- a/infinigen/core/constraints/example_solver/populate.py +++ b/infinigen/core/constraints/example_solver/populate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/core/constraints/example_solver/propose_continous.py b/infinigen/core/constraints/example_solver/propose_continous.py index 2b9c2a43b..37a650d36 100644 --- a/infinigen/core/constraints/example_solver/propose_continous.py +++ b/infinigen/core/constraints/example_solver/propose_continous.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/propose_discrete.py b/infinigen/core/constraints/example_solver/propose_discrete.py index 5ad52e311..a09cd0bc9 100644 --- a/infinigen/core/constraints/example_solver/propose_discrete.py +++ b/infinigen/core/constraints/example_solver/propose_discrete.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/propose_relations.py b/infinigen/core/constraints/example_solver/propose_relations.py index 877dcea8e..0826ad480 100644 --- a/infinigen/core/constraints/example_solver/propose_relations.py +++ b/infinigen/core/constraints/example_solver/propose_relations.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/__init__.py b/infinigen/core/constraints/example_solver/room/__init__.py index 7b456e393..6c2f9b8e4 100644 --- a/infinigen/core/constraints/example_solver/room/__init__.py +++ b/infinigen/core/constraints/example_solver/room/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/core/constraints/example_solver/room/blueprint.py b/infinigen/core/constraints/example_solver/room/blueprint.py index 0716a5512..25f512cab 100644 --- a/infinigen/core/constraints/example_solver/room/blueprint.py +++ b/infinigen/core/constraints/example_solver/room/blueprint.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/configs.py b/infinigen/core/constraints/example_solver/room/configs.py index c41d41d40..c212017f7 100644 --- a/infinigen/core/constraints/example_solver/room/configs.py +++ b/infinigen/core/constraints/example_solver/room/configs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei @@ -6,6 +6,7 @@ from infinigen.assets.materials import brick, plaster, rug, tile from infinigen.assets.materials.stone_and_concrete import concrete +from infinigen.assets.materials.tiles import advanced_tiles from infinigen.assets.materials.woods import tiled_wood from infinigen.core.constraints.example_solver.room.types import RoomType from infinigen.core.util.color import hsv2rgba @@ -177,17 +178,29 @@ def make_room_colors(): (5, plaster), ), RoomType.Balcony: ("weighted_choice", (1, brick), (5, plaster)), - RoomType.Bathroom: tile, + RoomType.Bathroom: ("weighted_choice", (1, tile), (3, advanced_tiles)), }, ) ROOM_FLOORS = defaultdict( - lambda: ("weighted_choice", (3, tiled_wood), (1, tile), (1, rug)), + lambda: ( + "weighted_choice", + (3, tiled_wood), + (1, tile), + (3, advanced_tiles), + (1, rug), + ), { RoomType.Garage: concrete, - RoomType.Utility: ("weighted_choice", (1, concrete), (1, plaster), (1, tile)), - RoomType.Bathroom: tile, - RoomType.Balcony: tile, + RoomType.Utility: ( + "weighted_choice", + (1, concrete), + (1, plaster), + (1, tile), + (3, advanced_tiles), + ), + RoomType.Bathroom: ("weighted_choice", (1, tile), (3, advanced_tiles)), + RoomType.Balcony: ("weighted_choice", (1, tile), (3, advanced_tiles)), }, ) diff --git a/infinigen/core/constraints/example_solver/room/constants.py b/infinigen/core/constraints/example_solver/room/constants.py index 4f9c2c549..314ddc7f6 100644 --- a/infinigen/core/constraints/example_solver/room/constants.py +++ b/infinigen/core/constraints/example_solver/room/constants.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/contour.py b/infinigen/core/constraints/example_solver/room/contour.py index 62018ca07..9ec3e9aa5 100644 --- a/infinigen/core/constraints/example_solver/room/contour.py +++ b/infinigen/core/constraints/example_solver/room/contour.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/core/constraints/example_solver/room/decorate.py b/infinigen/core/constraints/example_solver/room/decorate.py index 3c172de09..5b485d539 100644 --- a/infinigen/core/constraints/example_solver/room/decorate.py +++ b/infinigen/core/constraints/example_solver/room/decorate.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/graph.py b/infinigen/core/constraints/example_solver/room/graph.py index 9f6bd4640..49acc8869 100644 --- a/infinigen/core/constraints/example_solver/room/graph.py +++ b/infinigen/core/constraints/example_solver/room/graph.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/core/constraints/example_solver/room/scorer.py b/infinigen/core/constraints/example_solver/room/scorer.py index 8a826718b..4fff19000 100644 --- a/infinigen/core/constraints/example_solver/room/scorer.py +++ b/infinigen/core/constraints/example_solver/room/scorer.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/segment.py b/infinigen/core/constraints/example_solver/room/segment.py index 3705a4084..93e69e22d 100644 --- a/infinigen/core/constraints/example_solver/room/segment.py +++ b/infinigen/core/constraints/example_solver/room/segment.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/solidifier.py b/infinigen/core/constraints/example_solver/room/solidifier.py index 8144b527e..fe5010175 100644 --- a/infinigen/core/constraints/example_solver/room/solidifier.py +++ b/infinigen/core/constraints/example_solver/room/solidifier.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/solver.py b/infinigen/core/constraints/example_solver/room/solver.py index b25594431..d332b1c7d 100644 --- a/infinigen/core/constraints/example_solver/room/solver.py +++ b/infinigen/core/constraints/example_solver/room/solver.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/room/types.py b/infinigen/core/constraints/example_solver/room/types.py index 7373d4313..2e6cec629 100644 --- a/infinigen/core/constraints/example_solver/room/types.py +++ b/infinigen/core/constraints/example_solver/room/types.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/core/constraints/example_solver/room/utils.py b/infinigen/core/constraints/example_solver/room/utils.py index 10c900067..cd47cf9e6 100644 --- a/infinigen/core/constraints/example_solver/room/utils.py +++ b/infinigen/core/constraints/example_solver/room/utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/solve.py b/infinigen/core/constraints/example_solver/solve.py index 7f29131a7..658059fa7 100644 --- a/infinigen/core/constraints/example_solver/solve.py +++ b/infinigen/core/constraints/example_solver/solve.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/example_solver/state_def.py b/infinigen/core/constraints/example_solver/state_def.py index 042ef7c25..6faec30d3 100644 --- a/infinigen/core/constraints/example_solver/state_def.py +++ b/infinigen/core/constraints/example_solver/state_def.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/reasoning/constraint_bounding.py b/infinigen/core/constraints/reasoning/constraint_bounding.py index 4d8dfbdb2..20f904de9 100644 --- a/infinigen/core/constraints/reasoning/constraint_bounding.py +++ b/infinigen/core/constraints/reasoning/constraint_bounding.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/reasoning/constraint_constancy.py b/infinigen/core/constraints/reasoning/constraint_constancy.py index c6edda805..389032566 100644 --- a/infinigen/core/constraints/reasoning/constraint_constancy.py +++ b/infinigen/core/constraints/reasoning/constraint_constancy.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/reasoning/constraint_domain.py b/infinigen/core/constraints/reasoning/constraint_domain.py index 17e856869..42d429a0e 100644 --- a/infinigen/core/constraints/reasoning/constraint_domain.py +++ b/infinigen/core/constraints/reasoning/constraint_domain.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/reasoning/domain.py b/infinigen/core/constraints/reasoning/domain.py index e57740b9b..4d18e5337 100644 --- a/infinigen/core/constraints/reasoning/domain.py +++ b/infinigen/core/constraints/reasoning/domain.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/reasoning/domain_substitute.py b/infinigen/core/constraints/reasoning/domain_substitute.py index a76eea52e..db5143440 100644 --- a/infinigen/core/constraints/reasoning/domain_substitute.py +++ b/infinigen/core/constraints/reasoning/domain_substitute.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/constraints/reasoning/expr_equal.py b/infinigen/core/constraints/reasoning/expr_equal.py index b973ee7f7..7dcb5a873 100644 --- a/infinigen/core/constraints/reasoning/expr_equal.py +++ b/infinigen/core/constraints/reasoning/expr_equal.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -6,7 +6,7 @@ import dataclasses -from ..constraint_language.types import Node +from infinigen.core.constraints.constraint_language.types import Node @dataclasses.dataclass diff --git a/infinigen/core/constraints/usage_lookup.py b/infinigen/core/constraints/usage_lookup.py index 2f9eaad2e..add15beee 100644 --- a/infinigen/core/constraints/usage_lookup.py +++ b/infinigen/core/constraints/usage_lookup.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/execute_tasks.py b/infinigen/core/execute_tasks.py index e6a6214b8..183a7d975 100644 --- a/infinigen/core/execute_tasks.py +++ b/infinigen/core/execute_tasks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import logging diff --git a/infinigen/core/generator.py b/infinigen/core/generator.py index cc2e3d32c..272d2490f 100644 --- a/infinigen/core/generator.py +++ b/infinigen/core/generator.py @@ -1,3 +1,11 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: +# - Alexander Raistrick + import typing diff --git a/infinigen/core/init.py b/infinigen/core/init.py index a3e4d77a8..2d4000f0f 100644 --- a/infinigen/core/init.py +++ b/infinigen/core/init.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/nodes/compatibility.py b/infinigen/core/nodes/compatibility.py index 95107ebd2..f0df2edb6 100644 --- a/infinigen/core/nodes/compatibility.py +++ b/infinigen/core/nodes/compatibility.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/nodes/node_info.py b/infinigen/core/nodes/node_info.py index 907f42edb..db409f1e9 100644 --- a/infinigen/core/nodes/node_info.py +++ b/infinigen/core/nodes/node_info.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/nodes/node_transpiler/__init__.py b/infinigen/core/nodes/node_transpiler/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/infinigen/core/nodes/node_transpiler/transpiler.py b/infinigen/core/nodes/node_transpiler/transpiler.py index d0152299a..80b23f9e7 100644 --- a/infinigen/core/nodes/node_transpiler/transpiler.py +++ b/infinigen/core/nodes/node_transpiler/transpiler.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -16,7 +16,7 @@ import mathutils import numpy as np -from ..node_info import OUTPUT_NODE_IDS, SINGLETON_NODES, Nodes +from infinigen.core.nodes.node_info import OUTPUT_NODE_IDS, SINGLETON_NODES, Nodes logger = logging.getLogger(__name__) diff --git a/infinigen/core/nodes/node_transpiler/transpiler_dev_script.py b/infinigen/core/nodes/node_transpiler/transpiler_dev_script.py index c67b9a0fe..ec9eddd1a 100644 --- a/infinigen/core/nodes/node_transpiler/transpiler_dev_script.py +++ b/infinigen/core/nodes/node_transpiler/transpiler_dev_script.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/core/nodes/node_utils.py b/infinigen/core/nodes/node_utils.py index 19d25b080..2668300ad 100644 --- a/infinigen/core/nodes/node_utils.py +++ b/infinigen/core/nodes/node_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/core/nodes/node_wrangler.py b/infinigen/core/nodes/node_wrangler.py index 37353c184..55eaefd4d 100644 --- a/infinigen/core/nodes/node_wrangler.py +++ b/infinigen/core/nodes/node_wrangler.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. # Authors: @@ -197,16 +197,7 @@ def new_node( if attrs is not None: for key, val in attrs.items(): - # if key not in NODE_ATTRS_AVAILABLE.get(node.bl_idname, []): - # logger.warn(f'Node Wrangler is setting attr {repr(key)} on {node.bl_idname=}, - # but it is not in node_info.NODE_ATTRS_AVAILABLE. Please add it so that the transpiler is - # aware') - try: - setattr(node, key, val) - except AttributeError: - exec( - f"node.{key} = {repr(val)}" - ) # I don't know of a way around this + setattr(node, key, val) if node_type in [ Nodes.VoronoiTexture, diff --git a/infinigen/core/nodes/nodegroups/transfer_attributes.py b/infinigen/core/nodes/nodegroups/transfer_attributes.py index 923825052..57244d6e5 100644 --- a/infinigen/core/nodes/nodegroups/transfer_attributes.py +++ b/infinigen/core/nodes/nodegroups/transfer_attributes.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/core/nodes/shader_utils.py b/infinigen/core/nodes/shader_utils.py index d3b9eb1e0..8c804ea2f 100644 --- a/infinigen/core/nodes/shader_utils.py +++ b/infinigen/core/nodes/shader_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan diff --git a/infinigen/core/placement/animation_policy.py b/infinigen/core/placement/animation_policy.py index d325c28e5..d9257a9c4 100644 --- a/infinigen/core/placement/animation_policy.py +++ b/infinigen/core/placement/animation_policy.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -19,7 +19,6 @@ from numpy.random import uniform as U from tqdm import tqdm -import infinigen.assets.utils.mesh from infinigen.assets.utils.geometry.curve import Curve from infinigen.core.placement.path_finding import path_finding from infinigen.core.util import blender as butil @@ -603,7 +602,7 @@ def animate_trajectory( obj.rotation_euler.z = U(0, 2 * np.pi) if hasattr(policy_func, "reset"): - infinigen.assets.utils.mesh.reset_preset() + policy_func.reset() keyframe(obj, obj.location, obj.rotation_euler, 0, interp="LINEAR") try_animate_trajectory_func = ( diff --git a/infinigen/core/placement/camera.py b/infinigen/core/placement/camera.py index 36324f794..23157efbe 100644 --- a/infinigen/core/placement/camera.py +++ b/infinigen/core/placement/camera.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/core/placement/density.py b/infinigen/core/placement/density.py index a389a6030..322e5945b 100644 --- a/infinigen/core/placement/density.py +++ b/infinigen/core/placement/density.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/core/placement/detail.py b/infinigen/core/placement/detail.py index 8c5635847..51715c520 100644 --- a/infinigen/core/placement/detail.py +++ b/infinigen/core/placement/detail.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/core/placement/factory.py b/infinigen/core/placement/factory.py index 3432d4319..1aeaa64ed 100644 --- a/infinigen/core/placement/factory.py +++ b/infinigen/core/placement/factory.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -14,10 +14,10 @@ import numpy as np from tqdm import trange +from infinigen.assets.utils.object import center from infinigen.core.util import blender as butil from infinigen.core.util.math import FixedSeed, int_hash -from ...assets.utils.object import center from . import detail logger = logging.getLogger(__name__) diff --git a/infinigen/core/placement/instance_scatter.py b/infinigen/core/placement/instance_scatter.py index 5c81dbd01..64b0eb321 100644 --- a/infinigen/core/placement/instance_scatter.py +++ b/infinigen/core/placement/instance_scatter.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Lahav Lipson @@ -332,7 +332,10 @@ def scatter_instances( name = "scatter:" + collection.name.split(":")[-1] - avg_scale = scale * (1 - scale_rand / 2) * (1 - scale_rand_axi / 2) + if scale is not None: + avg_scale = scale * (1 - scale_rand / 2) * (1 - scale_rand_axi / 2) + else: + avg_scale = 1 if vol_density is not None: assert ( diff --git a/infinigen/core/placement/particles.py b/infinigen/core/placement/particles.py index 8ddd1baa1..2b82609e9 100644 --- a/infinigen/core/placement/particles.py +++ b/infinigen/core/placement/particles.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/core/placement/path_finding.py b/infinigen/core/placement/path_finding.py index afea41344..acf07500c 100644 --- a/infinigen/core/placement/path_finding.py +++ b/infinigen/core/placement/path_finding.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/core/placement/placement.py b/infinigen/core/placement/placement.py index 83232e9dd..ed6718ba7 100644 --- a/infinigen/core/placement/placement.py +++ b/infinigen/core/placement/placement.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/core/placement/split_in_view.py b/infinigen/core/placement/split_in_view.py index ea4a1c09a..aaae50615 100644 --- a/infinigen/core/placement/split_in_view.py +++ b/infinigen/core/placement/split_in_view.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/core/rendering/auto_exposure.py b/infinigen/core/rendering/auto_exposure.py deleted file mode 100644 index 45317d0d3..000000000 --- a/infinigen/core/rendering/auto_exposure.py +++ /dev/null @@ -1,66 +0,0 @@ -# Derived from https://www.blendswap.com/blend/30728 -# Original node-graph created by PedroPLopes https://www.blendswap.com/profile/1609866 and licensed CC-0 - - -from infinigen.core.nodes import node_utils -from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler - - -@node_utils.to_nodegroup( - "nodegroup_auto_exposure", singleton=False, type="CompositorNodeTree" -) -def nodegroup_auto_exposure(nw: NodeWrangler): - # Code generated using version 2.6.4 of the node_transpiler - - group_input = nw.new_node( - Nodes.GroupInput, - expose_input=[ - ("NodeSocketColor", "Image", (1.0000, 1.0000, 1.0000, 1.0000)), - ("NodeSocketFloat", "EV Compensation", 0.0000), - ("NodeSocketFloat", "Metering Area", 1.0000), - ], - ) - - divide = nw.new_node( - "CompositorNodeMath", - input_kwargs={0: 1.0000, 1: group_input.outputs["Metering Area"]}, - attrs={"operation": "DIVIDE"}, - ) - - scale = nw.new_node( - "CompositorNodeScale", - input_kwargs={"Image": group_input.outputs["Image"], "X": divide, "Y": divide}, - ) - - multiply = nw.new_node( - "CompositorNodeMath", - input_kwargs={0: group_input.outputs["EV Compensation"], 1: -1.0000}, - attrs={"operation": "MULTIPLY"}, - ) - - exposure = nw.new_node( - Nodes.Exposure, input_kwargs={"Image": scale, "Exposure": multiply} - ) - - levels = nw.new_node( - "CompositorNodeLevels", - input_kwargs={"Image": exposure}, - attrs={"channel": "LUMINANCE"}, - ) - - multiply_1 = nw.new_node( - "CompositorNodeMath", - input_kwargs={0: levels.outputs["Mean"], 1: 2.0000}, - attrs={"operation": "MULTIPLY"}, - ) - - rgb_curves = nw.new_node( - "CompositorNodeCurveRGB", - input_kwargs={"Image": group_input.outputs["Image"], "White Level": multiply_1}, - ) - - nw.new_node( - Nodes.GroupOutput, - input_kwargs={"Image": rgb_curves}, - attrs={"is_active_output": True}, - ) diff --git a/infinigen/core/rendering/post_render.py b/infinigen/core/rendering/post_render.py index 1ad7bd5e8..d0b0b79ae 100644 --- a/infinigen/core/rendering/post_render.py +++ b/infinigen/core/rendering/post_render.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/core/rendering/render.py b/infinigen/core/rendering/render.py index 9e5fdec6f..2adce25a6 100644 --- a/infinigen/core/rendering/render.py +++ b/infinigen/core/rendering/render.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -37,8 +37,6 @@ from infinigen.tools.datarelease_toolkit import reorganize_old_framesfolder from infinigen.tools.suffixes import get_suffix -from .auto_exposure import nodegroup_auto_exposure - TRANSPARENT_SHADERS = {Nodes.TranslucentBSDF, Nodes.TransparentBSDF} logger = logging.getLogger(__name__) @@ -110,18 +108,10 @@ def compositor_postprocessing( nw, source, show=True, - autoexpose=False, - autoexpose_level=-2, color_correct=True, distort=0, glare=False, ): - if autoexpose: - source = nw.new_node( - nodegroup_auto_exposure().name, - input_kwargs={"Image": source, "EV Comp": autoexpose_level}, - ) - if distort > 0: source = nw.new_node( Nodes.LensDistortion, input_kwargs={"Image": source, "Dispersion": distort} diff --git a/infinigen/core/rendering/resample.py b/infinigen/core/rendering/resample.py index 3e6cfa700..7ee85eaef 100644 --- a/infinigen/core/rendering/resample.py +++ b/infinigen/core/rendering/resample.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/core/surface.py b/infinigen/core/surface.py index 275ceb3d7..49c244667 100644 --- a/infinigen/core/surface.py +++ b/infinigen/core/surface.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/tagging.py b/infinigen/core/tagging.py index f60ba2c4b..82347894b 100644 --- a/infinigen/core/tagging.py +++ b/infinigen/core/tagging.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/tags.py b/infinigen/core/tags.py index 30baef77f..20ad4a4cc 100644 --- a/infinigen/core/tags.py +++ b/infinigen/core/tags.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/util/bevelling.py b/infinigen/core/util/bevelling.py index 9e56d244e..c06eda3de 100644 --- a/infinigen/core/util/bevelling.py +++ b/infinigen/core/util/bevelling.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/core/util/blender.py b/infinigen/core/util/blender.py index e1e05f0e9..3ac9e917a 100644 --- a/infinigen/core/util/blender.py +++ b/infinigen/core/util/blender.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alex Raistrick, Zeyu Ma, Lahav Lipson, Hei Law, Lingjie Mei, Karhan Kayan diff --git a/infinigen/core/util/camera.py b/infinigen/core/util/camera.py index 687d846e9..beb04dd74 100644 --- a/infinigen/core/util/camera.py +++ b/infinigen/core/util/camera.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson, Lingjie Mei diff --git a/infinigen/core/util/color.py b/infinigen/core/util/color.py index 446a4e78f..12e3db68c 100644 --- a/infinigen/core/util/color.py +++ b/infinigen/core/util/color.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/core/util/exporting.py b/infinigen/core/util/exporting.py index 8f661966b..437e36203 100644 --- a/infinigen/core/util/exporting.py +++ b/infinigen/core/util/exporting.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/core/util/logging.py b/infinigen/core/util/logging.py index c871d6ffb..a0deaae66 100644 --- a/infinigen/core/util/logging.py +++ b/infinigen/core/util/logging.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/core/util/math.py b/infinigen/core/util/math.py index 8e62d6161..3d2d458eb 100644 --- a/infinigen/core/util/math.py +++ b/infinigen/core/util/math.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Zeyu Ma, Lingjie Mei, Jia Deng diff --git a/infinigen/core/util/organization.py b/infinigen/core/util/organization.py index c9887eed3..954976837 100644 --- a/infinigen/core/util/organization.py +++ b/infinigen/core/util/organization.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/core/util/pipeline.py b/infinigen/core/util/pipeline.py index 0304b1af4..5aba3e4ac 100644 --- a/infinigen/core/util/pipeline.py +++ b/infinigen/core/util/pipeline.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/core/util/random.py b/infinigen/core/util/random.py index 6e5aa9607..dd49921aa 100644 --- a/infinigen/core/util/random.py +++ b/infinigen/core/util/random.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma, Alexander Raistrick diff --git a/infinigen_examples/util/test_utils.py b/infinigen/core/util/test_utils.py similarity index 89% rename from infinigen_examples/util/test_utils.py rename to infinigen/core/util/test_utils.py index 2bd11f589..dc0d9b221 100644 --- a/infinigen_examples/util/test_utils.py +++ b/infinigen/core/util/test_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -48,9 +48,15 @@ def load_txt_list(path: Path, skip_sharp=True): raise FileNotFoundError(f"{path=} resolved to {pathabs=} which does not exist") res = pathabs.read_text().splitlines() + res = [ - f.lstrip("#").lstrip(" ") + f.strip() for f in res if (not f.startswith("#") or not skip_sharp) and len(f) > 0 ] + + res = [f[: f.index("#")] if "#" in f else f for f in res] + + res = [r for r in res if len(r.strip()) > 0] + return res diff --git a/infinigen/datagen/configs/gt_options/opengl_gt_noshortrender.gin b/infinigen/datagen/configs/gt_options/opengl_gt_noshortrender.gin index fbaf1a66b..b185d55a2 100644 --- a/infinigen/datagen/configs/gt_options/opengl_gt_noshortrender.gin +++ b/infinigen/datagen/configs/gt_options/opengl_gt_noshortrender.gin @@ -1,7 +1,7 @@ -include 'infinigen/datagen/gt_options/opengl_gt.gin' # incase someone adds other settings to it +include 'infinigen/datagen/configs/gt_options/opengl_gt.gin' # incase someone adds other settings to it iterate_scene_tasks.camera_dependent_tasks = [ {'name': 'renderbackup', 'func': @renderbackup/queue_render}, # still call it "backup" since it is reusing the compute_platform's backup config. we are just skipping straight to the backup {'name': 'savemesh', 'func': @queue_mesh_save}, {'name': 'opengl', 'func': @queue_opengl} -] \ No newline at end of file +] diff --git a/infinigen/datagen/customgt/blender_object.cpp b/infinigen/datagen/customgt/blender_object.cpp index 8d47c9f7e..12e9dbfd0 100644 --- a/infinigen/datagen/customgt/blender_object.cpp +++ b/infinigen/datagen/customgt/blender_object.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/blender_object.hpp b/infinigen/datagen/customgt/blender_object.hpp index 925c3dd98..8b1431cfd 100644 --- a/infinigen/datagen/customgt/blender_object.hpp +++ b/infinigen/datagen/customgt/blender_object.hpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/buffer_arrays.cpp b/infinigen/datagen/customgt/buffer_arrays.cpp index d15f087b0..093371e31 100644 --- a/infinigen/datagen/customgt/buffer_arrays.cpp +++ b/infinigen/datagen/customgt/buffer_arrays.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/camera_view.cpp b/infinigen/datagen/customgt/camera_view.cpp index 6a050ae44..3ef7eb77c 100644 --- a/infinigen/datagen/customgt/camera_view.cpp +++ b/infinigen/datagen/customgt/camera_view.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/camera_view.hpp b/infinigen/datagen/customgt/camera_view.hpp index 801ab1a27..5472ed4cf 100644 --- a/infinigen/datagen/customgt/camera_view.hpp +++ b/infinigen/datagen/customgt/camera_view.hpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/io.cpp b/infinigen/datagen/customgt/io.cpp index 0d4550297..68650e607 100644 --- a/infinigen/datagen/customgt/io.cpp +++ b/infinigen/datagen/customgt/io.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/io.hpp b/infinigen/datagen/customgt/io.hpp index 4a639dbbf..2fa330557 100644 --- a/infinigen/datagen/customgt/io.hpp +++ b/infinigen/datagen/customgt/io.hpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/load_blender_mesh.cpp b/infinigen/datagen/customgt/load_blender_mesh.cpp index 457296437..ca11bd7a6 100644 --- a/infinigen/datagen/customgt/load_blender_mesh.cpp +++ b/infinigen/datagen/customgt/load_blender_mesh.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/load_blender_mesh.hpp b/infinigen/datagen/customgt/load_blender_mesh.hpp index 7d5d80a14..7ad94fcc3 100644 --- a/infinigen/datagen/customgt/load_blender_mesh.hpp +++ b/infinigen/datagen/customgt/load_blender_mesh.hpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/main.cpp b/infinigen/datagen/customgt/main.cpp index 7079cfb84..4e728e3dd 100644 --- a/infinigen/datagen/customgt/main.cpp +++ b/infinigen/datagen/customgt/main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/show.py b/infinigen/datagen/customgt/show.py index 3e1964dff..0053c97c7 100644 --- a/infinigen/datagen/customgt/show.py +++ b/infinigen/datagen/customgt/show.py @@ -1,4 +1,4 @@ -## Copyright (c) Princeton University. +## Copyright (C) 2023, Princeton University. ## This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. ## Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/string_tools.cpp b/infinigen/datagen/customgt/string_tools.cpp index 95a591341..8cca609c9 100644 --- a/infinigen/datagen/customgt/string_tools.cpp +++ b/infinigen/datagen/customgt/string_tools.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/string_tools.hpp b/infinigen/datagen/customgt/string_tools.hpp index 9a92bb6b1..4eccdd361 100644 --- a/infinigen/datagen/customgt/string_tools.hpp +++ b/infinigen/datagen/customgt/string_tools.hpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/utils.cpp b/infinigen/datagen/customgt/utils.cpp index 1db261839..1206a7141 100644 --- a/infinigen/datagen/customgt/utils.cpp +++ b/infinigen/datagen/customgt/utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/customgt/utils.hpp b/infinigen/datagen/customgt/utils.hpp index 38b6f3c7f..aace92bff 100644 --- a/infinigen/datagen/customgt/utils.hpp +++ b/infinigen/datagen/customgt/utils.hpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Lahav Lipson diff --git a/infinigen/datagen/job_funcs.py b/infinigen/datagen/job_funcs.py index 32846529e..a14c8ac76 100644 --- a/infinigen/datagen/job_funcs.py +++ b/infinigen/datagen/job_funcs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: @@ -425,13 +425,29 @@ def queue_mesh_save( output_folder.mkdir(parents=True, exist_ok=True) + input_folder_priority_options = [ + f"fine{input_suffix}", + "fine", + f"coarse{input_suffix}", + "coarse", + ] + + for option in input_folder_priority_options: + input_folder = f"{folder}/{option}" + if (Path(input_folder) / "scene.blend").exists(): + break + else: + raise ValueError( + f"No scene.blend found in {input_folder} for any of {input_folder_priority_options}" + ) + cmd = ( get_cmd( seed, "mesh_save", configs, taskname, - input_folder=f"{folder}/coarse{input_suffix}", + input_folder=input_folder, output_folder=f"{folder}/savemesh{output_suffix}", ) + f""" diff --git a/infinigen/datagen/manage_jobs.py b/infinigen/datagen/manage_jobs.py index 0890fd925..f159e9ffe 100644 --- a/infinigen/datagen/manage_jobs.py +++ b/infinigen/datagen/manage_jobs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/datagen/monitor_tasks.py b/infinigen/datagen/monitor_tasks.py index c74148d00..75cf82b93 100644 --- a/infinigen/datagen/monitor_tasks.py +++ b/infinigen/datagen/monitor_tasks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/datagen/states.py b/infinigen/datagen/states.py index e7cdf8ea3..45960297b 100644 --- a/infinigen/datagen/states.py +++ b/infinigen/datagen/states.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/datagen/util/cancel_jobs.py b/infinigen/datagen/util/cancel_jobs.py index 1999d774e..fb2df1e49 100644 --- a/infinigen/datagen/util/cancel_jobs.py +++ b/infinigen/datagen/util/cancel_jobs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/datagen/util/cleanup.py b/infinigen/datagen/util/cleanup.py index 2d4a82aa1..195135dcc 100644 --- a/infinigen/datagen/util/cleanup.py +++ b/infinigen/datagen/util/cleanup.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/datagen/util/google_drive_client.py b/infinigen/datagen/util/google_drive_client.py index e45197150..31d64c15a 100644 --- a/infinigen/datagen/util/google_drive_client.py +++ b/infinigen/datagen/util/google_drive_client.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/datagen/util/show_gpu_table.py b/infinigen/datagen/util/show_gpu_table.py index 0cf43d8f9..e8aaf0a51 100644 --- a/infinigen/datagen/util/show_gpu_table.py +++ b/infinigen/datagen/util/show_gpu_table.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/datagen/util/smb_client.py b/infinigen/datagen/util/smb_client.py index acd051430..6c6781a61 100644 --- a/infinigen/datagen/util/smb_client.py +++ b/infinigen/datagen/util/smb_client.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/datagen/util/submitit_emulator.py b/infinigen/datagen/util/submitit_emulator.py index 309f5c425..b79c1f4b4 100644 --- a/infinigen/datagen/util/submitit_emulator.py +++ b/infinigen/datagen/util/submitit_emulator.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/datagen/util/upload_util.py b/infinigen/datagen/util/upload_util.py index b6040faa9..2bce4d02f 100644 --- a/infinigen/datagen/util/upload_util.py +++ b/infinigen/datagen/util/upload_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/launch_blender.py b/infinigen/launch_blender.py index 56fd83305..b283b0e8d 100644 --- a/infinigen/launch_blender.py +++ b/infinigen/launch_blender.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/terrain/__init__.py b/infinigen/terrain/__init__.py index 5afd8b41c..dc4e55f56 100644 --- a/infinigen/terrain/__init__.py +++ b/infinigen/terrain/__init__.py @@ -1,7 +1 @@ -# Copyright (c) Princeton University. -# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. - -# Authors: Zeyu Ma - - from .core import Terrain, hidden_in_viewport diff --git a/infinigen/terrain/assets/caves/__init__.py b/infinigen/terrain/assets/caves/__init__.py index 13f8f332b..98a186c8b 100644 --- a/infinigen/terrain/assets/caves/__init__.py +++ b/infinigen/terrain/assets/caves/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/assets/caves/core.py b/infinigen/terrain/assets/caves/core.py index fdb400827..48071fa0b 100644 --- a/infinigen/terrain/assets/caves/core.py +++ b/infinigen/terrain/assets/caves/core.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson, Zeyu Ma @@ -41,7 +41,7 @@ def select_vert(idx: int): def move_forward(current_dir): - assert type(current_dir) == np.ndarray and current_dir.size == 3 + assert isinstance(current_dir, np.ndarray) and current_dir.size == 3 bpy.ops.mesh.extrude_region_move(TRANSFORM_OT_translate={"value": current_dir}) diff --git a/infinigen/terrain/assets/caves/geometry_utils.py b/infinigen/terrain/assets/caves/geometry_utils.py index c81b6e415..1c38d90fe 100644 --- a/infinigen/terrain/assets/caves/geometry_utils.py +++ b/infinigen/terrain/assets/caves/geometry_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alejandro Newell, Lahav Lipson diff --git a/infinigen/terrain/assets/caves/pcfg.py b/infinigen/terrain/assets/caves/pcfg.py index 1518b3f16..3212227f8 100644 --- a/infinigen/terrain/assets/caves/pcfg.py +++ b/infinigen/terrain/assets/caves/pcfg.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/terrain/assets/landtiles/__init__.py b/infinigen/terrain/assets/landtiles/__init__.py index 840a52368..c1fa682dc 100644 --- a/infinigen/terrain/assets/landtiles/__init__.py +++ b/infinigen/terrain/assets/landtiles/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/assets/landtiles/ant_landscape.py b/infinigen/terrain/assets/landtiles/ant_landscape.py index 4662950b8..d96f0b426 100644 --- a/infinigen/terrain/assets/landtiles/ant_landscape.py +++ b/infinigen/terrain/assets/landtiles/ant_landscape.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/assets/landtiles/core.py b/infinigen/terrain/assets/landtiles/core.py index 4a2f91768..1c1b80fe7 100644 --- a/infinigen/terrain/assets/landtiles/core.py +++ b/infinigen/terrain/assets/landtiles/core.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/assets/landtiles/custom.py b/infinigen/terrain/assets/landtiles/custom.py index 8037f3915..bef1700e9 100644 --- a/infinigen/terrain/assets/landtiles/custom.py +++ b/infinigen/terrain/assets/landtiles/custom.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma @@ -151,10 +151,12 @@ def multi_mountains_asset( mountains.cleanup() Element.called_time.pop("mountains") cv2.imwrite(str(folder / f"{AssetFile.Heightmap}.exr"), heightmap) + with open(folder / f"{AssetFile.TileSize}.txt", "w") as f: f.write(f"{tile_size}\n") with open(folder / f"{AssetFile.Params}.txt", "w") as f: json.dump(multi_mountains_params(raw=1), f) + if erosion: run_erosion(folder) if snowfall: diff --git a/infinigen/terrain/assets/ocean.py b/infinigen/terrain/assets/ocean.py index b5adabfa8..ad4025a1a 100644 --- a/infinigen/terrain/assets/ocean.py +++ b/infinigen/terrain/assets/ocean.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/assets/upsidedown_mountains.py b/infinigen/terrain/assets/upsidedown_mountains.py index c30c7bb49..f758eb811 100644 --- a/infinigen/terrain/assets/upsidedown_mountains.py +++ b/infinigen/terrain/assets/upsidedown_mountains.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/core.py b/infinigen/terrain/core.py index b9fc77bc6..79de8a2b5 100644 --- a/infinigen/terrain/core.py +++ b/infinigen/terrain/core.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma @@ -6,6 +6,7 @@ import logging import os +from ctypes import c_int32 from pathlib import Path import bpy @@ -31,6 +32,7 @@ Transparency, ) from infinigen.OcMesher.ocmesher import OcMesher as UntexturedOcMesher +from infinigen.OcMesher.ocmesher import __version__ as ocmesher_version from infinigen.terrain.assets.ocean import ocean_asset from infinigen.terrain.mesher import ( OpaqueSphericalMesher, @@ -45,10 +47,13 @@ Mesh, Vars, get_caminfo, + load_cdll, move_modifier, write_attributes, ) +assert ocmesher_version == "1.0" + logger = logging.getLogger(__name__) fine_suffix = "_fine" @@ -120,6 +125,20 @@ def __init__( populated_bounds=(-75, 75, -75, 75, -25, 55), bounds=(-500, 500, -500, 500, -500, 500), ): + dll = load_cdll( + str( + Path(__file__).parent.resolve() + / "lib" + / "cpu" + / "elements" + / "waterbody.so" + ) + ) + func = dll.get_version + func.argtypes = [] + func.restype = c_int32 + terrain_element_version = func() + assert terrain_element_version == 1 self.seed = seed self.device = device self.surface_registry = surface_registry diff --git a/infinigen/terrain/elements/atmosphere.py b/infinigen/terrain/elements/atmosphere.py index 2529cfc70..0e1de50a1 100644 --- a/infinigen/terrain/elements/atmosphere.py +++ b/infinigen/terrain/elements/atmosphere.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/elements/caves.py b/infinigen/terrain/elements/caves.py index f2a578f90..be580c5a8 100644 --- a/infinigen/terrain/elements/caves.py +++ b/infinigen/terrain/elements/caves.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma +import logging import os import gin @@ -89,6 +90,7 @@ def load_assets( self.on_the_fly_asset_folder / str(i) / AssetFile.Finish ).exists(): with FixedSeed(int_hash(("Caves", self.assets_seed, i))): + logging.info(f"creating cave #{i}") caves_asset(self.on_the_fly_asset_folder / f"{i}") for i in range(on_the_fly_instances): asset_paths.append(self.on_the_fly_asset_folder / f"{i}") diff --git a/infinigen/terrain/elements/core.py b/infinigen/terrain/elements/core.py index cc2f61094..d6340cba7 100644 --- a/infinigen/terrain/elements/core.py +++ b/infinigen/terrain/elements/core.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/elements/ground.py b/infinigen/terrain/elements/ground.py index 38fd8c802..c78334728 100644 --- a/infinigen/terrain/elements/ground.py +++ b/infinigen/terrain/elements/ground.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/elements/landtiles.py b/infinigen/terrain/elements/landtiles.py index 387a59176..a06c78f0e 100644 --- a/infinigen/terrain/elements/landtiles.py +++ b/infinigen/terrain/elements/landtiles.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma +import logging import os import gin @@ -181,6 +182,7 @@ def load_assets( if not ( self.on_the_fly_asset_folder / tile / str(i) / AssetFile.Finish ).exists(): + logging.info(f"creating {tile} #{i}") with FixedSeed(int_hash(("LandTiles", self.assets_seed, t, i))): landtile_asset( self.on_the_fly_asset_folder / tile / f"{i}", diff --git a/infinigen/terrain/elements/mountains.py b/infinigen/terrain/elements/mountains.py index 9fd4ec12c..d3a11afb5 100644 --- a/infinigen/terrain/elements/mountains.py +++ b/infinigen/terrain/elements/mountains.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/elements/upsidedown_mountains.py b/infinigen/terrain/elements/upsidedown_mountains.py index 4d6db5563..fdd14033e 100644 --- a/infinigen/terrain/elements/upsidedown_mountains.py +++ b/infinigen/terrain/elements/upsidedown_mountains.py @@ -1,9 +1,10 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma +import logging import os import gin @@ -95,6 +96,7 @@ def load_assets( with FixedSeed( int_hash(("UpsidedownMountains", self.assets_seed, i)) ): + logging.info(f"creating upsidedown_mountains #{i}") upsidedown_mountains_asset( self.on_the_fly_asset_folder / f"{i}", device=self.device ) diff --git a/infinigen/terrain/elements/voronoi_rocks.py b/infinigen/terrain/elements/voronoi_rocks.py index cacc77fc6..cfd7c1278 100644 --- a/infinigen/terrain/elements/voronoi_rocks.py +++ b/infinigen/terrain/elements/voronoi_rocks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/elements/warped_rocks.py b/infinigen/terrain/elements/warped_rocks.py index 838bec534..b581e01c8 100644 --- a/infinigen/terrain/elements/warped_rocks.py +++ b/infinigen/terrain/elements/warped_rocks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/elements/waterbody.py b/infinigen/terrain/elements/waterbody.py index 8a5de350b..5b7b8bcfb 100644 --- a/infinigen/terrain/elements/waterbody.py +++ b/infinigen/terrain/elements/waterbody.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/land_process/erosion.py b/infinigen/terrain/land_process/erosion.py index 7cf696932..fbaba9386 100644 --- a/infinigen/terrain/land_process/erosion.py +++ b/infinigen/terrain/land_process/erosion.py @@ -1,20 +1,24 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma +import logging from ctypes import POINTER, c_char_p, c_float, c_int32 import cv2 import gin import numpy as np from numpy import ascontiguousarray as AC +from tqdm import trange import infinigen from infinigen.core.util.organization import AssetFile, Process from infinigen.terrain.utils import ASFLOAT, load_cdll, read, smooth +logger = logging.getLogger(__name__) + @gin.configurable def run_erosion( @@ -53,7 +57,8 @@ def run_erosion( / "infinigen/terrain/source/cpu/soil_machine/soil/sand.soil" ) - for i, N, n_iter in zip(list(range(len(Ns))), Ns, n_iters): + logger.info(f"Running erosion simulation for {folder}") + for i, N, n_iter in zip(trange(len(Ns)), Ns, n_iters): M = heightmap.shape[0] heightmap = cv2.resize(heightmap, (N, N)) if N > M: diff --git a/infinigen/terrain/land_process/snowfall.py b/infinigen/terrain/land_process/snowfall.py index c91c9a91c..d5274a8de 100644 --- a/infinigen/terrain/land_process/snowfall.py +++ b/infinigen/terrain/land_process/snowfall.py @@ -1,8 +1,9 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma +import logging import cv2 import gin @@ -23,6 +24,8 @@ from infinigen.core.util.random import random_general as rg from infinigen.terrain.utils import get_normal, read, smooth +logger = logging.getLogger(__name__) + snowfall_params_ = {} @@ -63,8 +66,10 @@ def run_snowfall( rocks = read(heightmap_path) M = rocks.shape[0] + logger.info(f"Running snowfall simulation for {folder}") + snows = np.zeros_like(rocks) - 1e9 - for N, n_iters, smoothing_kernel in diffussion_params: + for N, n_iters, smoothing_kernel in tqdm(diffussion_params): snow = rocks.copy() snow = cv2.resize(snow, (N, N)) mg = RasterModelGrid((N, N)) @@ -88,7 +93,7 @@ def run_snowfall( snows = np.maximum(snows, snow) mask = np.zeros_like(rocks) - for blending in blending_params: + for blending in tqdm(blending_params): for normal_preference, (th0, th1) in snowfall_params()["normal_params"]: reference_snow = rocks * blending + snows * (1 - blending) normal_map = get_normal(reference_snow, tile_size / snows.shape[0]) @@ -116,6 +121,7 @@ def run_snowfall( a_max=1, ) mask = np.clip(mask, a_min=0, a_max=1) + heightmap = snows * mask + rocks * (1 - mask) cv2.imwrite( str(folder / f"{Process.Snowfall}.{AssetFile.Heightmap}.exr"), diff --git a/infinigen/terrain/mesh_to_sdf/surface_point_cloud.py b/infinigen/terrain/mesh_to_sdf/surface_point_cloud.py index 7a11c1ff1..037b2a6d7 100644 --- a/infinigen/terrain/mesh_to_sdf/surface_point_cloud.py +++ b/infinigen/terrain/mesh_to_sdf/surface_point_cloud.py @@ -4,7 +4,7 @@ # All other contributions: -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/mesher/__init__.py b/infinigen/terrain/mesher/__init__.py index 177aa037d..f93af1a21 100644 --- a/infinigen/terrain/mesher/__init__.py +++ b/infinigen/terrain/mesher/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/mesher/cube_spherical_mesher.py b/infinigen/terrain/mesher/cube_spherical_mesher.py index 14077fb02..b42e13720 100644 --- a/infinigen/terrain/mesher/cube_spherical_mesher.py +++ b/infinigen/terrain/mesher/cube_spherical_mesher.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/mesher/frontview_spherical_mesher.py b/infinigen/terrain/mesher/frontview_spherical_mesher.py index 1fd45def2..871368a19 100644 --- a/infinigen/terrain/mesher/frontview_spherical_mesher.py +++ b/infinigen/terrain/mesher/frontview_spherical_mesher.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/mesher/spherical_mesher.py b/infinigen/terrain/mesher/spherical_mesher.py index 4809f451b..69e126e26 100644 --- a/infinigen/terrain/mesher/spherical_mesher.py +++ b/infinigen/terrain/mesher/spherical_mesher.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/mesher/uniform_mesher.py b/infinigen/terrain/mesher/uniform_mesher.py index 3966f3201..b7844e448 100644 --- a/infinigen/terrain/mesher/uniform_mesher.py +++ b/infinigen/terrain/mesher/uniform_mesher.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/scene.py b/infinigen/terrain/scene.py index 86e291be8..c0a2b25bc 100644 --- a/infinigen/terrain/scene.py +++ b/infinigen/terrain/scene.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/atmosphere.h b/infinigen/terrain/source/common/elements/atmosphere.h index 3e94d4d99..91b3786f2 100644 --- a/infinigen/terrain/source/common/elements/atmosphere.h +++ b/infinigen/terrain/source/common/elements/atmosphere.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/caves.h b/infinigen/terrain/source/common/elements/caves.h index 9f2265638..25d3f4a6c 100644 --- a/infinigen/terrain/source/common/elements/caves.h +++ b/infinigen/terrain/source/common/elements/caves.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/ground.h b/infinigen/terrain/source/common/elements/ground.h index 43c53cc3b..dc8dc07ba 100644 --- a/infinigen/terrain/source/common/elements/ground.h +++ b/infinigen/terrain/source/common/elements/ground.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/landtiles.h b/infinigen/terrain/source/common/elements/landtiles.h index bed726ffa..2c8703b2a 100644 --- a/infinigen/terrain/source/common/elements/landtiles.h +++ b/infinigen/terrain/source/common/elements/landtiles.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/mountains.h b/infinigen/terrain/source/common/elements/mountains.h index d72b2b7cc..852e5c481 100644 --- a/infinigen/terrain/source/common/elements/mountains.h +++ b/infinigen/terrain/source/common/elements/mountains.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/upsidedown_mountains.h b/infinigen/terrain/source/common/elements/upsidedown_mountains.h index 49d43be1f..e040fcb72 100644 --- a/infinigen/terrain/source/common/elements/upsidedown_mountains.h +++ b/infinigen/terrain/source/common/elements/upsidedown_mountains.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/voronoi_rocks.h b/infinigen/terrain/source/common/elements/voronoi_rocks.h index 49d77fa13..055ef30f4 100644 --- a/infinigen/terrain/source/common/elements/voronoi_rocks.h +++ b/infinigen/terrain/source/common/elements/voronoi_rocks.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/warped_rocks.h b/infinigen/terrain/source/common/elements/warped_rocks.h index bab03e3de..3a6a2b670 100644 --- a/infinigen/terrain/source/common/elements/warped_rocks.h +++ b/infinigen/terrain/source/common/elements/warped_rocks.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/elements/waterbody.h b/infinigen/terrain/source/common/elements/waterbody.h index 384449983..7e3920987 100644 --- a/infinigen/terrain/source/common/elements/waterbody.h +++ b/infinigen/terrain/source/common/elements/waterbody.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/utils/elements_util.h b/infinigen/terrain/source/common/utils/elements_util.h index 1b21d26d5..766edbd74 100644 --- a/infinigen/terrain/source/common/utils/elements_util.h +++ b/infinigen/terrain/source/common/utils/elements_util.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/common/utils/vectors.h b/infinigen/terrain/source/common/utils/vectors.h index 52433a8f0..a56ab636d 100644 --- a/infinigen/terrain/source/common/utils/vectors.h +++ b/infinigen/terrain/source/common/utils/vectors.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/atmosphere.cpp b/infinigen/terrain/source/cpu/elements/atmosphere.cpp index b78308df1..9f49cd6f6 100644 --- a/infinigen/terrain/source/cpu/elements/atmosphere.cpp +++ b/infinigen/terrain/source/cpu/elements/atmosphere.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/core.cpp b/infinigen/terrain/source/cpu/elements/core.cpp index 3030fc9b4..8ad6200e3 100644 --- a/infinigen/terrain/source/cpu/elements/core.cpp +++ b/infinigen/terrain/source/cpu/elements/core.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma @@ -43,5 +43,8 @@ extern "C" { void cleanup() { } - + int get_version() { + return 1; + } + } \ No newline at end of file diff --git a/infinigen/terrain/source/cpu/elements/ground.cpp b/infinigen/terrain/source/cpu/elements/ground.cpp index 8744d5c7f..accb9e1da 100644 --- a/infinigen/terrain/source/cpu/elements/ground.cpp +++ b/infinigen/terrain/source/cpu/elements/ground.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/header.h b/infinigen/terrain/source/cpu/elements/header.h index e9049b62a..9339a4f6d 100644 --- a/infinigen/terrain/source/cpu/elements/header.h +++ b/infinigen/terrain/source/cpu/elements/header.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/landtiles.cpp b/infinigen/terrain/source/cpu/elements/landtiles.cpp index 09c15cd3f..1eb6994e2 100644 --- a/infinigen/terrain/source/cpu/elements/landtiles.cpp +++ b/infinigen/terrain/source/cpu/elements/landtiles.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/mountains.cpp b/infinigen/terrain/source/cpu/elements/mountains.cpp index f5156f741..208209a87 100644 --- a/infinigen/terrain/source/cpu/elements/mountains.cpp +++ b/infinigen/terrain/source/cpu/elements/mountains.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/upsidedown_mountains.cpp b/infinigen/terrain/source/cpu/elements/upsidedown_mountains.cpp index 3cade49fd..6fc428e84 100644 --- a/infinigen/terrain/source/cpu/elements/upsidedown_mountains.cpp +++ b/infinigen/terrain/source/cpu/elements/upsidedown_mountains.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/voronoi_rocks.cpp b/infinigen/terrain/source/cpu/elements/voronoi_rocks.cpp index a8ab822df..d9483d82b 100644 --- a/infinigen/terrain/source/cpu/elements/voronoi_rocks.cpp +++ b/infinigen/terrain/source/cpu/elements/voronoi_rocks.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/warped_rocks.cpp b/infinigen/terrain/source/cpu/elements/warped_rocks.cpp index 11d2936f4..4239edc05 100644 --- a/infinigen/terrain/source/cpu/elements/warped_rocks.cpp +++ b/infinigen/terrain/source/cpu/elements/warped_rocks.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/elements/waterbody.cpp b/infinigen/terrain/source/cpu/elements/waterbody.cpp index 973393191..08d3517bf 100644 --- a/infinigen/terrain/source/cpu/elements/waterbody.cpp +++ b/infinigen/terrain/source/cpu/elements/waterbody.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/meshing/cube_spherical_mesher.cpp b/infinigen/terrain/source/cpu/meshing/cube_spherical_mesher.cpp index 9cc7086b8..0b62c543d 100644 --- a/infinigen/terrain/source/cpu/meshing/cube_spherical_mesher.cpp +++ b/infinigen/terrain/source/cpu/meshing/cube_spherical_mesher.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/meshing/frontview_spherical_mesher.cpp b/infinigen/terrain/source/cpu/meshing/frontview_spherical_mesher.cpp index 7071ca1e0..26a82449d 100644 --- a/infinigen/terrain/source/cpu/meshing/frontview_spherical_mesher.cpp +++ b/infinigen/terrain/source/cpu/meshing/frontview_spherical_mesher.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/meshing/uniform_mesher.cpp b/infinigen/terrain/source/cpu/meshing/uniform_mesher.cpp index 4199f233c..39316e69c 100644 --- a/infinigen/terrain/source/cpu/meshing/uniform_mesher.cpp +++ b/infinigen/terrain/source/cpu/meshing/uniform_mesher.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/meshing/utils.cpp b/infinigen/terrain/source/cpu/meshing/utils.cpp index e8b014d44..b9fc3d0f2 100644 --- a/infinigen/terrain/source/cpu/meshing/utils.cpp +++ b/infinigen/terrain/source/cpu/meshing/utils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/meshing/visibility_test.cpp b/infinigen/terrain/source/cpu/meshing/visibility_test.cpp index 5aae9c112..113a0cde6 100644 --- a/infinigen/terrain/source/cpu/meshing/visibility_test.cpp +++ b/infinigen/terrain/source/cpu/meshing/visibility_test.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/SoilMachine.cpp b/infinigen/terrain/source/cpu/soil_machine/SoilMachine.cpp index db8d6a06b..09168ce74 100644 --- a/infinigen/terrain/source/cpu/soil_machine/SoilMachine.cpp +++ b/infinigen/terrain/source/cpu/soil_machine/SoilMachine.cpp @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/include/distribution.h b/infinigen/terrain/source/cpu/soil_machine/include/distribution.h index e8d1be592..c0eff2799 100644 --- a/infinigen/terrain/source/cpu/soil_machine/include/distribution.h +++ b/infinigen/terrain/source/cpu/soil_machine/include/distribution.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/include/vertexpool.h b/infinigen/terrain/source/cpu/soil_machine/include/vertexpool.h index ca48534cf..5d58076cc 100644 --- a/infinigen/terrain/source/cpu/soil_machine/include/vertexpool.h +++ b/infinigen/terrain/source/cpu/soil_machine/include/vertexpool.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/io.h b/infinigen/terrain/source/cpu/soil_machine/io.h index f9923ce9d..b42e0c9f4 100644 --- a/infinigen/terrain/source/cpu/soil_machine/io.h +++ b/infinigen/terrain/source/cpu/soil_machine/io.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/layermap.h b/infinigen/terrain/source/cpu/soil_machine/layermap.h index 407042782..60375bb6e 100644 --- a/infinigen/terrain/source/cpu/soil_machine/layermap.h +++ b/infinigen/terrain/source/cpu/soil_machine/layermap.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/particle/particle.h b/infinigen/terrain/source/cpu/soil_machine/particle/particle.h index d9063ccc5..442e43ebd 100644 --- a/infinigen/terrain/source/cpu/soil_machine/particle/particle.h +++ b/infinigen/terrain/source/cpu/soil_machine/particle/particle.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/particle/water.h b/infinigen/terrain/source/cpu/soil_machine/particle/water.h index 0def8e196..8f58f6840 100644 --- a/infinigen/terrain/source/cpu/soil_machine/particle/water.h +++ b/infinigen/terrain/source/cpu/soil_machine/particle/water.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/particle/wind.h b/infinigen/terrain/source/cpu/soil_machine/particle/wind.h index 569b5392d..c52a80fc1 100644 --- a/infinigen/terrain/source/cpu/soil_machine/particle/wind.h +++ b/infinigen/terrain/source/cpu/soil_machine/particle/wind.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/soil_machine/surface.h b/infinigen/terrain/source/cpu/soil_machine/surface.h index a43af1409..97e494b6a 100644 --- a/infinigen/terrain/source/cpu/soil_machine/surface.h +++ b/infinigen/terrain/source/cpu/soil_machine/surface.h @@ -6,7 +6,7 @@ Original files authored by Nick McDonald: https://github.com/weigert/SoilMachine All other contributions: -Copyright (c) Princeton University. +Copyright (C) 2023, Princeton University. Licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/chunkyrock.cpp b/infinigen/terrain/source/cpu/surfaces/chunkyrock.cpp index 4dba551c1..1d4002737 100644 --- a/infinigen/terrain/source/cpu/surfaces/chunkyrock.cpp +++ b/infinigen/terrain/source/cpu/surfaces/chunkyrock.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/cobble_stone.cpp b/infinigen/terrain/source/cpu/surfaces/cobble_stone.cpp index 080f05a02..f980f2c27 100644 --- a/infinigen/terrain/source/cpu/surfaces/cobble_stone.cpp +++ b/infinigen/terrain/source/cpu/surfaces/cobble_stone.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/cracked_ground.cpp b/infinigen/terrain/source/cpu/surfaces/cracked_ground.cpp index e3d5e845c..a7c697f98 100644 --- a/infinigen/terrain/source/cpu/surfaces/cracked_ground.cpp +++ b/infinigen/terrain/source/cpu/surfaces/cracked_ground.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/dirt.cpp b/infinigen/terrain/source/cpu/surfaces/dirt.cpp index 26407f815..2ffdca370 100644 --- a/infinigen/terrain/source/cpu/surfaces/dirt.cpp +++ b/infinigen/terrain/source/cpu/surfaces/dirt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/header.h b/infinigen/terrain/source/cpu/surfaces/header.h index b1e1c1ba2..0cf02bbbd 100644 --- a/infinigen/terrain/source/cpu/surfaces/header.h +++ b/infinigen/terrain/source/cpu/surfaces/header.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/ice.cpp b/infinigen/terrain/source/cpu/surfaces/ice.cpp index 85fd11197..b2e6e2049 100644 --- a/infinigen/terrain/source/cpu/surfaces/ice.cpp +++ b/infinigen/terrain/source/cpu/surfaces/ice.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/mountain.cpp b/infinigen/terrain/source/cpu/surfaces/mountain.cpp index f70040a2b..2e852ec36 100644 --- a/infinigen/terrain/source/cpu/surfaces/mountain.cpp +++ b/infinigen/terrain/source/cpu/surfaces/mountain.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/mud.cpp b/infinigen/terrain/source/cpu/surfaces/mud.cpp index c40ba475c..7c19114f8 100644 --- a/infinigen/terrain/source/cpu/surfaces/mud.cpp +++ b/infinigen/terrain/source/cpu/surfaces/mud.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/sand.cpp b/infinigen/terrain/source/cpu/surfaces/sand.cpp index 50ba3270b..11b04c121 100644 --- a/infinigen/terrain/source/cpu/surfaces/sand.cpp +++ b/infinigen/terrain/source/cpu/surfaces/sand.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/sandstone.cpp b/infinigen/terrain/source/cpu/surfaces/sandstone.cpp index 78d3ed41d..2c7dcb37c 100644 --- a/infinigen/terrain/source/cpu/surfaces/sandstone.cpp +++ b/infinigen/terrain/source/cpu/surfaces/sandstone.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/snow.cpp b/infinigen/terrain/source/cpu/surfaces/snow.cpp index 6b69dee2c..515622f39 100644 --- a/infinigen/terrain/source/cpu/surfaces/snow.cpp +++ b/infinigen/terrain/source/cpu/surfaces/snow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/soil.cpp b/infinigen/terrain/source/cpu/surfaces/soil.cpp index d16b842d5..090868f44 100644 --- a/infinigen/terrain/source/cpu/surfaces/soil.cpp +++ b/infinigen/terrain/source/cpu/surfaces/soil.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/surfaces/stone.cpp b/infinigen/terrain/source/cpu/surfaces/stone.cpp index 754268053..b6dcd618a 100644 --- a/infinigen/terrain/source/cpu/surfaces/stone.cpp +++ b/infinigen/terrain/source/cpu/surfaces/stone.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cpu/utils/FastNoiseLite.cpp b/infinigen/terrain/source/cpu/utils/FastNoiseLite.cpp index 6624b0cb7..c696c9884 100644 --- a/infinigen/terrain/source/cpu/utils/FastNoiseLite.cpp +++ b/infinigen/terrain/source/cpu/utils/FastNoiseLite.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/atmosphere.cu b/infinigen/terrain/source/cuda/elements/atmosphere.cu index 855f387e9..f55932684 100644 --- a/infinigen/terrain/source/cuda/elements/atmosphere.cu +++ b/infinigen/terrain/source/cuda/elements/atmosphere.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/core.cu b/infinigen/terrain/source/cuda/elements/core.cu index e4a501b9a..42e8ad18e 100644 --- a/infinigen/terrain/source/cuda/elements/core.cu +++ b/infinigen/terrain/source/cuda/elements/core.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/ground.cu b/infinigen/terrain/source/cuda/elements/ground.cu index 8f6d6872b..351ce08f8 100644 --- a/infinigen/terrain/source/cuda/elements/ground.cu +++ b/infinigen/terrain/source/cuda/elements/ground.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/header.h b/infinigen/terrain/source/cuda/elements/header.h index ccecbe9e0..29c09f83d 100644 --- a/infinigen/terrain/source/cuda/elements/header.h +++ b/infinigen/terrain/source/cuda/elements/header.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/landtiles.cu b/infinigen/terrain/source/cuda/elements/landtiles.cu index 611db76ff..febdd83ca 100644 --- a/infinigen/terrain/source/cuda/elements/landtiles.cu +++ b/infinigen/terrain/source/cuda/elements/landtiles.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/mountains.cu b/infinigen/terrain/source/cuda/elements/mountains.cu index ff974caa8..4e4e5bb22 100644 --- a/infinigen/terrain/source/cuda/elements/mountains.cu +++ b/infinigen/terrain/source/cuda/elements/mountains.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/upsidedown_mountains.cu b/infinigen/terrain/source/cuda/elements/upsidedown_mountains.cu index 9b708c9ca..d852de17e 100644 --- a/infinigen/terrain/source/cuda/elements/upsidedown_mountains.cu +++ b/infinigen/terrain/source/cuda/elements/upsidedown_mountains.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/voronoi_rocks.cu b/infinigen/terrain/source/cuda/elements/voronoi_rocks.cu index 7c45bc8eb..0e7b3dc4c 100644 --- a/infinigen/terrain/source/cuda/elements/voronoi_rocks.cu +++ b/infinigen/terrain/source/cuda/elements/voronoi_rocks.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/warped_rocks.cu b/infinigen/terrain/source/cuda/elements/warped_rocks.cu index 9c924101f..d8576a764 100644 --- a/infinigen/terrain/source/cuda/elements/warped_rocks.cu +++ b/infinigen/terrain/source/cuda/elements/warped_rocks.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/elements/waterbody.cu b/infinigen/terrain/source/cuda/elements/waterbody.cu index 800ac85a3..9a128d5ef 100644 --- a/infinigen/terrain/source/cuda/elements/waterbody.cu +++ b/infinigen/terrain/source/cuda/elements/waterbody.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/chunkyrock.cu b/infinigen/terrain/source/cuda/surfaces/chunkyrock.cu index 0427cf3c6..5756c5801 100644 --- a/infinigen/terrain/source/cuda/surfaces/chunkyrock.cu +++ b/infinigen/terrain/source/cuda/surfaces/chunkyrock.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/cobble_stone.cu b/infinigen/terrain/source/cuda/surfaces/cobble_stone.cu index 1cbe9091d..9df3dcf83 100644 --- a/infinigen/terrain/source/cuda/surfaces/cobble_stone.cu +++ b/infinigen/terrain/source/cuda/surfaces/cobble_stone.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/cracked_ground.cu b/infinigen/terrain/source/cuda/surfaces/cracked_ground.cu index ad732043e..f593f399e 100644 --- a/infinigen/terrain/source/cuda/surfaces/cracked_ground.cu +++ b/infinigen/terrain/source/cuda/surfaces/cracked_ground.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/dirt.cu b/infinigen/terrain/source/cuda/surfaces/dirt.cu index 03787e8f3..c5677c220 100644 --- a/infinigen/terrain/source/cuda/surfaces/dirt.cu +++ b/infinigen/terrain/source/cuda/surfaces/dirt.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/header.h b/infinigen/terrain/source/cuda/surfaces/header.h index d6057e174..afef443e4 100644 --- a/infinigen/terrain/source/cuda/surfaces/header.h +++ b/infinigen/terrain/source/cuda/surfaces/header.h @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/ice.cu b/infinigen/terrain/source/cuda/surfaces/ice.cu index 5e4e375bb..ca6ea8a81 100644 --- a/infinigen/terrain/source/cuda/surfaces/ice.cu +++ b/infinigen/terrain/source/cuda/surfaces/ice.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/mountain.cu b/infinigen/terrain/source/cuda/surfaces/mountain.cu index 244c25519..9a69fd6c4 100644 --- a/infinigen/terrain/source/cuda/surfaces/mountain.cu +++ b/infinigen/terrain/source/cuda/surfaces/mountain.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/mud.cu b/infinigen/terrain/source/cuda/surfaces/mud.cu index 69817d633..dfe9bdc2c 100644 --- a/infinigen/terrain/source/cuda/surfaces/mud.cu +++ b/infinigen/terrain/source/cuda/surfaces/mud.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/sand.cu b/infinigen/terrain/source/cuda/surfaces/sand.cu index f220ad332..255fd0350 100644 --- a/infinigen/terrain/source/cuda/surfaces/sand.cu +++ b/infinigen/terrain/source/cuda/surfaces/sand.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/sandstone.cu b/infinigen/terrain/source/cuda/surfaces/sandstone.cu index e6ec9368c..5ca216fa6 100644 --- a/infinigen/terrain/source/cuda/surfaces/sandstone.cu +++ b/infinigen/terrain/source/cuda/surfaces/sandstone.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/snow.cu b/infinigen/terrain/source/cuda/surfaces/snow.cu index 326f44402..09a496047 100644 --- a/infinigen/terrain/source/cuda/surfaces/snow.cu +++ b/infinigen/terrain/source/cuda/surfaces/snow.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/soil.cu b/infinigen/terrain/source/cuda/surfaces/soil.cu index c2bc34039..16a90646f 100644 --- a/infinigen/terrain/source/cuda/surfaces/soil.cu +++ b/infinigen/terrain/source/cuda/surfaces/soil.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/surfaces/stone.cu b/infinigen/terrain/source/cuda/surfaces/stone.cu index 1310c431a..0bbb5c082 100644 --- a/infinigen/terrain/source/cuda/surfaces/stone.cu +++ b/infinigen/terrain/source/cuda/surfaces/stone.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/source/cuda/utils/FastNoiseLite.cu b/infinigen/terrain/source/cuda/utils/FastNoiseLite.cu index aa70f4366..3057c056c 100644 --- a/infinigen/terrain/source/cuda/utils/FastNoiseLite.cu +++ b/infinigen/terrain/source/cuda/utils/FastNoiseLite.cu @@ -1,4 +1,4 @@ -// Copyright (c) Princeton University. +// Copyright (C) 2023, Princeton University. // This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. // Authors: Zeyu Ma diff --git a/infinigen/terrain/surface_kernel/core.py b/infinigen/terrain/surface_kernel/core.py index 8f63faad6..127f6faa7 100644 --- a/infinigen/terrain/surface_kernel/core.py +++ b/infinigen/terrain/surface_kernel/core.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/surface_kernel/kernelizer.py b/infinigen/terrain/surface_kernel/kernelizer.py index 06d40f945..95ac6cbd8 100644 --- a/infinigen/terrain/surface_kernel/kernelizer.py +++ b/infinigen/terrain/surface_kernel/kernelizer.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/__init__.py b/infinigen/terrain/utils/__init__.py index e1009436c..875f96224 100644 --- a/infinigen/terrain/utils/__init__.py +++ b/infinigen/terrain/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/camera.py b/infinigen/terrain/utils/camera.py index 1c2932555..315ea0290 100644 --- a/infinigen/terrain/utils/camera.py +++ b/infinigen/terrain/utils/camera.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/ctype_util.py b/infinigen/terrain/utils/ctype_util.py index b5598d834..46bd3aadb 100644 --- a/infinigen/terrain/utils/ctype_util.py +++ b/infinigen/terrain/utils/ctype_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/image_processing.py b/infinigen/terrain/utils/image_processing.py index da3b0a96c..da4995144 100644 --- a/infinigen/terrain/utils/image_processing.py +++ b/infinigen/terrain/utils/image_processing.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/kernelizer_util.py b/infinigen/terrain/utils/kernelizer_util.py index a04ffe747..72545c1a3 100644 --- a/infinigen/terrain/utils/kernelizer_util.py +++ b/infinigen/terrain/utils/kernelizer_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/logging.py b/infinigen/terrain/utils/logging.py index 670c1224c..022f17b6a 100644 --- a/infinigen/terrain/utils/logging.py +++ b/infinigen/terrain/utils/logging.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/mesh.py b/infinigen/terrain/utils/mesh.py index 4dfd372b7..77b2dd9f6 100644 --- a/infinigen/terrain/utils/mesh.py +++ b/infinigen/terrain/utils/mesh.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/terrain/utils/random.py b/infinigen/terrain/utils/random.py index f3940b59c..faf5d532c 100644 --- a/infinigen/terrain/utils/random.py +++ b/infinigen/terrain/utils/random.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/tools/blendscript_import_infinigen.py b/infinigen/tools/blendscript_import_infinigen.py index a7a8d0a43..345dd0a94 100644 --- a/infinigen/tools/blendscript_import_infinigen.py +++ b/infinigen/tools/blendscript_import_infinigen.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/tools/blendscript_path_append.py b/infinigen/tools/blendscript_path_append.py index c85fa7f37..5e387ee84 100644 --- a/infinigen/tools/blendscript_path_append.py +++ b/infinigen/tools/blendscript_path_append.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen/tools/compress_masks.py b/infinigen/tools/compress_masks.py index ef2be379c..af30d389d 100644 --- a/infinigen/tools/compress_masks.py +++ b/infinigen/tools/compress_masks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/tools/convert_displacement.py b/infinigen/tools/convert_displacement.py index 685c99c26..2e66627d0 100644 --- a/infinigen/tools/convert_displacement.py +++ b/infinigen/tools/convert_displacement.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan diff --git a/infinigen/tools/datarelease_toolkit.py b/infinigen/tools/datarelease_toolkit.py index fe15df2d5..f3d97df36 100644 --- a/infinigen/tools/datarelease_toolkit.py +++ b/infinigen/tools/datarelease_toolkit.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/tools/dataset_loader.py b/infinigen/tools/dataset_loader.py index 3524a3910..467aad1a9 100644 --- a/infinigen/tools/dataset_loader.py +++ b/infinigen/tools/dataset_loader.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: diff --git a/infinigen/tools/download_pregenerated_data.py b/infinigen/tools/download_pregenerated_data.py index b0f9b7e3a..69e738269 100644 --- a/infinigen/tools/download_pregenerated_data.py +++ b/infinigen/tools/download_pregenerated_data.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/tools/export.py b/infinigen/tools/export.py index f6c0fa5a5..8debf69ff 100644 --- a/infinigen/tools/export.py +++ b/infinigen/tools/export.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan @@ -764,12 +764,12 @@ def export_scene( bpy.ops.wm.open_mainfile(filepath=str(input_blend)) folder = output_folder / f"export_{input_blend.name}" folder.mkdir(exist_ok=True, parents=True) - result = export_curr_scene(folder, **kwargs) + export_curr_scene(folder, **kwargs) if pipeline_folder is not None and task_uniqname is not None: (pipeline_folder / "logs" / f"FINISH_{task_uniqname}").touch() - return result + return folder # side effects: will remove parents of inputted obj and clean its name, hides viewport of all objects diff --git a/infinigen/tools/ground_truth/__init__.py b/infinigen/tools/ground_truth/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/infinigen/tools/ground_truth/bounding_boxes_3d.py b/infinigen/tools/ground_truth/bounding_boxes_3d.py index eb97b9dac..e3dbe329a 100644 --- a/infinigen/tools/ground_truth/bounding_boxes_3d.py +++ b/infinigen/tools/ground_truth/bounding_boxes_3d.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson @@ -22,8 +22,8 @@ "GT visualization requires `einops`. Please install optional extras via `pip install .[vis]`." ) -from ..compress_masks import recover -from ..dataset_loader import get_frame_path +from infinigen.tools.compress_masks import recover +from infinigen.tools.dataset_loader import get_frame_path """ Usage: python -m tools.ground_truth.bounding_boxes_3d [--query ] diff --git a/infinigen/tools/ground_truth/depth_to_normals.py b/infinigen/tools/ground_truth/depth_to_normals.py index 545b89598..3e36d9fe7 100644 --- a/infinigen/tools/ground_truth/depth_to_normals.py +++ b/infinigen/tools/ground_truth/depth_to_normals.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson @@ -13,7 +13,7 @@ from imageio.v3 import imread, imwrite from numpy.linalg import inv -from ..dataset_loader import get_frame_path +from infinigen.tools.dataset_loader import get_frame_path try: from einops import einsum diff --git a/infinigen/tools/ground_truth/optical_flow_warp.py b/infinigen/tools/ground_truth/optical_flow_warp.py index 330ff4e14..24f1fb386 100644 --- a/infinigen/tools/ground_truth/optical_flow_warp.py +++ b/infinigen/tools/ground_truth/optical_flow_warp.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson @@ -10,7 +10,7 @@ import numpy as np from imageio.v3 import imread, imwrite -from ..dataset_loader import get_frame_path +from infinigen.tools.dataset_loader import get_frame_path """ Usage: python -m tools.ground_truth.rigid_warp diff --git a/infinigen/tools/ground_truth/rigid_warp.py b/infinigen/tools/ground_truth/rigid_warp.py index 517297d10..33c7d60e7 100644 --- a/infinigen/tools/ground_truth/rigid_warp.py +++ b/infinigen/tools/ground_truth/rigid_warp.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson @@ -11,7 +11,7 @@ from imageio.v3 import imread, imwrite from numpy.linalg import inv -from ..dataset_loader import get_frame_path +from infinigen.tools.dataset_loader import get_frame_path try: from einops import einsum diff --git a/infinigen/tools/ground_truth/segmentation_lookup.py b/infinigen/tools/ground_truth/segmentation_lookup.py index 3db0825b9..3afaf1f01 100644 --- a/infinigen/tools/ground_truth/segmentation_lookup.py +++ b/infinigen/tools/ground_truth/segmentation_lookup.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson @@ -15,8 +15,8 @@ from imageio.v3 import imread, imwrite from numba.types import bool_ -from ..compress_masks import recover -from ..dataset_loader import get_frame_path +from infinigen.tools.compress_masks import recover +from infinigen.tools.dataset_loader import get_frame_path try: from einops import pack, rearrange, repeat diff --git a/infinigen/tools/indoor_profile.py b/infinigen/tools/indoor_profile.py index f649c8772..487f04747 100644 --- a/infinigen/tools/indoor_profile.py +++ b/infinigen/tools/indoor_profile.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan diff --git a/infinigen/tools/isaac_sim.py b/infinigen/tools/isaac_sim.py index 551cb5921..d28ec5b09 100644 --- a/infinigen/tools/isaac_sim.py +++ b/infinigen/tools/isaac_sim.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan, Beining Han diff --git a/infinigen/tools/perceptual/create_pairs.py b/infinigen/tools/perceptual/create_pairs.py index 3c5404e4c..cd170928d 100644 --- a/infinigen/tools/perceptual/create_pairs.py +++ b/infinigen/tools/perceptual/create_pairs.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/tools/perceptual/create_submission.py b/infinigen/tools/perceptual/create_submission.py index 8c8f7fda3..ad1d7758f 100644 --- a/infinigen/tools/perceptual/create_submission.py +++ b/infinigen/tools/perceptual/create_submission.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/tools/perceptual/perceptual_extract.py b/infinigen/tools/perceptual/perceptual_extract.py index a9a9405e5..812901ceb 100644 --- a/infinigen/tools/perceptual/perceptual_extract.py +++ b/infinigen/tools/perceptual/perceptual_extract.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/tools/perceptual/rename.py b/infinigen/tools/perceptual/rename.py index c5c8776cd..6401516ec 100644 --- a/infinigen/tools/perceptual/rename.py +++ b/infinigen/tools/perceptual/rename.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/tools/results/aggregate_job_stats.py b/infinigen/tools/results/aggregate_job_stats.py index 68a33d7a7..95d3b9962 100644 --- a/infinigen/tools/results/aggregate_job_stats.py +++ b/infinigen/tools/results/aggregate_job_stats.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/tools/results/job_stats.py b/infinigen/tools/results/job_stats.py index 40ec1385c..39c3bbeb0 100644 --- a/infinigen/tools/results/job_stats.py +++ b/infinigen/tools/results/job_stats.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/tools/results/make_grid_figure.py b/infinigen/tools/results/make_grid_figure.py index 8219c76ab..4500be686 100644 --- a/infinigen/tools/results/make_grid_figure.py +++ b/infinigen/tools/results/make_grid_figure.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/tools/results/parse_times.py b/infinigen/tools/results/parse_times.py index 6e089c8ae..6fb93730a 100644 --- a/infinigen/tools/results/parse_times.py +++ b/infinigen/tools/results/parse_times.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/tools/results/parse_videos.py b/infinigen/tools/results/parse_videos.py index 19bd17eaf..3de8f587c 100644 --- a/infinigen/tools/results/parse_videos.py +++ b/infinigen/tools/results/parse_videos.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/tools/results/resource_stats.py b/infinigen/tools/results/resource_stats.py index 9c1d88aca..f0400459b 100644 --- a/infinigen/tools/results/resource_stats.py +++ b/infinigen/tools/results/resource_stats.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/tools/results/scatter_figure.py b/infinigen/tools/results/scatter_figure.py index c1723abca..1575ac539 100644 --- a/infinigen/tools/results/scatter_figure.py +++ b/infinigen/tools/results/scatter_figure.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Hongyu Wen diff --git a/infinigen/tools/results/strip_alpha_background.py b/infinigen/tools/results/strip_alpha_background.py index 4b989d615..e886667e1 100644 --- a/infinigen/tools/results/strip_alpha_background.py +++ b/infinigen/tools/results/strip_alpha_background.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick, Lingjie Mei diff --git a/infinigen/tools/results/summarize.py b/infinigen/tools/results/summarize.py index b74bb7217..4a8233626 100644 --- a/infinigen/tools/results/summarize.py +++ b/infinigen/tools/results/summarize.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lahav Lipson diff --git a/infinigen/tools/results/visualize_planar_graph.py b/infinigen/tools/results/visualize_planar_graph.py index ef84388af..b6c6428aa 100644 --- a/infinigen/tools/results/visualize_planar_graph.py +++ b/infinigen/tools/results/visualize_planar_graph.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen/tools/submit_asset_cache.py b/infinigen/tools/submit_asset_cache.py index 3bf548b6a..fb1bb2592 100644 --- a/infinigen/tools/submit_asset_cache.py +++ b/infinigen/tools/submit_asset_cache.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/infinigen/tools/suffixes.py b/infinigen/tools/suffixes.py index 0cdb59750..78649a78c 100644 --- a/infinigen/tools/suffixes.py +++ b/infinigen/tools/suffixes.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen/tools/terrain/generate_terrain_assets.py b/infinigen/tools/terrain/generate_terrain_assets.py index 4c814ee7d..2de487569 100644 --- a/infinigen/tools/terrain/generate_terrain_assets.py +++ b/infinigen/tools/terrain/generate_terrain_assets.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/tools/terrain/kernelize_surfaces.py b/infinigen/tools/terrain/kernelize_surfaces.py index ffd6fa14d..0a1ee1e8a 100644 --- a/infinigen/tools/terrain/kernelize_surfaces.py +++ b/infinigen/tools/terrain/kernelize_surfaces.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/tools/terrain/landtile_viewer.py b/infinigen/tools/terrain/landtile_viewer.py index 3e9f44d3d..bf8d430ef 100644 --- a/infinigen/tools/terrain/landtile_viewer.py +++ b/infinigen/tools/terrain/landtile_viewer.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen/tools/terrain/palette/palette.py b/infinigen/tools/terrain/palette/palette.py index 4071ac48a..b0a90b4f7 100644 --- a/infinigen/tools/terrain/palette/palette.py +++ b/infinigen/tools/terrain/palette/palette.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma, Lingjie Mei diff --git a/infinigen/tools/terrain/params_parser.py b/infinigen/tools/terrain/params_parser.py index fe3fd70c8..82da19feb 100644 --- a/infinigen/tools/terrain/params_parser.py +++ b/infinigen/tools/terrain/params_parser.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/infinigen_examples/asset_parameters.py b/infinigen_examples/asset_parameters.py index f276cf151..f84e58346 100644 --- a/infinigen_examples/asset_parameters.py +++ b/infinigen_examples/asset_parameters.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Lingjie Mei diff --git a/infinigen_examples/configs_indoor/base_indoors.gin b/infinigen_examples/configs_indoor/base_indoors.gin index 4b69c72ec..f0f07059a 100644 --- a/infinigen_examples/configs_indoor/base_indoors.gin +++ b/infinigen_examples/configs_indoor/base_indoors.gin @@ -60,4 +60,10 @@ compose_indoors.hide_other_rooms_enabled = False compose_indoors.fancy_clouds_chance = 0.5 compose_indoors.grass_chance = 0.5 compose_indoors.rocks_chance = 0.5 -compose_indoors.near_distance = 20 \ No newline at end of file +compose_indoors.near_distance = 20 + +compose_indoors.floating_objs_enabled = False +compose_indoors.num_floating = ('discrete_uniform', 15, 25) +compose_indoors.norm_floating_size = True +compose_indoors.enable_collision_floating = False +compose_indoors.enable_collision_solved = False \ No newline at end of file diff --git a/infinigen_examples/generate_asset_demo.py b/infinigen_examples/generate_asset_demo.py index c08e49ca4..bba4504aa 100644 --- a/infinigen_examples/generate_asset_demo.py +++ b/infinigen_examples/generate_asset_demo.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen_examples/generate_asset_parameters.py b/infinigen_examples/generate_asset_parameters.py index bb3c32087..570b716d2 100644 --- a/infinigen_examples/generate_asset_parameters.py +++ b/infinigen_examples/generate_asset_parameters.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this # source tree. @@ -52,9 +52,9 @@ from infinigen.core.util.blender import deep_clone_obj from infinigen.core.util.camera import points_inview from infinigen.core.util.math import FixedSeed +from infinigen.core.util.test_utils import load_txt_list from infinigen_examples.asset_parameters import parameters from infinigen_examples.generate_individual_assets import make_args, setup_camera -from infinigen_examples.util.test_utils import load_txt_list logging.basicConfig( format="[%(asctime)s.%(msecs)03d] [%(name)s] [%(levelname)s] | %(message)s", diff --git a/infinigen_examples/generate_individual_assets.py b/infinigen_examples/generate_individual_assets.py index 89a0c50a0..7c9684d02 100644 --- a/infinigen_examples/generate_individual_assets.py +++ b/infinigen_examples/generate_individual_assets.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this # source tree. @@ -35,6 +35,7 @@ level=logging.INFO, ) +import infinigen from infinigen.assets.lighting import ( hdri_lighting, holdout_lighting, @@ -47,15 +48,15 @@ from infinigen.assets.utils.misc import assign_material, subclasses from infinigen.core import init, surface from infinigen.core.init import configure_cycles_devices -from infinigen.core.placement import density, factory +from infinigen.core.placement import AssetFactory, density from infinigen.core.tagging import tag_system # noinspection PyUnresolvedReferences from infinigen.core.util import blender as butil from infinigen.core.util.camera import points_inview from infinigen.core.util.math import FixedSeed +from infinigen.core.util.test_utils import load_txt_list from infinigen.tools import export -from infinigen_examples.util.test_utils import load_txt_list logging.basicConfig( format="[%(asctime)s.%(msecs)03d] [%(name)s] [%(levelname)s] | %(message)s", @@ -63,30 +64,42 @@ level=logging.WARNING, ) +logger = logging.getLogger(__name__) + +OBJECTS_PATH = infinigen.repo_root() / "infinigen/assets/objects" +assert OBJECTS_PATH.exists(), OBJECTS_PATH + def build_scene_asset(args, factory_name, idx): - factory = None - for subdir in os.listdir("infinigen/assets"): + fac = None + for subdir in sorted(list(OBJECTS_PATH.iterdir())): + clsname = subdir.name.split(".")[0].strip() with gin.unlock_config(): - module = importlib.import_module(f'infinigen.assets.{subdir.split(".")[0]}') + module = importlib.import_module(f"infinigen.assets.objects.{clsname}") if hasattr(module, factory_name): - factory = getattr(module, factory_name) + fac = getattr(module, factory_name) + logger.info(f"Found {factory_name} in {subdir}") break - if factory is None: + logger.debug(f"{factory_name} not found in {subdir}") + if fac is None: raise ModuleNotFoundError(f"{factory_name} not Found.") + + if args.dryrun: + return + with FixedSeed(idx): - factory = factory(idx) + fac = fac(idx) try: if args.spawn_placeholder: - ph = factory.spawn_placeholder(idx, (0, 0, 0), (0, 0, 0)) - asset = factory.spawn_asset(idx, placeholder=ph) + ph = fac.spawn_placeholder(idx, (0, 0, 0), (0, 0, 0)) + asset = fac.spawn_asset(idx, placeholder=ph) else: - asset = factory.spawn_asset(idx) + asset = fac.spawn_asset(idx) except Exception as e: traceback.print_exc() - print(f"{factory}.spawn_asset({idx=}) FAILED!! {e}") + print(f"{fac}.spawn_asset({idx=}) FAILED!! {e}") raise e - factory.finalize_assets(asset) + fac.finalize_assets(asset) if args.fire: from infinigen.assets.fluid.fluid import set_obj_on_fire @@ -144,7 +157,7 @@ def build_scene_asset(args, factory_name, idx): return asset -def build_scene_surface(factory_name, idx): +def build_scene_surface(args, factory_name, idx): try: with gin.unlock_config(): scatter = importlib.import_module( @@ -154,6 +167,9 @@ def build_scene_surface(factory_name, idx): if not hasattr(scatter, "apply"): raise ValueError(f"{scatter} has no apply()") + if args.dryun: + return + bpy.ops.mesh.primitive_grid_add( size=10, x_subdivisions=400, y_subdivisions=400 ) @@ -190,6 +206,10 @@ def build_scene_surface(factory_name, idx): break else: raise Exception(f"{factory_name} not Found.") + + if args.dryrun: + return + if hasattr(template, "make_sphere"): asset = template.make_sphere() else: @@ -210,6 +230,8 @@ def build_and_save_asset(payload: dict): args = payload["args"] idx = payload["idx"] + logger.info(f"Building scene for {factory_name} {idx}") + if args.seed > 0: idx = args.seed @@ -226,7 +248,6 @@ def build_and_save_asset(payload: dict): ) scene.cycles.samples = args.samples butil.clear_scene() - configure_cycles_devices() if not args.fire: bpy.context.scene.render.film_transparent = args.film_transparent @@ -238,7 +259,12 @@ def build_and_save_asset(payload: dict): if "Factory" in factory_name: asset = build_scene_asset(args, factory_name, idx) else: - asset = build_scene_surface(factory_name, idx) + asset = build_scene_surface(args, factory_name, idx) + + if args.dryrun: + return + + configure_cycles_devices() with FixedSeed(args.lighting + idx): if args.hdri: @@ -424,22 +450,24 @@ def mapfunc(f, its, args): def main(args): bpy.context.window.workspace = bpy.data.workspaces["Geometry Nodes"] - init.apply_gin_configs("infinigen_examples/configs_indoor", skip_unknown=True) + init.apply_gin_configs( + ["infinigen_examples/configs_indoor", "infinigen_examples/configs_nature"], + skip_unknown=True, + ) surface.registry.initialize_from_gin() + if args.debug is not None: + for name in logging.root.manager.loggerDict: + if not name.startswith("infinigen"): + continue + if len(args.debug) == 0 or any(name.endswith(x) for x in args.debug): + logging.getLogger(name).setLevel(logging.DEBUG) + init.configure_blender() if args.gpu: init.configure_render_cycles() - extras = "[%(filename)s:%(lineno)d] " if args.loglevel == logging.DEBUG else "" - logging.basicConfig( - format=f"[%(asctime)s.%(msecs)03d] [%(name)s] [%(levelname)s] {extras}| %(message)s", - level=args.loglevel, - datefmt="%H:%M:%S", - ) - logging.getLogger("infinigen").setLevel(args.loglevel) - if ".txt" in args.factories[0]: name = args.factories[0].split(".")[-2].split("/")[-1] else: @@ -449,18 +477,26 @@ def main(args): args.output_folder = Path(os.getcwd()) / "outputs" path = Path(args.output_folder) / name - path.mkdir(exist_ok=True) + path.mkdir(exist_ok=True, parents=True) factories = list(args.factories) + if "ALL_ASSETS" in factories: - factories += [f.__name__ for f in subclasses(factory.AssetFactory)] + factories += [f.__name__ for f in subclasses(AssetFactory)] factories.remove("ALL_ASSETS") + logger.warning( + "ALL_ASSETS is deprecated. Use `-f tests/assets/list_nature_meshes.txt` and `-f tests/assets/list_indoor_meshes.txt` instead." + ) if "ALL_SCATTERS" in factories: - factories += [f.stem for f in Path("surfaces/scatters").iterdir()] + factories += [f.stem for f in Path("infinigen/assets/scatters").iterdir()] factories.remove("ALL_SCATTERS") if "ALL_MATERIALS" in factories: factories += [f.stem for f in Path("infinigen/assets/materials").iterdir()] factories.remove("ALL_MATERIALS") + logger.warning( + "ALL_MATERIALS is deprecated. Use `-f tests/assets/list_nature_materials.txt` and `-f tests/assets/list_indoor_materials.txt` instead." + ) + has_txt = ".txt" in factories[0] if has_txt: factories = [ @@ -474,9 +510,13 @@ def main(args): ] mapfunc(build_and_save_asset, targets, args) + if args.dryrun: + return + for j, fac in enumerate(factories): fac_path = args.output_folder / fac - assert fac_path.exists() + fac_path.mkdir(exist_ok=True, parents=True) + f"{fac_path} does not exist" if has_txt: for i in range(args.n_images): @@ -630,14 +670,6 @@ def make_args(): "-D", "--seed", type=int, default=-1, help="Run a specific seed." ) parser.add_argument("-N", "--no-mod", action="store_true", help="No modification") - parser.add_argument( - "-d", - "--debug", - action="store_const", - dest="loglevel", - const=logging.DEBUG, - default=logging.INFO, - ) parser.add_argument("-H", "--hdri", action="store_true", help="add_hdri") parser.add_argument( "-T", "--three_point", action="store_true", help="add three-point lighting" @@ -655,6 +687,12 @@ def make_args(): "--export", type=str, default=None, choices=export.FORMAT_CHOICES ) parser.add_argument("--export_texture_res", type=int, default=1024) + parser.add_argument("-d", "--debug", type=str, nargs="*", default=None) + parser.add_argument( + "--dryrun", + action="store_true", + help="Import assets but do not run them. Used for testing.", + ) return init.parse_args_blender(parser) diff --git a/infinigen_examples/generate_indoors.py b/infinigen_examples/generate_indoors.py index a557f4232..bc95cc72f 100644 --- a/infinigen_examples/generate_indoors.py +++ b/infinigen_examples/generate_indoors.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -20,9 +20,11 @@ import gin import numpy as np +from infinigen import repo_root from infinigen.assets import lighting from infinigen.assets.materials import invisible_to_camera from infinigen.assets.objects.wall_decorations.skirting_board import make_skirting_board +from infinigen.assets.placement.floating_objects import FloatingObjectPlacement from infinigen.assets.utils.decorate import read_co from infinigen.core import execute_tasks, init, placement, surface, tagging from infinigen.core import tags as t @@ -42,6 +44,10 @@ from infinigen.core.util import blender as butil from infinigen.core.util import pipeline from infinigen.core.util.camera import points_inview +from infinigen.core.util.test_utils import ( + import_item, + load_txt_list, +) from infinigen.terrain import Terrain from infinigen_examples.indoor_constraint_examples import home_constraints from infinigen_examples.util import constraint_util as cu @@ -134,6 +140,7 @@ def add_coarse_terrain(): terrain, terrain_mesh = p.run_stage( "terrain", add_coarse_terrain, use_chance=False, default=(None, None) ) + p.run_stage("sky_lighting", lighting.sky_lighting.add_lighting, use_chance=False) consgraph = home_constraints() @@ -307,6 +314,32 @@ def solve_small(): "populate_assets", populate.populate_state_placeholders, state, use_chance=False ) + def place_floating(): + pholder_rooms = butil.get_collection("placeholders:room_meshes") + pholder_cutters = butil.get_collection("placeholders:portal_cutters") + pholder_objs = butil.get_collection("placeholders") + + obj_fac_names = load_txt_list( + repo_root() / "tests" / "assets" / "list_indoor_meshes.txt" + ) + facs = [import_item(path) for path in obj_fac_names] + + placer = FloatingObjectPlacement( + generators=facs, + camera=cam_util.get_camera(0, 0), + background_objs=list(pholder_cutters.objects) + list(pholder_rooms.objects), + collision_objs=list(pholder_objs.objects), + ) + + placer.place_objs( + num_objs=overrides.get("num_floating", 20), + normalize=overrides.get("norm_floating_size", True), + collision_placed=overrides.get("enable_collision_floating", False), + collision_existing=overrides.get("enable_collision_solved", False), + ) + + p.run_stage("floating_objs", place_floating, use_chance=False, default=state) + door_filter = r.Domain({t.Semantics.Door}, [(cl.AnyRelation(), stages["rooms"])]) window_filter = r.Domain( {t.Semantics.Window}, [(cl.AnyRelation(), stages["rooms"])] diff --git a/infinigen_examples/generate_material_balls.py b/infinigen_examples/generate_material_balls.py index 4e5145958..87e2b67aa 100644 --- a/infinigen_examples/generate_material_balls.py +++ b/infinigen_examples/generate_material_balls.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this # source tree. @@ -44,12 +44,12 @@ # noinspection PyUnresolvedReferences from infinigen.core.util import blender as butil from infinigen.core.util.math import FixedSeed +from infinigen.core.util.test_utils import load_txt_list from infinigen_examples.generate_individual_assets import ( adjust_cam_distance, make_args, setup_camera, ) -from infinigen_examples.util.test_utils import load_txt_list logging.basicConfig( format="[%(asctime)s.%(msecs)03d] [%(name)s] [%(levelname)s] | %(message)s", diff --git a/infinigen_examples/generate_nature.py b/infinigen_examples/generate_nature.py index e1b164060..0f76b2617 100644 --- a/infinigen_examples/generate_nature.py +++ b/infinigen_examples/generate_nature.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. import argparse @@ -642,15 +642,16 @@ def add_corals(target): ), ) - p.run_stage("wind", lambda: weather.WindEffector(np.randint(1e7))(0)) - p.run_stage("turbulence", lambda: weather.TurbulenceEffector(np.randint(1e7))(0)) + p.run_stage("wind", lambda: weather.WindEffector(randint(1e7))(0)) + p.run_stage("turbulence", lambda: weather.TurbulenceEffector(randint(1e7))(0)) - overhead_emitter = butil.spawn_plane(location=Vector((0, 0, 5)), size=60) - butil.constrain_object( - overhead_emitter, "COPY_LOCATION", use_offset=True, target=camera_rigs[0] + overhead_emitter = weather.spawn_emitter( + camera_rigs[0], "plane", offset=Vector((0, 0, 5)), size=60 + ) + cube_emitter = weather.spawn_emitter( + camera_rigs[0], "cube", offset=Vector(), size=30 ) - cube_emitter = butil.spawn_cube(location=Vector(), size=30) butil.constrain_object( cube_emitter, "COPY_LOCATION", use_offset=True, target=camera_rigs[0] ) diff --git a/infinigen_examples/indoor_asset_semantics.py b/infinigen_examples/indoor_asset_semantics.py index 083bf3264..6f14df158 100644 --- a/infinigen_examples/indoor_asset_semantics.py +++ b/infinigen_examples/indoor_asset_semantics.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Alexander Raistrick diff --git a/infinigen_examples/indoor_constraint_examples.py b/infinigen_examples/indoor_constraint_examples.py index 4b6834a06..ece34eb15 100644 --- a/infinigen_examples/indoor_constraint_examples.py +++ b/infinigen_examples/indoor_constraint_examples.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen_examples/util/constraint_util.py b/infinigen_examples/util/constraint_util.py index 1dc75ce23..ca35dbe3c 100644 --- a/infinigen_examples/util/constraint_util.py +++ b/infinigen_examples/util/constraint_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/infinigen_examples/util/generate_indoors_util.py b/infinigen_examples/util/generate_indoors_util.py index 13cbb01ce..612d58b15 100644 --- a/infinigen_examples/util/generate_indoors_util.py +++ b/infinigen_examples/util/generate_indoors_util.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/pyproject.toml b/pyproject.toml index 55b620f17..8f355d1eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,18 +133,32 @@ exclude = [ "*/dependencies/", "infinigen/OcMesher", "infinigen/infinigen_gpl", + + # exclude copied-in external code + "infinigen/terrain/mesh_to_sdf", + "infinigen/terrain/mesher/_marching_cubes_lewiner*" ] [tool.ruff.lint] -select = ["E", "I", "F"] +select = [ + "E", + "I", + "F", + "S102", # no exec(), + "TID252", # relative imports only allowed for siblings + +] ignore = [ "E501", # over-length lines, formatter should handle it "E741", # ambigous variable name ] [tool.ruff.lint.per-file-ignores] -"__init__.py" = ["F401"] +"**/__init__.py" = [ + "F401", + "CPY001", # runs during PRs, but no need for copyright on boilerplate/often-empty __init__.py +] "infinigen/assets/*" = ["F841"] #transpiler currently creates lots of unused variables [tool.pytype] diff --git a/scripts/eevee_render.py b/scripts/eevee_render.py index 882b94ce5..b5be70fcc 100644 --- a/scripts/eevee_render.py +++ b/scripts/eevee_render.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/scripts/install/compile_terrain.sh b/scripts/install/compile_terrain.sh index 918efd2da..5f74dc267 100644 --- a/scripts/install/compile_terrain.sh +++ b/scripts/install/compile_terrain.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma diff --git a/setup.py b/setup.py index ea421ccd0..0717d2f05 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/assets/list_indoor_materials.txt b/tests/assets/list_indoor_materials.txt index 1b602059d..96f8d5802 100644 --- a/tests/assets/list_indoor_materials.txt +++ b/tests/assets/list_indoor_materials.txt @@ -31,4 +31,6 @@ infinigen.assets.materials.text infinigen.assets.materials.tile infinigen.assets.materials.tiled_wood infinigen.assets.materials.wood -infinigen.assets.materials.wood_old \ No newline at end of file +infinigen.assets.materials.wood_old +infinigen.assets.materials.bumpy_rubber_floor +infinigen.assets.materials.tiles.advanced_tiles diff --git a/tests/assets/list_scatters.txt b/tests/assets/list_scatters.txt new file mode 100644 index 000000000..a84b9ed98 --- /dev/null +++ b/tests/assets/list_scatters.txt @@ -0,0 +1,25 @@ +# infinigen.assets.scatters.coral_reef # too slow for unit tests +# infinigen.assets.scatters.chopped_trees # too slow for unit tests +# infinigen.assets.scatters.ground_mushroom # too slow for unit tests +infinigen.assets.scatters.clothes +infinigen.assets.scatters.decorative_plants +infinigen.assets.scatters.fern +infinigen.assets.scatters.flowerplant +infinigen.assets.scatters.grass +infinigen.assets.scatters.ground_leaves +infinigen.assets.scatters.ground_twigs +infinigen.assets.scatters.ivy +infinigen.assets.scatters.jellyfish +infinigen.assets.scatters.lichen +infinigen.assets.scatters.mollusk +infinigen.assets.scatters.monocots +infinigen.assets.scatters.moss +infinigen.assets.scatters.mushroom +infinigen.assets.scatters.pebbles +infinigen.assets.scatters.pine_needle +infinigen.assets.scatters.pinecone +infinigen.assets.scatters.seashells +infinigen.assets.scatters.seaweed +infinigen.assets.scatters.slime_mold +infinigen.assets.scatters.snow_layer +infinigen.assets.scatters.urchin diff --git a/tests/assets/test_materials_basic.py b/tests/assets/test_materials_basic.py index 0b50e5fb5..6d39fe451 100644 --- a/tests/assets/test_materials_basic.py +++ b/tests/assets/test_materials_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -9,7 +9,7 @@ import pytest from infinigen.core.util import blender as butil -from infinigen_examples.util.test_utils import import_item, load_txt_list, setup_gin +from infinigen.core.util.test_utils import import_item, load_txt_list, setup_gin def check_material_runs(pathspec): diff --git a/tests/assets/test_meshes_basic.py b/tests/assets/test_meshes_basic.py index 9ad36574a..72e13a70d 100644 --- a/tests/assets/test_meshes_basic.py +++ b/tests/assets/test_meshes_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -11,7 +11,7 @@ from infinigen.core import tagging from infinigen.core.util import blender as butil -from infinigen_examples.util.test_utils import import_item, load_txt_list, setup_gin +from infinigen.core.util.test_utils import import_item, load_txt_list, setup_gin def check_factory_runs(fac_class, seed1=0, seed2=0, distance_m=50): diff --git a/tests/assets/test_placeholders.py b/tests/assets/test_placeholders.py index d7f9f4e70..12e111bbc 100644 --- a/tests/assets/test_placeholders.py +++ b/tests/assets/test_placeholders.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan diff --git a/tests/assets/test_scatters_basic.py b/tests/assets/test_scatters_basic.py new file mode 100644 index 000000000..adaf1af51 --- /dev/null +++ b/tests/assets/test_scatters_basic.py @@ -0,0 +1,24 @@ +# Copyright (C) 2023, Princeton University. +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: Alexander Raistrick + +import pytest + +from infinigen.core.util import blender as butil +from infinigen.core.util.test_utils import import_item, load_txt_list, setup_gin + + +def check_scatter_runs(pathspec): + butil.clear_scene() + base_cube = butil.spawn_cube() + + scatter = import_item(pathspec) + scatter.apply(base_cube) + + +@pytest.mark.parametrize("pathspec", load_txt_list("tests/assets/list_scatters.txt")) +def test_scatter_runs(pathspec, **kwargs): + setup_gin("infinigen_examples/configs_nature", ["base_nature.gin"]) + check_scatter_runs(pathspec) diff --git a/tests/constraints/test_constraint_bounding.py b/tests/constraints/test_constraint_bounding.py index c75d73639..e8084caf2 100644 --- a/tests/constraints/test_constraint_bounding.py +++ b/tests/constraints/test_constraint_bounding.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/constraints/test_constraint_domain.py b/tests/constraints/test_constraint_domain.py index 6712b1bde..07d33bfbc 100644 --- a/tests/constraints/test_constraint_domain.py +++ b/tests/constraints/test_constraint_domain.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/constraints/test_constraint_language.py b/tests/constraints/test_constraint_language.py index e5da111a7..9f091a1f0 100644 --- a/tests/constraints/test_constraint_language.py +++ b/tests/constraints/test_constraint_language.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/constraints/test_constraint_relations.py b/tests/constraints/test_constraint_relations.py index 873668a55..0af3294ec 100644 --- a/tests/constraints/test_constraint_relations.py +++ b/tests/constraints/test_constraint_relations.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/constraints/test_reldom.py b/tests/constraints/test_reldom.py index 4819cf6e6..35635597e 100644 --- a/tests/constraints/test_reldom.py +++ b/tests/constraints/test_reldom.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/constraints/test_tags.py b/tests/constraints/test_tags.py index 2162e9d52..2042dfe50 100644 --- a/tests/constraints/test_tags.py +++ b/tests/constraints/test_tags.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/constraints/test_tagset_operations.py b/tests/constraints/test_tagset_operations.py index 02911b4e4..a11877d1c 100644 --- a/tests/constraints/test_tagset_operations.py +++ b/tests/constraints/test_tagset_operations.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/core/test_execute_tasks.py b/tests/core/test_execute_tasks.py index 0d36d2789..83136611c 100644 --- a/tests/core/test_execute_tasks.py +++ b/tests/core/test_execute_tasks.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -10,7 +10,7 @@ from infinigen.core import execute_tasks from infinigen.core.placement import camera -from infinigen_examples.util.test_utils import setup_gin +from infinigen.core.util.test_utils import setup_gin def test_compose_cube(): diff --git a/tests/core/test_gins.py b/tests/core/test_gins.py index c2c7d5564..b33164cf8 100644 --- a/tests/core/test_gins.py +++ b/tests/core/test_gins.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. @@ -8,7 +8,7 @@ import pytest import infinigen -from infinigen_examples.util.test_utils import setup_gin +from infinigen.core.util.test_utils import setup_gin nature_folder = "infinigen_examples/configs_nature" nature_gins = [p.name for p in (infinigen.repo_root() / nature_folder).glob("**/*.gin")] diff --git a/tests/core/test_tagging.py b/tests/core/test_tagging.py index 4560dec41..92f2f2992 100644 --- a/tests/core/test_tagging.py +++ b/tests/core/test_tagging.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/datagen/test_manage_jobs.py b/tests/datagen/test_manage_jobs.py index a4481ab43..b5f1f24cc 100644 --- a/tests/datagen/test_manage_jobs.py +++ b/tests/datagen/test_manage_jobs.py @@ -1,3 +1,11 @@ +# Copyright (C) 2024, Princeton University. + +# This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory +# of this source tree. + +# Authors: +# - Alexander Raistrick + import subprocess from pathlib import Path diff --git a/tests/integration/manual_integration_check.py b/tests/integration/manual_integration_check.py index 2f81450d4..c0c360141 100644 --- a/tests/integration/manual_integration_check.py +++ b/tests/integration/manual_integration_check.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: David Yan, Lahav Lipson (SLURM job parsing) diff --git a/tests/solver/test_asset_surfaces.py b/tests/solver/test_asset_surfaces.py index f8b8e249e..f3eb00e9c 100644 --- a/tests/solver/test_asset_surfaces.py +++ b/tests/solver/test_asset_surfaces.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/solver/test_constraint_evaluator.py b/tests/solver/test_constraint_evaluator.py index e08840b74..895e4e06b 100644 --- a/tests/solver/test_constraint_evaluator.py +++ b/tests/solver/test_constraint_evaluator.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. from functools import partial diff --git a/tests/solver/test_greedy_partition.py b/tests/solver/test_greedy_partition.py index e5806a4f0..ed0494b83 100644 --- a/tests/solver/test_greedy_partition.py +++ b/tests/solver/test_greedy_partition.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/solver/test_greedy_stages.py b/tests/solver/test_greedy_stages.py index d74e21a76..29c733934 100644 --- a/tests/solver/test_greedy_stages.py +++ b/tests/solver/test_greedy_stages.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/solver/test_greedy_substitutions.py b/tests/solver/test_greedy_substitutions.py index ee75fff4e..92cb05bf9 100644 --- a/tests/solver/test_greedy_substitutions.py +++ b/tests/solver/test_greedy_substitutions.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/solver/test_stable_against.py b/tests/solver/test_stable_against.py index 27679655d..a02cd3e84 100644 --- a/tests/solver/test_stable_against.py +++ b/tests/solver/test_stable_against.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Karhan Kayan diff --git a/tests/solver/test_state_def.py b/tests/solver/test_state_def.py index e57de90dd..f2f7b2e8e 100644 --- a/tests/solver/test_state_def.py +++ b/tests/solver/test_state_def.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree. diff --git a/tests/test_terrain_basic.py b/tests/test_terrain_basic.py index bcb0d49ec..2ff9c5013 100644 --- a/tests/test_terrain_basic.py +++ b/tests/test_terrain_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. # Authors: Zeyu Ma @@ -10,8 +10,8 @@ from infinigen.core.surface import registry from infinigen.core.util.organization import Task +from infinigen.core.util.test_utils import setup_gin from infinigen.terrain import Terrain -from infinigen_examples.util.test_utils import setup_gin @pytest.mark.skip diff --git a/tests/tools/test_export.py b/tests/tools/test_export.py index a3ffbb72a..d3f63fadf 100644 --- a/tests/tools/test_export.py +++ b/tests/tools/test_export.py @@ -1,4 +1,4 @@ -# Copyright (c) Princeton University. +# Copyright (C) 2024, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory # of this source tree.