Spaces:
Running
Running
Remove water_dispenser from the Library (part 2)
Browse filesFiles changed (3)
7 unmodified lines891011111213147 unmodified lines "recliner": "physics fix pending", "shopping_basket_gray_dinosaur": "removed from the Library", "sleeve_ironing_board": "physics fix pending", "tabletop_catapult": "physics fix pending" "tabletop_catapult": "physics fix pending", "water_dispenser": "removed from the Library" }}2 unmodified lines34567867891011121315 unmodified lines293031303233343533363738394013 unmodified lines54555653575859605758596061626331 unmodified lines959697989910010110210310410510610710810911011111210210310411311411511611711811912012112212312412512612712812913013113213313413558 unmodified lines1941951961691971981992002011742022032042056 unmodified lines2122132141872152161892172182191912202212222232242251932262271951962282292302312322331 unmodified line2352362372042382392402412422432442452462472482492502512522532082542552562572 unmodified linesRenders each SimReady package with its own materials (MDL glass, liquids, OpenPBR),the way it looks in sim, instead of the simplified preview GLB: a three-quarter viewfrom the front-right (the package's simready:assetFrame:forwardDirection when it hasone, else -Y), lit by an HDRI dome that isn't visible in the image, a shadow on aninvisible floor (RTX matte object / shadow catcher) and a transparent background, sothe page supplies the backdrop in both themes.one, else -Y), lit by an HDRI dome that isn't visible in the image, standing on aneutral light-grey studio floor with a faint grid (like NVIDIA SimReady Central'scards). From this camera height the floor fills the whole frame and blurs into a softgrey with distance, so no separate backdrop is needed. Path-tracing settings followTyler: max bounces 4, specular/transmission bounces 6, subsurface scattering on.
Run on a GPU machine with Isaac Sim 6.x (pip install or /opt/IsaacSim/python.sh): python isaac_thumbs.py <assets_dir> <out_dir> <hdri.exr> [--renderer PathTracing] [asset ...]15 unmodified linesap.add_argument("--render-size", type=int, default=1024, help="rendered size before downscaling")ap.add_argument("--renderer", default="PathTracing", choices=["PathTracing", "RaytracedLighting"])ap.add_argument("--spp", type=int, default=256, help="path-tracing samples per pixel")ap.add_argument("--dome", type=float, default=1000.0, help="HDRI dome intensity")ap.add_argument("--dome", type=float, default=1500.0, help="HDRI dome intensity")ap.add_argument("--floor-target", default="158,159,161", help="sRGB the far floor is balanced to (neutral grey)")ap.add_argument("--sun", type=float, default=0.0, help="optional key light intensity (distant light)")ap.add_argument("--exposure", type=float, default=None, help="tonemapper exposure (EV) override")ap.add_argument("--fill", type=float, default=0.86, help="share of the frame the asset fills")ap.add_argument("--fill", type=float, default=0.92, help="share of the frame the bounding box fills")ap.add_argument("--floor-grey", type=float, default=0.62, help="floor albedo (sRGB 0-1)")ap.add_argument("--azimuth", type=float, default=35.0, help="degrees right of the front")ap.add_argument("--elevation", type=float, default=24.0)ap.add_argument("--fov", type=float, default=22.0, help="vertical field of view, degrees")13 unmodified linesimport omni.replicator.core as rep # noqa: E402import omni.usd # noqa: E402from PIL import Image # noqa: E402from pxr import Gf, Sdf, Usd, UsdGeom, UsdLux, Vt # noqa: E402from pxr import Gf, Sdf, Usd, UsdGeom, UsdLux, UsdShade, Vt # noqa: E402
settings = carb.settings.get_settings()for key, value in { "/rtx/post/backgroundZeroAlpha/enabled": True, # background alpha 0 "/rtx/post/backgroundZeroAlpha/outputAlphaInComposite": True, "/rtx/matteObject/enabled": True, # floor = shadow catcher only "/rtx/post/matteObject/enableShadowCatcher": True, "/rtx/pathtracing/totalSpp": args.spp, "/rtx/pathtracing/spp": 16, "/rtx/pathtracing/maxBounces": args.max_bounces, # Tyler's settings31 unmodified lines sun.CreateIntensityAttr(args.sun) sun.CreateAngleAttr(8.0)
# Studio floor: light grey with a faint grid, one texture tile = 8 x 8 cells.GRID = os.path.abspath(os.path.join(args.out_dir, "..", "_studio_grid.png"))if not os.path.exists(GRID): g = np.full((1024, 1024), args.floor_grey * 255, np.float32) for k in range(0, 1024, 128): g[k:k + 2, :] *= 0.9 g[:, k:k + 2] *= 0.9 g[0:3, :] *= 0.93 g[:, 0:3] *= 0.93 Image.fromarray(g.clip(0, 255).astype(np.uint8), "L").convert("RGB").save(GRID)
floor = UsdGeom.Mesh.Define(stage, "/World/Floor")floor.CreatePointsAttr([(-1, -1, 0), (1, -1, 0), (1, 1, 0), (-1, 1, 0)])floor.CreateFaceVertexCountsAttr([4])floor.CreateFaceVertexIndicesAttr([0, 1, 2, 3])UsdGeom.PrimvarsAPI(floor.GetPrim()).CreatePrimvar( "isMatteObject", Sdf.ValueTypeNames.Bool, UsdGeom.Tokens.constant).Set(True)floor_xf = floor.AddTransformOp()floor_st = UsdGeom.PrimvarsAPI(floor.GetPrim()).CreatePrimvar("st", Sdf.ValueTypeNames.TexCoord2fArray, UsdGeom.Tokens.vertex)floor_st.Set([(0, 0), (1, 0), (1, 1), (0, 1)])mat = UsdShade.Material.Define(stage, "/World/Looks/Floor")surf = UsdShade.Shader.Define(stage, "/World/Looks/Floor/Surface")surf.CreateIdAttr("UsdPreviewSurface")surf.CreateInput("roughness", Sdf.ValueTypeNames.Float).Set(0.6)surf.CreateInput("metallic", Sdf.ValueTypeNames.Float).Set(0.0)reader = UsdShade.Shader.Define(stage, "/World/Looks/Floor/St")reader.CreateIdAttr("UsdPrimvarReader_float2")reader.CreateInput("varname", Sdf.ValueTypeNames.String).Set("st")tex = UsdShade.Shader.Define(stage, "/World/Looks/Floor/Grid")tex.CreateIdAttr("UsdUVTexture")tex.CreateInput("file", Sdf.ValueTypeNames.Asset).Set(GRID)tex.CreateInput("wrapS", Sdf.ValueTypeNames.Token).Set("repeat")tex.CreateInput("wrapT", Sdf.ValueTypeNames.Token).Set("repeat")tex.CreateInput("sourceColorSpace", Sdf.ValueTypeNames.Token).Set("sRGB")tex.CreateInput("st", Sdf.ValueTypeNames.Float2).ConnectToSource(reader.ConnectableAPI(), "result")surf.CreateInput("diffuseColor", Sdf.ValueTypeNames.Color3f).ConnectToSource(tex.ConnectableAPI(), "rgb")mat.CreateSurfaceOutput().ConnectToSource(surf.ConnectableAPI(), "surface")UsdShade.MaterialBindingAPI.Apply(floor.GetPrim()).Bind(mat)
cam = UsdGeom.Camera.Define(stage, "/World/Cam")APERTURE = 20.95558 unmodified lines view = (horiz * math.cos(e) + up * math.sin(e)).GetNormalized()
# distance: smallest that keeps every bounding-box corner inside the frame pts = corners(rng) box = corners(rng)
def fits(d): eye = centre + view * d m = Gf.Matrix4d().SetLookAt(eye, centre, up) for p in pts: for p in box: q = m.Transform(p) if -q[2] <= 1e-6 or max(abs(q[0]), abs(q[1])) / -q[2] > half: return False6 unmodified lines dist = hi_d eye = centre + view * dist cam_xf.Set(Gf.Matrix4d().SetLookAt(eye, centre, up).GetInverse()) cam.CreateClippingRangeAttr(Gf.Vec2f(max(dist * 0.02, 1e-4), dist + size * 20)) cam.CreateClippingRangeAttr(Gf.Vec2f(max(dist * 0.02, 1e-4), dist + size * 200))
# floor under the asset, big enough to catch the whole shadow # floor under the asset, reaching well past the top of the frame; grid cells of # of 1-2-5 cm steps, about a tenth of the asset's size base = rng.GetMin()[2] if up_axis == "Z" else rng.GetMin()[1] s = size * 8 half_w = size * 60 want = size / 10 # about ten cells across the asset mag = 10 ** math.floor(math.log10(want)) cell = min((m * mag for m in (1, 2, 5, 10)), key=lambda c: abs(math.log(c / want))) reps = 2 * half_w / (8 * cell) if up_axis == "Z": floor_xf.Set(Gf.Matrix4d().SetScale(Gf.Vec3d(s, s, 1)) * Gf.Matrix4d().SetTranslate(Gf.Vec3d(centre[0], centre[1], base))) pts = [(centre[0] + x, centre[1] + y, base) for x, y in ((-half_w, -half_w), (half_w, -half_w), (half_w, half_w), (-half_w, half_w))] else: rot = Gf.Matrix4d().SetRotate(Gf.Rotation(Gf.Vec3d(1, 0, 0), -90)) floor_xf.Set(Gf.Matrix4d().SetScale(Gf.Vec3d(s, s, 1)) * rot * Gf.Matrix4d().SetTranslate(Gf.Vec3d(centre[0], base, centre[2]))) pts = [(centre[0] + x, base, centre[2] - y) for x, y in ((-half_w, -half_w), (half_w, -half_w), (half_w, half_w), (-half_w, half_w))] floor.GetPointsAttr().Set(pts) floor_st.Set([(0, 0), (reps, 0), (reps, reps), (0, reps)])
subframes = max(1, args.spp // 16) if args.renderer == "PathTracing" else 8 rep.orchestrator.step(rt_subframes=subframes)1 unmodified line if img.ndim != 3 or img.shape[2] < 4: print(f"THUMB_FAIL {name}: no image", flush=True) continue out = Image.fromarray(img[..., :4].astype(np.uint8), "RGBA") # White balance + exposure: the HDRI is warm and assets differ in size, so scale each # image (in linear light) until the far floor in the top corners is the same neutral # grey in every thumbnail. Products get the same correction, so whites stay white. rgb_img = img[..., :3].astype(np.float32) / 255 lin = np.where(rgb_img <= 0.04045, rgb_img / 12.92, ((rgb_img + 0.055) / 1.055) ** 2.4) k = max(4, R // 10) ref = np.concatenate([lin[:k, :k].reshape(-1, 3), lin[:k, -k:].reshape(-1, 3)]) target = np.array([int(v) for v in args.floor_target.split(",")], np.float32) / 255 target = np.where(target <= 0.04045, target / 12.92, ((target + 0.055) / 1.055) ** 2.4) gain = np.clip(target / np.maximum(np.median(ref, axis=0), 1e-4), 0.4, 4.0) lin = lin * gain srgb = np.where(lin <= 0.0031308, lin * 12.92, 1.055 * np.power(np.clip(lin, 0, None), 1 / 2.4) - 0.055) out = Image.fromarray((np.clip(srgb, 0, 1) * 255 + 0.5).astype(np.uint8), "RGB") if args.size != R: out = out.resize((args.size, args.size), Image.LANCZOS) out.save(f"{args.out_dir}/{name}.webp", quality=90) print(f"THUMB_OK {name} {i}/{len(todo)}", flush=True) print(f"THUMB_OK {name} {i}/{len(todo)} gain={np.round(gain, 2).tolist()} cell={cell}", flush=True)
rep.orchestrator.wait_until_complete()print("THUMBS DONE", flush=True)30152 unmodified lines301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730152 unmodified lines"qcode": "Q445454","rigid_bodies": 3},"simready.hf.projectsim.simready-assets.manual_die_cutting_machine.2026.11.24_00": {"category": "Machinery","class": "die cutting machine","date": "2026-11-16","extents": [0.47300014,0.44023263,0.73462546],"joints": [{"lower": 0.0,"name": "handle_stroke","type": "hinge","upper": 65.89014434814453},{"lower": 0.0,"name": "press_travel","type": "slider","upper": 0.04699999839067459}],"license": "CC-BY-4.0","mass": 48.6368,"mounted": false,"qcode": "Q445454","rigid_bodies": 3},"simready.hf.projectsim.simready-assets.manual_tile_cutter.2026.11.20_00": {"benchmark": {"passed": true,tools/hidden.json+2-1
tools/isaac_thumbs.py+69-23
tools/meta_cache.json+29