Skip to content

Commit

Permalink
Merge pull request #321 from princeton-vl/develop
Browse files Browse the repository at this point in the history
Release v1.11
  • Loading branch information
pvl-bot authored Nov 11, 2024
2 parents 4a7dc1a + d6f3165 commit 1d51693
Show file tree
Hide file tree
Showing 220 changed files with 1,371 additions and 1,153 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
# default set of ruff rules with GitHub Annotations
ruff check --output-format=github .
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install infinigen & dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ WORKDIR /opt/infinigen
COPY . .
RUN conda init bash && \
. ~/.bashrc && \
conda create --name infinigen python=3.10 -y && \
conda create --name infinigen python=3.11 -y && \
conda activate infinigen && \
pip install -e ".[dev]"
5 changes: 4 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,7 @@ v1.10.0

v1.10.1
- Fix missing validity checks for camera-rig cameras which are not the 0th index
- Fix missing seat in dining chair
- Fix missing seat in dining chair

v1.11.0
- Update to Blender == 4.2.0
4 changes: 3 additions & 1 deletion docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ First, download the repo and set up a conda environment (you may need to [instal
```bash
git clone https://github.com/princeton-vl/infinigen.git
cd infinigen
conda create --name infinigen python=3.10
conda create --name infinigen python=3.11
conda activate infinigen
```

Expand All @@ -87,6 +87,8 @@ On Linux / Mac / WSL:
```bash
git clone https://github.com/princeton-vl/infinigen.git
cd infinigen
conda create --name infinigen python=3.11
conda activate infinigen
```

Then, install using one of the options below:
Expand Down
2 changes: 1 addition & 1 deletion infinigen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from pathlib import Path

__version__ = "1.10.1"
__version__ = "1.11.0"


def repo_root():
Expand Down
3 changes: 1 addition & 2 deletions infinigen/assets/fluid/fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
from infinigen.core.nodes.node_wrangler import (
Nodes,
NodeWrangler,
infer_input_socket,
infer_output_socket,
)
from infinigen.core.nodes.utils import infer_input_socket, infer_output_socket
from infinigen.core.util import blender as butil
from infinigen.core.util.blender import deep_clone_obj
from infinigen.core.util.logging import Timer
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/fluid/liquid_particle_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ def liquid_particle_material(nw: NodeWrangler):
input_kwargs={
"Base Color": (1.0000, 1.0000, 1.0000, 1.0000),
"Subsurface Color": (0.7147, 0.6062, 0.8000, 1.0000),
"Specular": 0.0886,
"Specular IOR Level": 0.0886,
"Roughness": 0.2705 + (0.1 * normal()),
"Sheen Tint": 0.0000,
"Clearcoat Roughness": 0.0000,
"Coat Roughness": 0.0000,
"IOR": 1.2000,
"Transmission": 0.2818 + (0.1 * normal()),
"Transmission Weight": 0.2818 + (0.1 * normal()),
},
attrs={"distribution": "MULTI_GGX"},
)
Expand Down
2 changes: 2 additions & 0 deletions infinigen/assets/lighting/holdout_lighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def holdout_lighting(

def add_lighting():
nw = NodeWrangler(bpy.context.scene.world.node_tree)
if not os.path.exists(HOLDOUT_RESOURCES):
return
surface = holdout_lighting(nw)
nw.new_node(Nodes.WorldOutput, input_kwargs={"Surface": surface})
bpy.context.scene.world.cycles_visibility.camera = False
2 changes: 1 addition & 1 deletion infinigen/assets/materials/aluminumdisp2tut.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def geo_aluminumdisp2tut(nw: NodeWrangler, rand=False, **input_kwargs):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
)

Expand Down
4 changes: 4 additions & 0 deletions infinigen/assets/materials/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ def shader_art_composite(nw: NodeWrangler, **kwargs):

return shader_art_composite

@classmethod
def make_sphere(cls):
return text.make_sphere()


class ArtRug(ArtComposite):
@property
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/bark.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def geo_bark(nw: NodeWrangler):
Nodes.GroupOutput,
input_kwargs={
"Geometry": capture_attribute.outputs["Geometry"],
"Attribute": capture_attribute.outputs["Attribute"],
"Attribute": capture_attribute.outputs[1],
},
attrs={"is_active_output": True},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/bark_birch.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def geo_bark_birch(nw, selection=None):
Nodes.GroupOutput,
input_kwargs={
"Geometry": group,
"initial_position": capture_attribute.outputs["Attribute"],
"initial_position": capture_attribute.outputs[1],
},
)

Expand Down
10 changes: 5 additions & 5 deletions infinigen/assets/materials/bark_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def nodegroup_primary_voronoi(nw):
expose_input=[
("NodeSocketVector", "Coordinate", (0.0, 0.0, 0.0)),
("NodeSocketFloat", "Texture Scale", 20.0),
("NodeSocketFloatFactor", "Randomness", 1.0),
("NodeSocketFloat", "Randomness", 1.0),
],
)

Expand Down Expand Up @@ -401,7 +401,7 @@ def nodegroup_voronoi(nw):
expose_input=[
("NodeSocketVector", "Coordinate", (0.0, 0.0, 0.0)),
("NodeSocketFloat", "Texture Scale", 5.0),
("NodeSocketFloatFactor", "Randomness", 1.0),
("NodeSocketFloat", "Randomness", 1.0),
],
)

Expand Down Expand Up @@ -525,7 +525,7 @@ def nodegroup_random_bark_geo(nw):
("NodeSocketFloat", "Noise Scale", 2.0),
("NodeSocketFloat", "Noise Amount", 1.0),
("NodeSocketFloat", "Texture Scale", 30.0),
("NodeSocketFloatFactor", "Randomness", 1.0),
("NodeSocketFloat", "Randomness", 1.0),
("NodeSocketFloat", "Value", 0.05),
("NodeSocketFloat", "Mix Weight", 0.1),
("NodeSocketFloat", "Scale", 15.0),
Expand Down Expand Up @@ -814,7 +814,7 @@ def geo_bark_random(nw, base_color, geo_params, selection=None):
geo_params["Primary Voronoi Scale"],
),
(
"NodeSocketFloatFactor",
"NodeSocketFloat",
"Primary Voronoi Randomness",
geo_params["Primary Voronoi Randomness"],
),
Expand Down Expand Up @@ -920,7 +920,7 @@ def geo_bark_random(nw, base_color, geo_params, selection=None):
Nodes.GroupOutput,
input_kwargs={
"Geometry": group,
"initial_position": capture_attribute.outputs["Attribute"],
"initial_position": capture_attribute.outputs[1],
},
)

Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/basic_bsdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def shader_basic_bsdf(nw):
"Base Color": color,
"Roughness": np.clip(normal(0.6, 0.3), 0.05, 0.95),
"Metallic": uniform(0, 1) if uniform() < 0.3 else 0,
"Subsurface": 0 if uniform() < 0.8 else uniform(0, 0.2),
"Subsurface Weight": 0 if uniform() < 0.8 else uniform(0, 0.2),
},
attrs={"subsurface_method": "BURLEY"},
)
Expand Down
6 changes: 3 additions & 3 deletions infinigen/assets/materials/beverage_fridge_shaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def shader_white_metal_001(nw: NodeWrangler):
"Base Color": colorramp.outputs["Color"],
"Subsurface Color": (1.0000, 1.0000, 1.0000, 1.0000),
"Metallic": 1.0000,
"Specular": 1.0000,
"Specular IOR Level": 1.0000,
"Roughness": 0.1000,
"Anisotropic": 0.9182,
"Sheen": 0.0455,
"Sheen Tint": 0.4948,
"Sheen Weight": 0.0455,
"Sheen Tint": (0, 0, 0, 0.4948),
},
attrs={"subsurface_method": "BURLEY"},
)
Expand Down
12 changes: 8 additions & 4 deletions infinigen/assets/materials/bird.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ def shader_bird_body(nw: NodeWrangler, rand=True, kind="duck", **input_kwargs):
Nodes.PrincipledBSDF,
input_kwargs={
"Base Color": group,
"Subsurface IOR": 0.0,
"Specular": 0.0,
"IOR": 0.0,
"Specular IOR Level": 0.0,
"Roughness": 1.0,
},
)
Expand Down Expand Up @@ -487,7 +487,11 @@ def shader_bird_feather(

principled_bsdf = nw.new_node(
Nodes.PrincipledBSDF,
input_kwargs={"Base Color": (mix, "Result"), "Specular": 0.0, "Roughness": 1.0},
input_kwargs={
"Base Color": (mix, "Result"),
"Specular IOR Level": 0.0,
"Roughness": 1.0,
},
attrs={"subsurface_method": "BURLEY"},
)

Expand Down Expand Up @@ -605,7 +609,7 @@ def shader_bird_claw(nw: NodeWrangler, rand=True, **input_kwargs):
Nodes.PrincipledBSDF,
input_kwargs={
"Base Color": (0.0091, 0.0091, 0.0091, 1.0),
"Specular": 0.0,
"Specular IOR Level": 0.0,
"Roughness": 0.4409,
},
)
Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/bumpy_rubber_floor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def nodegroup_node_group(nw: NodeWrangler):
("NodeSocketColor", "Base Color", (0.8000, 0.8000, 0.8000, 1.0000)),
("NodeSocketFloat", "Scale", 1.0000),
("NodeSocketFloat", "Seed", 0.0000),
("NodeSocketFloatFactor", "Roughness", 0.4000),
("NodeSocketFloat", "Roughness", 0.4000),
],
)

Expand Down Expand Up @@ -71,7 +71,7 @@ def nodegroup_node_group(nw: NodeWrangler):
Nodes.PrincipledBSDF,
input_kwargs={
"Base Color": hue_saturation_value,
"Specular": 0.9,
"Specular IOR Level": 0.9,
"Roughness": group_input.outputs["Roughness"],
},
)
Expand Down
8 changes: 4 additions & 4 deletions infinigen/assets/materials/ceramic.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def shader_ceramic(
Nodes.PrincipledBSDF,
input_kwargs={
"Roughness": roughness,
"Clearcoat": 1,
"Clearcoat Roughness": clearcoat_roughness,
"Specular": 1,
"Coat Weight": 1,
"Coat Roughness": clearcoat_roughness,
"Specular IOR Level": 1,
"Base Color": color,
"Subsurface": uniform(0.02, 0.05),
"Subsurface Weight": uniform(0.02, 0.05),
"Subsurface Radius": (0.02, 0.02, 0.02),
},
)
Expand Down
8 changes: 4 additions & 4 deletions infinigen/assets/materials/cobble_stone.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ def geo_cobblestone(nw: NodeWrangler, selection=None, random_seed=0, geometry=Tr
# depth of stone
dep_sto = nw.new_value(U(0.02, 0.04), "dep_sto")

group_input = nw.new_node(
Nodes.GroupInput, expose_input=[("NodeSocketGeometry", "Geometry", None)]
)

noise_texture = nw.new_node(
Nodes.NoiseTexture,
input_kwargs={
Expand Down Expand Up @@ -196,6 +192,10 @@ def geo_cobblestone(nw: NodeWrangler, selection=None, random_seed=0, geometry=Tr
if not geometry:
return colorramp

group_input = nw.new_node(
Nodes.GroupInput, expose_input=[("NodeSocketGeometry", "Geometry", None)]
)

multiply_1 = nw.new_node(
Nodes.VectorMath,
input_kwargs={0: colorramp.outputs["Color"], 1: normal},
Expand Down
6 changes: 5 additions & 1 deletion infinigen/assets/materials/cracked_ground.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ def shader_cracked_ground(nw: NodeWrangler, random_seed=0):

principled_bsdf = nw.new_node(
Nodes.PrincipledBSDF,
input_kwargs={"Base Color": mix_2, "Specular": 0.2000, "Roughness": 0.9000},
input_kwargs={
"Base Color": mix_2,
"Specular IOR Level": 0.2000,
"Roughness": 0.9000,
},
)

material_output = nw.new_node(
Expand Down
4 changes: 2 additions & 2 deletions infinigen/assets/materials/dishwasher_shaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ def shader_white_metal_002(nw: NodeWrangler):
"Base Color": colorramp.outputs["Color"],
"Subsurface Color": (1.0000, 1.0000, 1.0000, 1.0000),
"Metallic": 1.0000,
"Specular": 1.0000,
"Specular IOR Level": 1.0000,
"Roughness": 0.1000,
"Anisotropic": 0.9182,
"Sheen": 0.0455,
"Sheen Weight": 0.0455,
"Sheen Tint": 0.4948,
},
attrs={"subsurface_method": "BURLEY"},
Expand Down
8 changes: 6 additions & 2 deletions infinigen/assets/materials/fabrics/coarse_knit_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ def shader_fabric_base(

principled_bsdf = nw.new_node(
Nodes.PrincipledBSDF,
input_kwargs={"Base Color": reroute, "Specular": 0.6309, "Roughness": 0.9945},
input_kwargs={
"Base Color": reroute,
"Specular IOR Level": 0.6309,
"Roughness": 0.9945,
},
)

combine_color = nw.new_node(
Expand All @@ -160,7 +164,7 @@ def shader_fabric_base(
Nodes.PrincipledBSDF,
input_kwargs={
"Base Color": combine_color,
"Specular": 0.6309,
"Specular IOR Level": 0.6309,
"Roughness": 0.9945,
},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/fabrics/general_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def func_fabric(nw: NodeWrangler, **kwargs):
input_kwargs={
"Base Color": mix_3.outputs[2],
"Roughness": map_range_2.outputs["Result"],
"Sheen": 1.0000,
"Sheen Weight": 1.0000,
"Sheen Tint": 1.0000,
},
)
Expand Down
2 changes: 1 addition & 1 deletion infinigen/assets/materials/fabrics/sofa_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def shader_sofa_fabric(nw: NodeWrangler, scale=1, **kwargs):
input_kwargs={
"Base Color": brick_texture.outputs["Color"],
"Roughness": 0.8624,
"Sheen": 1.0000,
"Sheen Weight": 1.0000,
},
)

Expand Down
5 changes: 2 additions & 3 deletions infinigen/assets/materials/fabrics/velvet.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,11 @@ def shader_velvet(nw: NodeWrangler, **kwargs):
Nodes.PrincipledBSDF,
input_kwargs={
"Base Color": mix_2.outputs[2],
"Specular": 0.0000,
"Specular IOR Level": 0.0000,
"Roughness": uniform(0.4, 0.9),
"Anisotropic": 0.7614,
"Anisotropic Rotation": 1.0000,
"Sheen": 16.2273,
"Sheen Tint": 1.0000,
"Sheen Weight": 16.2273,
},
)

Expand Down
6 changes: 5 additions & 1 deletion infinigen/assets/materials/fish_eye_shader.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@ def shader_eyeball_fish(nw: NodeWrangler):

principled_bsdf = nw.new_node(
Nodes.PrincipledBSDF,
input_kwargs={"Base Color": mix_8, "Specular": 0.0000, "Roughness": 0.0000},
input_kwargs={
"Base Color": mix_8,
"Specular IOR Level": 0.0000,
"Roughness": 0.0000,
},
)

glossy_bsdf = nw.new_node("ShaderNodeBsdfGlossy")
Expand Down
Loading

0 comments on commit 1d51693

Please sign in to comment.