Описание методов, применяемых в работе
Данный проект содержит внушительный объем всевозможных методов моделирования, визуализации и создания анимации, благодаря которым, был достигнут конечный результат. Для лучшего восприятия, весь спектр методов будет разбит на категории: 1. Основные плагины [Меню: Customize / Plug – in Manager в Autodesk 3ds Max]: § ACADBLOCKS.DLU § ADTOBJECTS.DLU § ADTTRANS.DFL § APOLLO3.DLV § ARCHMAT.DLT § ATSMAX.GUP § AUCTRL.DLC § AUTOCAMMAX.GUP § AVI.BMI § BATCHRENDERUTIL.DLU § BIPED.DLC § BITMAPPROXIES.DLU § BLOCK.DLC § BMP.BMI § BODY_OBJECT.DLO § BRICKS.DLT § EDITPOLYMOD.DLM § EGGSHAPE.DLOEPOLY.DLO § FFDMOD.DLOFLTGUP.GUP § FLTTOOLS.DLU § MB_SELECT.GUP § MENTALRAY.DLZ § MODS.DLM § MORPHER.DLM § MOTION.DLC § MRSHADERS.DLT § SURFACEARRIVE.DLO § NATURE.DLO § SWIRL.DLT § UTILITY.DLU § VRAYMULTIMAP2013.DLT § VRAYPTEX2013.DLT § VRAYSKY2013.DLT § VRENDER.2013.DLT § VRMLEXP.DLE § X_MESH.DLS 1.1. Внешний вид меню Plug-in Manage (Рис.1.1): Рис.1.1
2. Модификаторы [Вкладка: Modify / Modifer List в Autodesk 3ds Max]: § UVW Map § Edit Poly § Editable poly § Bend § FFD 3x3x3 § FFD (Box) § VRayDisplacementMod § MassFX RBody § Shell § Welder § XForm § Flex 2.2. Внешний вид вкладки Modifer List (Рис.1.2): Рис.1.2
3. Материалы текстурирования и их настройки [Меню: Material Editor / State Material Editor]: § Asphalt (Рис.1.3):
Рис.1.3
§ Textured Plastic (Рис.1.4):
Рис.1.4
§ Black lac (Рис.1.5):
Рис.1.5
§ RT_aluminium (Рис.1.6):
Рис.1.6
§ Rubber_by_Monaro_PL (Рис.1.7):
Рис.1.7
§ Brickred_VrayDirt (Рис.1.8):
Рис.1.8
§ Acid glasss (Рис.1.9):
Рис.1.9
§ Material #57 (Рис.1.10):
Рис.1.10
§ MAIN MATERIAL (only modify this one!) (Рис.1.11):
Рис.1.11
§ Circular_pavement (Рис.1.12):
Рис.1.12
§ Asphalt_parking (Рис.1.13):
Рис.1.13
§ Rectangular Pavel (Рис.1.14):
Рис.1.14
§ Blue Glass (Рис.1.15):
Рис.1.15
§ Standard_10 (Рис.1.16):
Рис.1.16
§ Duc_Red (Рис.1.17):
Рис.1.17
4. Настройка визуализатора (Vray) [Меню: Rendering / Render Setup… или HotKey F10 в Autodesk 3ds Max]: 4.1. Основные настройки рендера (Рис.1.18):
Рис.1.18
4.2. Выбор основного и вторичного визуализаторов (рендера), в нашем случае – V-ray Adv 2.40.03 и V-ray RT 2.40.03 соответственно (Рис.1.19): Рис.1.19 4.3. Настройки Vray:: Global switches (Рис.1.20):
Рис.1.20
4.4. Настройки Vray:: Image sampler (Antialiasing) (Рис.1.21): Рис.1.21 4.5. Настройки Vray:: Adaptive DMC image sampler (Рис.1.22):
Рис.1.22
4.6. Настройки Vray:: Color Mapping (Рис.1.23):
Рис.1.23
4.7. Основная вкладка Inderect illumination [Vray:: Inderect illumination (GI)] (Рис.1.24):
Рис.1.24
4.8. Основная вкладка Inderect illumination [Vray:: Irradiance map] (Рис.1.25):
Рис.1.25
4.9. Основная вкладка Inderect illumination [Vray:: Light cache] (Рис.1.26):
Рис.1.26 4.10. Настройки Setting [Render Setup] (Рис.1.27):
Рис.1.27
5. MAXScript: § List.Styles.ms § Flightstudio.ms § Vraylightlister.ms § Vrayutils.ms § Vrsceneexport.ms 5.1. Фрагмент листинга основного MAXScript для визуализации – Vraylightister.ms: -- MacroScript File -- Created: Jan 15 2002 -- Last Modified: May 05 2007 -- Light Lister Script 2.8 -- Backwards compatibility helper functions if (substituteString==undefined) do ( global substituteString fn substituteString srcstr fromstr tostr =( local result=srcstr local fromIndex
while ((fromIndex=findString result fromstr)!=undefined) do ( result=replace result fromIndex fromstr.count tostr )
result ) )
macroScript VRayLightLister enabledIn:#("max") --pfb: 2003.12.12 added product switch category:"VRay" ButtonText:"V-Ray Light Lister" Icon:#("Lights",7) (
struct VRayLightListerStruct (GlobalLightParameters, LightInspectorSetup, LightInspectorFloater, ShadowPlugins, \ ShadowPluginsName, maxLightsList, LSLightsList, SkyLightsList, SunLightsList, enableUIElements, \ LuminairesList, maxLightsRC, CreateLightRollout, UIControlList, DeleteCallback, disableUIElements, \ LightInspectorListRollout, LLUndoStr, count, lbcount, lightIndex, decayStrings, totalLightCount, \ miLightsList, getLightProp, setLightProp, setShdProp, getShdProp, fnShadowClass, enableRefreshBtn, \ mrSkyLightsList, mrSunLightsList, mrSkyPortalLightsList, MRSkyPortal_ShadowSamples, MRSkyPortal_Modes, \ VRayLightsList, VRayIESLightsList, VRayAmbientLightsList, VRaySunSkyLightsList, yOffset, LineOffset)
global vrayLLister, vrayLListerYOffset if vrayLLister == undefined or debug == true do vrayLLister = VRayLightListerStruct()
-- Strings for Localization
vrayLLister.decayStrings = #("None","Inverse","Inv. Square") vrayLLister.LLUndoStr = "LightLister"
local dialogUp = false
-- End Strings
-- Positioning to help localization
vrayLListerYOffset = 0 vrayLLister.yOffset = vrayLListerYOffset vrayLLister.LineOffset = 0
-- Useful Functions
fn subtractFromArray myArray mySub = ( tmpArray = #() for i in myArray do append tmpArray i for i in mySub do
( itemNo = finditem tmpArray i local newArray = #() if itemNo!= 0 do ( for j in 1 to (itemNo-1) do append newArray tmpArray[j] for j in (itemNo+1) to tmpArray.count do append newArray tmpArray[j] tmpArray = newArray ) ) tmpArray )
fn SortNodeArrayByName myArray = ( qsort myArray (fn myname v1 v2 = (if v1.name < v2.name then 0 else 1)) myArray )
fn copyArray array1 = for i in array1 collect i
fn wrapString inString = ( local string1In = "\\" local string1Out = "\\\\" local string2In = "\"" local string2Out = "\\\"" local temp_text_string = substituteString inString string1In string1Out temp_text_string = substituteString temp_text_string string2In string2Out temp_text_string = string2In + temp_text_string + string2In temp_text_string -- return value )
fn disableUIElements array1 = for i in array1 do execute ("maxLightsRollout." + i as string + ".enabled = false") vrayLLister.disableUIElements = disableUIElements
fn enableRefreshBtn lightobj = ( if (vrayLLister.GetLightProp lightObj #useGlobalShadowSettings) == true do ( vrayLLister.LightInspectorSetup.BtnReload.Checked = true ) ) vrayLLister.enableRefreshBtn = enableRefreshBtn
fn getLightProp obj prop = ( if (isProperty obj prop) and not (isProperty obj #delegate) then getProperty obj prop else if isProperty obj #delegate then if isProperty obj.delegate prop then getProperty obj.delegate prop else undefined else undefined ) vrayLLister.getLightProp = getLightProp
fn setLightProp obj prop val = ( if (isProperty obj prop) and not (isProperty obj #delegate) then setProperty obj prop val else if isProperty obj #delegate then if isProperty obj.delegate prop then setProperty obj.delegate prop val else undefined else undefined ) vrayLLister.setLightProp = setLightProp
fn getShdProp obj prop = ( if (isProperty obj #shadowGenerator) and not (isProperty obj #delegate) then if (isProperty obj.ShadowGenerator prop) do getProperty obj.ShadowGenerator prop else if isProperty obj #delegate then if isProperty obj.delegate #ShadowGenerator then if (isProperty obj.delegate.ShadowGenerator prop) do getProperty obj.delegate.ShadowGenerator prop else undefined else undefined ) vrayLLister.getShdProp = getShdProp
fn setShdProp obj prop val = ( if (isProperty obj #shadowGenerator) and not (isProperty obj #delegate) then if (isProperty obj.ShadowGenerator prop) do ( setProperty obj.ShadowGenerator prop val vrayLLister.enableRefreshBtn obj ) else if isProperty obj #delegate then if isProperty obj.delegate #ShadowGenerator then if (isProperty obj.delegate.ShadowGenerator prop) do ( setProperty obj.delegate.ShadowGenerator prop val vrayLLister.enableRefreshBtn obj ) else undefined else undefined ) vrayLLister.setShdProp = setShdProp
fn fnShadowClass obj = classof (vrayLLister.getLightProp obj #shadowGenerator) vrayLLister.fnShadowClass = fnShadowClass
-- Hardcoded shadow plugins to the ones available
vrayLLister.ShadowPlugins = #(Adv__Ray_Traced, mental_ray_Shadow_Map, Area_Shadows, shadowMap, raytraceShadow, VRayShadow, VRayShadowMap) vrayLLister.ShadowPluginsName = #("Adv. Ray Traced", "mental_ray_Shadow_Map", "Area Shadows", "Shadow Map", "Raytrace Shadow", "VRayShadow", "VRayShadowMap")
/* -- uncomment if you want the Blur Shadows vrayLLister.ShadowPlugins = #(Adv__Ray_Traced, mental_ray_Shadow_Map, Area_Shadows, Blur_Adv__Ray_Traced, shadowMap, raytraceShadow, VRayShadow, VRayShadowMap) vrayLLister.ShadowPluginsName = #("Adv. Ray Traced", "mental_ray_Shadow_Map", "Area Shadows", "Blur Adv. Ray Traced","Shadow Map", "Raytrace Shadow", "VRayShadow", "VRayShadowMap") */ vrayLLister.MRSkyPortal_ShadowSamples = for i = 1 to 10 collect (2^i) as string vrayLLister.MRSkyPortal_Modes = #("Existing", "Envir.", "Custom") -- correspond to mode values of 2, 0, 1
-- Main Function
local CreateLightRollout
fn createLightRollout myCollection selectionOnly:false = ( vrayLLister.LightInspectorSetup.pbar.visible = true
-- Class Definitions
maxLights = #(TargetDirectionallight, targetSpot, Directionallight, Omnilight, freeSpot) SkyLights = #(IES_Sky, Texture_Sky, Skylight) SunLights = #(IES_Sun) -- AB: Jun 20, 2002 LSLights = #(Free_Area, Target_Area, Free_Linear, Target_Linear, Free_Point, Target_Point, Free_Sphere, Target_Sphere, Free_Disc, Target_Disc, Free_Cylinder, Target_Cylinder) Luminaires = #(Luminaire) mrLights = #(miAreaLight, miAreaLightomni) mrSkyLight = #(mr_sky) mrSunLight = #(mr_sun) mrSkyPortalLight = #(mr_sky_portal) VRayLights = #(VRayLight) VRayIESLights = #(VRayIES) VRayAmbientLights = #(VRayAmbientLight) VRaySunSkyLights = #(VRaySun)
-- Scene parser
try (SceneLights = myCollection as array) catch (if (classof myCollection == SelectionSet) do (SceneLights = myCollection)) sceneMaxLights = #() sceneLSLights = #() sceneSkyLights = #() sceneSunLights = #() sceneLuminaires = #() scenemiLights = #() scenemrSkyLights = #() scenemrSunLights = #() scenemrSkyPortalLights = #() sceneVRayLights = #() sceneVRayIESLights = #() sceneVRayAmbientLights = #() sceneVRaySunSkyLights = #()
for i in SceneLights do ( LightClass = classof i if findItem MaxLights LightClass!= 0 do append sceneMaxLights i if findItem LSLights LightClass!= 0 do append sceneLSLights i if findItem SkyLights LightClass!= 0 do append sceneSkyLights i if findItem SunLights LightClass!= 0 do append sceneSunLights i if findItem Luminaires LightClass!= 0 do append sceneLuminaires i if findItem mrLights LightClass!= 0 do append scenemiLights i if findItem mrSkyLight LightClass!= 0 do append scenemrSkyLights i if findItem mrSunLight LightClass!= 0 do append scenemrSunLights i if findItem mrSkyPortalLight LightClass!= 0 do append scenemrSkyPortalLights i if findItem VRayLights LightClass!= 0 do append sceneVRayLights i if findItem VRayIESLights LightClass!= 0 do append sceneVRayIESLights i if findItem VRayAmbientLights LightClass!= 0 do append sceneVRayAmbientLights i if findItem VRaySunSkyLights LightClass!= 0 do append sceneVRaySunSkyLights i )
-- Collect Light Instances and build array to be displayed
tmpParser = #(\ tmpsceneMaxLights = copyArray sceneMaxLights, \ tmpscenemiLights = copyArray scenemiLights, \ tmpscenemrSkyLights = copyArray scenemrSkyLights, \ tmpscenemrSunLights = copyArray scenemrSunLights, \ tmpscenemrSkyPortalLights = copyArray scenemrSkyPortalLights, \ tmpsceneLSLights = copyArray sceneLSLights, \ tmpsceneSkyLights = copyArray sceneSkyLights, \ tmpsceneSunLights = copyArray sceneSunLights, \ tmpsceneLuminaires = copyArray sceneLuminaires, \ tmpsceneVRayLights = copyArray sceneVRayLights, \ tmpsceneVRayIESLights = copyArray sceneVRayIESLights, \ tmpsceneVRayAmbientLights = copyArray sceneVRayAmbientLights, \ tmpsceneVRaySunSkyLights = copyArray sceneVRaySunSkyLights \ )
ListParser = #(\ vrayLLister.maxLightsList = #(), \ vrayLLister.miLightsList = #(), \ vrayLLister.mrSkyLightsList = #(), \ vrayLLister.mrSunLightsList = #(), \ vrayLLister.mrSkyPortalLightsList = #(), \ vrayLLister.LSLightsList = #(), \ vrayLLister.SkyLightsList = #(), \ vrayLLister.SunLightsList = #(), \ vrayLLister.LuminairesList = #(), \ vrayLLister.VRayLightsList = #(), \ vrayLLister.VRayIESLightsList = #(), \ vrayLLister.VRayAmbientLightsList = #(), \ vrayLLister.VRaySunSkyLightsList = #() \ )
for i in 1 to tmpParser.count do ( while tmpParser[i].count > 0 do ( tmpNode = tmpParser[i][1].baseObject depends = refs.dependentnodes tmpNode discard = #() for k in depends do if classof k!= classof tmpNode or (superclassof k!= light and superclassof k!= helper) do append discard k for k in depends do try ( if classof k == DaylightAssemblyHead or classof k == ParamBlock2ParamBlock2 then append discard k else if k.AssemblyMember and not k.AssemblyHead and classof k.parent!= DaylightAssemblyHead do append discard k ) catch() depends2 = subtractFromArray depends discard depends = SortNodeArrayByName depends2 if depends.count > 0 do append listParser[i] depends tmpParser[i] = subtractFromArray tmpParser[i] (discard + depends) ) )
vrayLLister.totalLightCount = vrayLLister.maxLightsList.count + \ vrayLLister.LSLightsList.count + \ vrayLLister.SkyLightsList.count + \ vrayLLister.SunLightsList.count + \ vrayLLister.LuminairesList.count + \ vrayLLister.miLightsList.count + \ vrayLLister.mrSkyLightsList.count + \ vrayLLister.mrSkyPortalLightsList.count + \ vrayLLister.mrSunLightsList.count + \ vrayLLister.VRayLightsList.count + \ vrayLLister.VRayIESLightsList.count + \ vrayLLister.VRayAmbientLightsList.count + \ vrayLLister.VRaySunSkyLightsList.count
-- build controls and rollouts
-- MAX Lights
vrayLLister.maxLightsRC = rolloutCreator "maxLightsRollout" "Lights" -- Localize the 2nd string only vrayLLister.maxLightsRC.begin() -- print vrayLLister.maxLightsRC.str.count
vrayLLister.maxLightsRC.addText "fn clearCheckButtons = for i in vrayLLister.LightInspectorListRollout.controls do if classof i == checkButtonControl do if i.checked do i.checked = false\n"
vrayLLister.count = 1 vrayLLister.lbCount = 1 vrayLLister.LightIndex = #() vrayLLister.UIControlList = #(#(),#())
struct td (label, offset) struct titleTemplate (maxLights, lsLights, miLights, luminaires, sunLights, skyLights, mrSkyLights, mrSunLights, mrSkyPortalLights, vrayLights, vrayIESLights, vrayAmbientLights, vraySunSkyLights) -- Start Localization local titleTemplates = titleTemplate \ vrayLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Color" 160, td "Temperature" 188, td "Units" 264, td "Shadows" 362, td "Subdivs" 408, td "Bias" 466, td "Invisible" 522, td "Skylight" 566, td "Diff." 624, td "Spec." 648, td "Reflect." 676, td "Caust. subd." 714) \ vrayIESLights:#(td "On" 8, td "Name" 28, td "Power" 102, td "Color" 160, td "Temperature" 188, td "Shadows" 262, td "Subdivs" 308, td "Bias" 366, td "Diff." 428, td "Spec." 452, td "Use shape" 482, td "Area spec." 536, td "Caust. subd." 590) \ vrayAmbientLights:#(td "On" 8, td "Name" 28, td "Intensity" 102, td "Color" 160, td "Caust. subd." 188) \ vraySunSkyLights:#(td "On" 8, td "Name" 28, td "Intens. Mult." 100, td "Size Mult." 166, td "Sh. Subdivs" 218, td "Sh. Bias" 280, td "Invisible" 332, td "Turbidity" 374, td "Ozone" 432, td "Ph. Emit Rad." 490, td "Sky Model "560, td "Horiz. Illum." 652, td "Caust. subd." 712) \ maxLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Color" 160, td "Shadows" 190, td "Map Size" 332, td "Bias" 390, td "Sm.Range" 443, td "Transp." 495, td "Int." 535, td "Qual." 570, td "Decay" 612, td "Start" 690, td "Caust. subd." 750) \ lsLights:#(td "On" 8, td "Name" 28, td "Intensity(cd)" 102, td "Color" 160, td "Shadows" 190, td "Map Size" 332, td "Bias" 390, td "Sm.Range" 443, td "Transp." 495, td "Int." 535, td "Qual." 570, td "Length" 612, td "Width/Radius" 671) \ miLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Color" 160, td "Shadows" 190, td "Map Size" 332, td "Bias" 390, td "Sm.Range" 443, td "Transp." 495, td "Int." 535, td "Qual." 570, td "Decay" 612, td "Start" 690) \ luminaires:#(td "Name" 28, td "Dimmer" 102, td "Color" 160) \ sunLights:#(td "On" 8, td "Name" 28, td "Intensity(lux)" 102, td "Color" 160, td "Shadows" 190, td "Map Size" 332, td "Bias" 390, td "Sm.Range" 443, td "Transp." 495, td "Int." 535, td "Qual." 570) \ skyLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Color" 160) \ mrSkyLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Haze" 161, td "H Height" 218, td "H Blur" 277, td "Ground" 333, td "Night" 382, td "Redness" 420, td "Saturation" 480, td "UseAerialPersp" 540, td "AerialPersp" 620) \ mrSunLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Shadows" 159, td "Softness" 211, td "Samples" 258, td "Targeted" 304, td "Distance" 353, td "Inherit" 426, td "Haze" 463, td "H Height" 513, td "Redness" 561, td "Saturation" 609, td "Use Targ" 663, td "Radius" 712) \ mrSkyPortalLights:#(td "On" 8, td "Name" 28, td "Multiplier" 102, td "Color" 160, td "Shadows" 190, td "Extend" 240, td "Samples" 280, td "Length" 335, td "Width" 408, td "Flip Flux" 478, td "Visible" 525, td "Transparency" 560, td "Source" 640) -- End Localization
fn WriteTitle labels:undefined = ( local lbName fn lbName = ( if vrayLLister.lbCount == undefined do vrayLLister.lbCount = 1 vrayLLister.lbCount += 1 ("LB" + vrayLLister.lbCount as string) as name )
if (labels!= undefined) do ( for i = 1 to labels.count do ( vrayLLister.maxLightsRC.addControl #label (lbname()) labels[i].label paramStr:(" align:#left offset:[" + labels[i].offset as string + "," + ((if (i == 1) then -3 else -18) + vrayLLister.yOffset + vrayLLister.LineOffset) as string + "]") ) ) )
fn CreateControls hasMultiplier:false hasColor:false hasShadow:false hasDecay:false hasSize:false isLuminaire:false isMRSky:false isMRSun:false isMRSkyPortal:false isVRayLight:false isVRayIESLight:false isVRayAmbientLight:false isVRaySun:false hasCausticsSubdivs:false = ( local lightClassName = ((classof vrayLLister.LightIndex[vrayLLister.count][1]) as string) as name
-- Selection Checkbutton local isLightSelected = false
for i in vrayLLister.LightIndex[vrayLLister.count] where (not isLightSelected) do isLightSelected = i.isSelected
vrayLLister.UIControlList[1][vrayLLister.count] = vrayLLister.LightIndex[vrayLLister.count][1] vrayLLister.UIControlList[2][vrayLLister.Count] = #()
vrayLLister.maxLightsRC.addControl #checkbutton (("LightSel" + vrayLLister.count as string) as name) "" \ paramStr:("checked:" + (isLightSelected as string) + " offset:[-5,"+ (-2+ vrayLLister.yOffset + vrayLLister.LineOffset) as string + "] align:#left" +\ " width:10 height:20 ") vrayLLister.maxLightsRC.addHandler (("LightSel" + vrayLLister.count as string) as name) #'changed state' filter:on \ codeStr: \ ( "clearCheckButtons();if state then (max modify mode;select vrayLLister.LightIndex[" + vrayLLister.count as string + "];LightSel" + (vrayLLister.count as string) + ".checked = true); else max select none" )
append vrayLLister.UIControlList[2][vrayLLister.Count] (("LightSel" + vrayLLister.count as string) as name)
-- On/Off if isLuminaire == false do ( local onProp = case lightClassName of ( #VRayIES: #enabled #VRayAmbientLight: #enabled #VRaySun: #enabled default: #on ) vrayLLister.maxLightsRC.addControl #checkbox (("LightOn" + vrayLLister.count as string) as name) "" \ paramStr:("checked:" + ((vrayLLister.GetlightProp vrayLLister.LightIndex[vrayLLister.count][1] onProp) as string) + " offset:[8,"+ (-22+ vrayLLister.yOffset) as string + "] width:18") vrayLLister.maxLightsRC.addHandler (("LightOn" + vrayLLister.count as string) as name) #'changed state' filter:on \ codeStr:("vrayLLister.setLightProp vrayLLister.LightIndex[" + vrayLLister.count as string + "][1] #" + onProp +" state") append vrayLLister.UIControlList[2][vrayLLister.Count] (("LightOn" + vrayLLister.count as string) as name) )
-- Light Name local isUsingEdittextOffset = 0
if vrayLLister.LightIndex[vrayLLister.count].count == 1 then ( local wrappedName = wrapString vrayLLister.LightIndex[vrayLLister.count][1].name vrayLLister.maxLightsRC.addControl #edittext (("LightName" + vrayLLister.count as string) as name) "" \ paramStr:(" text:" + wrappedName + " width:75 height:16 offset:[23,"+ (-21+ vrayLLister.yOffset) as string + "] height:21") vrayLLister.maxLightsRC.addHandler (("LightName" + vrayLLister.count as string) as name) #'entered txt' filter:on \ codeStr:("vrayLLister.LightIndex[" + vrayLLister.count as string + "][1].name = txt")
isUsingEdittextOffset = 4 ) else ( theNames = for j in vrayLLister.LightIndex[vrayLLister.count] collect j.name sort theNames namelist = "#(" for j in 1 to theNames.count do ( local wrappedName = wrapString theNames[j] append namelist wrappedName if j!= theNames.count do append namelist "," ) append namelist ")" vrayLLister.maxLightsRC.addControl #dropDownList (("LightName" + vrayLLister.count as string) as name) "" filter:on\ paramStr:(" items:" + NameList + " width:75 offset:[27,"+ (-22+ vrayLLister.yOffset) as string + "] ") )
append vrayLLister.UIControlList[2][vrayLLister.Count] (("LightName" + vrayLLister.count as string) as name)
-- Light Multiplier if hasMultiplier do ( local multiplierProp = case lightClassName of ( #Free_Area: #intensity #Target_Area: #intensity #Free_Linear: #intensity #Target_Linear: #intensity #Free_Point: #intensity #Target_Point: #intensity #Free_Sphere: #intensity #Target_Sphere: #intensity #Free_Disc: #intensity #Target_Disc: #intensity #Free_Cylinder: #intensity #Target_Cylinder: #intensity #Luminaire: #dimmer #mr_sun: #skymult #VRayIES: #power #VRayAmbientLight: #intensity #VRaySun: #intensity_multiplier default: #multiplier ) local multiplierEn = case lightClassName of ( #VRayLight: (not vrayLLister.LightIndex[vrayLLister.count][1].skylightPortal) default: true ) local multiplierMin = case lightClassName of ( #mr_sky: 0.0 #mr_sun: 0.0 #mr_sky_portal: 0.0 #VRayLight: -1000000000.0 #VRayIES: 0.0 #VRayAmbientLight: 0.0 #VRaySun: 0.0 default: -1000000.0 ) local multiplierMax = case lightClassName of ( #mr_sky: 15.0 #mr_sun: 10.0 #VRayLight: 1000000000.0 #VRayIES: 1000000000.0 #VRayAmbientLight: 1000000000.0 #VRaySun: 1000000000.0 default: 1000000.0 )
vrayLLister.maxLightsRC.addControl #spinner (("LightMult" + vrayLLister.count as string) as name) "" \ paramStr:("range:[" + multiplierMin as string + "," + multiplierMax as string + "," + \ (vrayLLister.getLightProp vrayLLister.LightIndex[vrayLLister.count][1] multiplierProp) as string + "] type:#float " + \ "fieldwidth:45 align:#left offset:[100," + (isUsingEdittextOffset-24+vrayLLister.yOffset) as string + "] enabled:" + multiplierEn as string) vrayLLister.maxLightsRC.addHandler (("LightMult" + vrayLLister.count as string) as name) #'changed val' filter:on \ codeStr:("vrayLLister.setLightProp vrayLLister.LightIndex[" + vrayLLister.count as string + "][1] #"+ multiplierProp + " val") append vrayLLister.UIControlList[2][vrayLLister.Count] (("LightMult" + vrayLLister.count as string) as name) )
-- Light Color if hasColor do ( local colorProp = case lightClassName of ( #Free_Light: #rgbFilter #Target_Light: #rgbFilter #Free_Area: #rgbFilter #Target_Area: #rgbFilter #Free_Linear: #rgbFilter #Target_Linear: #rgbFilter #Free_Point: #rgbFilter #Target_Point: #rgbFilter #Free_Sphere: #rgbFilter #Target_Sphere: #rgbFilter #Free_Disc: #rgbFilter #Target_Disc: #rgbFilter #Free_Cylinder: #rgbFilter #Target_Cylinder: #rgbFilter #Luminaire: #FilterColor #mr_sky_portal: #rgbFilter default: #Color ) local colorEn = case lightClassName of ( #VRayLight: ((vrayLLister.LightIndex[vrayLLister.count][1].baseobject.color_mode == 0) and (not vrayLLister.LightIndex[vrayLLister.count][1].skylightPortal)) #VRayIES: (vrayLLister.LightIndex[vrayLLister.count][1].baseobject.color_mode == 0) default: true ) vrayLLister.maxLightsRC.addControl #colorpicker (("LightCol" + vrayLLister.count as string) as name) "" \ paramStr:("color:" + (vrayLLister.getLightProp vrayLLister.LightIndex[vrayLLister.count][1] colorProp) as string + \ " offset:[158,"+ (-23+ vrayLLister.yOffset) as string + "] width:25 enabled:" + colorEn as string) vrayLLister.maxLightsRC.addHandler (("LightCol" + vrayLLister.count as string) as name) #'changed val' filter:on \ codeStr:("vrayLLister.setLightProp vrayLLister.LightIndex[" + vrayLLister.count as string + "][1] #" + colorProp + " val") append vrayLLister.UIControlList[2][vrayLLister.Count] (("LightCol" + vrayLLister.count as string) as name) ) 1.4. Обоснование выбора среды моделирования:
Autodesk 3ds Max — полнофункциональная профессиональная программная система для работы с трёхмерной графикой, разработанная компанией Autodesk Media & Entertainment. Работает в операционных системах Microsoft Windows и Windows NT (как в 32битных, так и в 64битных). Программа предназначена для художников, дизайнеров, архитекторов, работающих в телевидении, кино, разработке компьютерных игр, дизайне интерьера, техническом дизайне, рекламе для трёхмерного моделирования, анимации и визуализации. В программе реализована система реалистичного моделирования волос, меха, одежды, двуногих персонажей; моделирование тел, учитывающее внешнее воздействие на них; моделирование системы частиц и управление её поведением. 3ds Max располагает обширными средствами по созданию разнообразных по форме и сложности трёхмерных компьютерных моделей реальных или фантастических объектов окружающего мира с использованием разнообразных техник и механизмов, включающих следующие:
Программа 3ds max характеризуется продуманным интерфейсом и относительной легкостью в освоении. Этим можно объяснить ее большую популярность. Богатый инструментарий дает разработчику трехмерной графики возможность реализовать в программе любую задумку. 3ds max - лидер рынка программного обеспечения для трехмерного моделирования, анимации и визуализации. Возможности 3D Studio Max: Моделирование: - детализация геометрии с помощью Edit Poly Bridge; UV развертка и мэппинг: - Pelt Mapping определяет пользовательские "швы" (seams) и позволяет в соответствии с ними разворачивать UV; Скиннинг: - Skin Weight Tools для быстрого доступа к основному инструментарию скиннинга; Язык MAXScript: - автоматизация производственного потока за счет очереди запросов к базе данных с помощью MAXScript SQL Connect and Queries; Анимация персонажей: - форматы оцифровки движения включают HTR импорт/экспорт для 3ds max костей и импорт TRC данных. Импорт стандартных форматов оцифровки движения напрямую в 3ds max. Biped анимация: - улучшенное редактирование кривых Biped движения;
Визуализация: - освещение (radiosity adaptive subdivision);
|