blenderproc.python.modules.provider.sampler.ShellModule module

class blenderproc.python.modules.provider.sampler.ShellModule.ShellModule(config)[source]

Bases: blenderproc.python.modules.main.Provider.Provider

Samples a point from the space in between two spheres with a double spherical angle with apex in the center of those two spheres. Has option for uniform elevation sampling.

Example 1: Sample a point from a space in between two structure-defining spheres defined by min and max radii, that lies in the sampling cone and not in the rejection cone defined by the min and max elevation degrees.

{
  "provider": "sampler.Shell",
  "center": [0, 0, -0.8],
  "radius_min": 1,
  "radius_max": 4,
  "elevation_min": 40,
  "elevation_max": 89
}

Configuration:

Parameter Description Type
center Center which is shared by both structure-defining spheres. mathutils.Vector
radius_min Radius of a smaller sphere. float
radius_max Radius of a bigger sphere. float
elevation_min Minimum angle of elevation in degrees: defines slant height of the sampling cone. Range: [0, 90]. float
elevation_max Maximum angle of elevation in degrees: defines slant height of the rejection cone. Range: [0, 90]. float
uniform_volume Uniformly sample points in the volume of the shell. Thereby, more points will be close to outer sphere. Default: False bool
run()[source]

Sample a point from a space in between two halfspheres with the same center point and a sampling cone with apex in this center.

Returns:A sampled point. Type: mathutils.Vector.