module: bsdfs.models

class bsdfs.models.EnvironmentMap(*args, **kwargs)

Bases: common.models.UserBase

Environment map used with a BRDF

get_next_by_added(*moreargs, **morekwargs)
get_previous_by_added(*moreargs, **morekwargs)
shapebsdflabel_mf_set
shapebsdflabel_wd_set
user
class bsdfs.models.ShapeBsdfLabelBase(*args, **kwargs)

Bases: shapes.models.MaterialShapeLabelBase

Base class of BSDF labels

CORRECT_METHODS = (('A', 'admin'), ('C', 'CUBAM'), ('M', 'majority vote'))

‘A’: an admin corrected the label

INIT_METHODS = (('KM', 'k-means color, middle value gloss'), ('KR', 'k-means color, random gloss'))
class Meta
abstract = False
ordering = ['-edit_nnz', '-time_ms']
ShapeBsdfLabelBase.better_than(other)
ShapeBsdfLabelBase.envmap
ShapeBsdfLabelBase.get_color_correct_method_display(*moreargs, **morekwargs)
ShapeBsdfLabelBase.get_entry_dict()
ShapeBsdfLabelBase.get_gloss_correct_method_display(*moreargs, **morekwargs)
ShapeBsdfLabelBase.get_init_method_display(*moreargs, **morekwargs)
ShapeBsdfLabelBase.get_next_by_added(*moreargs, **morekwargs)
ShapeBsdfLabelBase.get_previous_by_added(*moreargs, **morekwargs)
ShapeBsdfLabelBase.get_quality_method_display(*moreargs, **morekwargs)
ShapeBsdfLabelBase.image_blob

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

ShapeBsdfLabelBase.init_method_to_str = {'KR': 'k-means color, random gloss', 'KM': 'k-means color, middle value gloss'}
ShapeBsdfLabelBase.mark_invalid(*args, **kwargs)
ShapeBsdfLabelBase.mturk_assignment
ShapeBsdfLabelBase.qualities

This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.

ShapeBsdfLabelBase.user
class bsdfs.models.ShapeBsdfLabel_mf(*args, **kwargs)

Bases: bsdfs.models.ShapeBsdfLabelBase

Microfacet BSDF model ** CURRENTLY UNUSED **

BSDF_TYPES = (('P', 'plastic'), ('C', 'conductor'))
bsdf_type_to_str = {'P': 'plastic', 'C': 'conductor'}
envmap
get_bsdf_type_display(*moreargs, **morekwargs)
get_color_correct_method_display(*moreargs, **morekwargs)
get_gloss_correct_method_display(*moreargs, **morekwargs)
get_init_method_display(*moreargs, **morekwargs)
get_next_by_added(*moreargs, **morekwargs)
get_previous_by_added(*moreargs, **morekwargs)
get_quality_method_display(*moreargs, **morekwargs)
get_thumb_template()
image_blob

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

mturk_assignment
static mturk_submit(user, hit_contents, results, time_ms, time_active_ms, version, mturk_assignment=None, **kwargs)

Add new instances from a mturk HIT after the user clicks [submit]

qualities

This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.

shape
str_to_bsdf_type = {'conductor': 'C', 'plastic': 'P'}
type_name()
user
static version()
class bsdfs.models.ShapeBsdfLabel_wd(*args, **kwargs)

Bases: bsdfs.models.ShapeBsdfLabelBase

Ward BSDF model.

Note: This is the “balanced” ward-duel model with energy balance at all angles from [Geisler-Moroder, D., and Dur, A. A new ward brdf model with bounded albedo. In Computer Graphics Forum (2010), vol. 29, Wiley Online Library, pp. 1391-1398.]. We use the implementation from Mitsuba available at http://www.mitsuba-renderer.org.

alpha()
c()
c_edits()
color_distance(bsdf)
colormath_lab()
colormath_rgb()
d()
d_edits()
envmap
get_color_correct_method_display(*moreargs, **morekwargs)
get_gloss_correct_method_display(*moreargs, **morekwargs)
get_init_method_display(*moreargs, **morekwargs)
get_next_by_added(*moreargs, **morekwargs)
get_previous_by_added(*moreargs, **morekwargs)
get_quality_method_display(*moreargs, **morekwargs)
get_thumb_template()
gloss_distance(bsdf)
image_blob

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

materialshape_set
mturk_assignment
static mturk_submit(user, hit_contents, results, time_ms, time_active_ms, version, experiment, mturk_assignment=None, **kwargs)

Add new instances from a mturk HIT after the user clicks [submit]

qualities

This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.

rho()
rho_d()
rho_s()
save(*args, **kwargs)
shape
user
v()

Return the V component of HSV, in the range [0, 1]

static version()
class bsdfs.models.ShapeBsdfQuality(*args, **kwargs)

Bases: common.models.ResultBase

Vote on whether or not a BSDF matches its shape. The foreign key to the BSDF is generic since there are multiple BSDF models.

bsdf

Provides a generic relation to any object through content-type/object-id fields.

content_type
get_next_by_added(*moreargs, **morekwargs)
get_previous_by_added(*moreargs, **morekwargs)
get_quality_method_display(*moreargs, **morekwargs)
get_thumb_template()
has_color()
has_gloss()
mturk_assignment
static mturk_submit(user, hit_contents, results, time_ms, time_active_ms, version, experiment, mturk_assignment=None, **kwargs)

Add new instances from a mturk HIT after the user clicks [submit]

user