mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 02:42:05 +02:00
[mesh] Texturing: set parameters for multi-band blending
Use only 3 parameters : useScore, multiBandDownscale, multiBandNbContrib
This commit is contained in:
parent
00188c9aef
commit
9f928e1ea0
2 changed files with 32 additions and 15 deletions
|
@ -414,7 +414,9 @@ class GroupAttribute(Attribute):
|
|||
return {name: attr.getPrimitiveValue(exportDefault=exportDefault) for name, attr in self._value.items() if not attr.isDefault}
|
||||
|
||||
def getValueStr(self):
|
||||
return self.attributeDesc.joinChar.join([v.getValueStr() for v in self._value.objects.values()])
|
||||
# sort values based on child attributes group description order
|
||||
sortedSubValues = [self._value.get(attr.name).getValueStr() for attr in self.attributeDesc.groupDesc]
|
||||
return self.attributeDesc.joinChar.join(sortedSubValues)
|
||||
|
||||
# Override value property
|
||||
value = Property(Variant, Attribute._get_value, _set_value, notify=Attribute.valueChanged)
|
||||
|
|
|
@ -86,24 +86,39 @@ class Texturing(desc.CommandLineNode):
|
|||
name='padding',
|
||||
label='Padding',
|
||||
description='''Texture edge padding size in pixel''',
|
||||
value=15,
|
||||
value=5,
|
||||
range=(0, 100, 1),
|
||||
uid=[0],
|
||||
advanced=True,
|
||||
),
|
||||
#desc.ListAttribute(
|
||||
# name='multiBandNbContrib',
|
||||
# elementDesc=desc.IntParam(name='levelContrib', label='', description='', value=1, uid=[0], range=(0, 50, 1)),
|
||||
# label='Nb Contribution per Band',
|
||||
# value=[1, 5, 10], # TODO: need support for default values on ListAttribute
|
||||
# description='Number of images to combine per band of frequencies to create the final texture.',
|
||||
#),
|
||||
desc.FloatParam(
|
||||
name='multiBandKernelSize',
|
||||
label='MultiBand Blending Kernel Size',
|
||||
description='''Kernel size for the lowest band of frequencies''',
|
||||
value=40.0,
|
||||
range=(0.0, 100.0, 1.0),
|
||||
desc.BoolParam(
|
||||
name='useScore',
|
||||
label='Use Score',
|
||||
description='Use triangles scores for multiband blending.',
|
||||
value=True,
|
||||
uid=[0],
|
||||
advanced=True,
|
||||
),
|
||||
desc.IntParam(
|
||||
name='multiBandDownscale',
|
||||
label='Multi Band Downscale',
|
||||
description='''Width of frequency bands for multiband blending''',
|
||||
value=2,
|
||||
range=(1, 10, 1),
|
||||
uid=[0],
|
||||
advanced=True,
|
||||
),
|
||||
desc.GroupAttribute(
|
||||
name="multiBandNbContrib",
|
||||
label="MultiBand contributions",
|
||||
groupDesc=[
|
||||
desc.IntParam(name="high", label="High Freq", description="High Frequency Band", value=1, uid=[0], range=None),
|
||||
desc.IntParam(name="midHigh", label="Mid-High Freq", description="Mid-High Frequency Band", value=5, uid=[0], range=None),
|
||||
desc.IntParam(name="midLow", label="Mid-Low Freq", description="Mid-Low Frequency Band", value=10, uid=[0], range=None),
|
||||
desc.IntParam(name="low", label="Low Freq", description="Low Frequency Band", value=0, uid=[0], range=None),
|
||||
],
|
||||
description='''Number of contributions per frequency band for multiband blending''',
|
||||
advanced=True,
|
||||
),
|
||||
desc.FloatParam(
|
||||
name='bestScoreThreshold',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue