Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal. #329

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kubric/core/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from kubric.core import traits as ktl
from kubric.core import assets
from kubric.core.assets import UndefinedAsset
from kubric import core
from kubric.core import color as core_color


class Material(assets.Asset):
Expand All @@ -30,15 +30,15 @@ class UndefinedMaterial(Material, UndefinedAsset):

class PrincipledBSDFMaterial(Material):
"""A physically based material suited for uniform colored plastic, rubber, metal, glass, etc..."""
color = ktl.RGBA(default_value=core.color.get_color("white"))
color = ktl.RGBA(default_value=core_color.get_color("white"))
metallic = tl.Float(0.)
specular = tl.Float(0.5)
specular_tint = tl.Float(0.)
roughness = tl.Float(0.4)
ior = tl.Float(1.45)
transmission = tl.Float(0)
transmission_roughness = tl.Float(0)
emission = ktl.RGBA(default_value=core.color.get_color("black"))
emission = ktl.RGBA(default_value=core_color.get_color("black"))


class FlatMaterial(Material):
Expand All @@ -50,7 +50,7 @@ class FlatMaterial(Material):
The indirect_visibility flag controls if the object casts shadows, can be seen in reflections and
emits light.
"""
color = ktl.RGBA(default_value=core.color.get_color("white"))
color = ktl.RGBA(default_value=core_color.get_color("white"))
holdout = tl.Bool(False)
indirect_visibility = tl.Bool(True)

Expand Down
1 change: 0 additions & 1 deletion kubric/core/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import traitlets as tl

import kubric # pylint: disable=unused-import
from kubric.utils import next_global_count
from kubric.core import color
from kubric.core import traits as ktl
Expand Down
4 changes: 2 additions & 2 deletions kubric/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from etils import epath
import numpy as np

from kubric import core
from kubric.core import scene as kubric_scene
from kubric import file_io

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -95,7 +95,7 @@ def setup(flags):

seed = flags.seed if flags.seed else np.random.randint(0, 2147483647)
rng = np.random.RandomState(seed=seed)
scene = core.scene.Scene.from_flags(flags)
scene = kubric_scene.Scene.from_flags(flags)
scene.metadata["seed"] = seed

scratch_dir, output_dir = setup_directories(flags)
Expand Down
Loading