class_basematerial3d.rst 170 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/BaseMaterial3D.xml.
  6. .. _class_BaseMaterial3D:
  7. BaseMaterial3D
  8. ==============
  9. **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`ORMMaterial3D<class_ORMMaterial3D>`, :ref:`StandardMaterial3D<class_StandardMaterial3D>`
  11. Default 3D rendering material.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Standard Material 3D <../tutorials/3d/standard_material_3d>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  26. | :ref:`Color<class_Color>` | :ref:`albedo_color<class_BaseMaterial3D_property_albedo_color>` | ``Color(1, 1, 1, 1)`` |
  27. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  28. | :ref:`Texture2D<class_Texture2D>` | :ref:`albedo_texture<class_BaseMaterial3D_property_albedo_texture>` | |
  29. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  30. | :ref:`bool<class_bool>` | :ref:`albedo_texture_force_srgb<class_BaseMaterial3D_property_albedo_texture_force_srgb>` | ``false`` |
  31. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  32. | :ref:`bool<class_bool>` | :ref:`albedo_texture_msdf<class_BaseMaterial3D_property_albedo_texture_msdf>` | ``false`` |
  33. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  34. | :ref:`float<class_float>` | :ref:`alpha_antialiasing_edge<class_BaseMaterial3D_property_alpha_antialiasing_edge>` | |
  35. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  36. | :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` | :ref:`alpha_antialiasing_mode<class_BaseMaterial3D_property_alpha_antialiasing_mode>` | |
  37. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  38. | :ref:`float<class_float>` | :ref:`alpha_hash_scale<class_BaseMaterial3D_property_alpha_hash_scale>` | |
  39. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  40. | :ref:`float<class_float>` | :ref:`alpha_scissor_threshold<class_BaseMaterial3D_property_alpha_scissor_threshold>` | |
  41. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  42. | :ref:`float<class_float>` | :ref:`anisotropy<class_BaseMaterial3D_property_anisotropy>` | ``0.0`` |
  43. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  44. | :ref:`bool<class_bool>` | :ref:`anisotropy_enabled<class_BaseMaterial3D_property_anisotropy_enabled>` | ``false`` |
  45. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  46. | :ref:`Texture2D<class_Texture2D>` | :ref:`anisotropy_flowmap<class_BaseMaterial3D_property_anisotropy_flowmap>` | |
  47. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  48. | :ref:`bool<class_bool>` | :ref:`ao_enabled<class_BaseMaterial3D_property_ao_enabled>` | ``false`` |
  49. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  50. | :ref:`float<class_float>` | :ref:`ao_light_affect<class_BaseMaterial3D_property_ao_light_affect>` | ``0.0`` |
  51. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  52. | :ref:`bool<class_bool>` | :ref:`ao_on_uv2<class_BaseMaterial3D_property_ao_on_uv2>` | ``false`` |
  53. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  54. | :ref:`Texture2D<class_Texture2D>` | :ref:`ao_texture<class_BaseMaterial3D_property_ao_texture>` | |
  55. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  56. | :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` | :ref:`ao_texture_channel<class_BaseMaterial3D_property_ao_texture_channel>` | ``0`` |
  57. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  58. | :ref:`Color<class_Color>` | :ref:`backlight<class_BaseMaterial3D_property_backlight>` | ``Color(0, 0, 0, 1)`` |
  59. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  60. | :ref:`bool<class_bool>` | :ref:`backlight_enabled<class_BaseMaterial3D_property_backlight_enabled>` | ``false`` |
  61. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  62. | :ref:`Texture2D<class_Texture2D>` | :ref:`backlight_texture<class_BaseMaterial3D_property_backlight_texture>` | |
  63. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  64. | :ref:`bool<class_bool>` | :ref:`billboard_keep_scale<class_BaseMaterial3D_property_billboard_keep_scale>` | ``false`` |
  65. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  66. | :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` | :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>` | ``0`` |
  67. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  68. | :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` | :ref:`blend_mode<class_BaseMaterial3D_property_blend_mode>` | ``0`` |
  69. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  70. | :ref:`float<class_float>` | :ref:`clearcoat<class_BaseMaterial3D_property_clearcoat>` | ``1.0`` |
  71. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  72. | :ref:`bool<class_bool>` | :ref:`clearcoat_enabled<class_BaseMaterial3D_property_clearcoat_enabled>` | ``false`` |
  73. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  74. | :ref:`float<class_float>` | :ref:`clearcoat_roughness<class_BaseMaterial3D_property_clearcoat_roughness>` | ``0.5`` |
  75. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  76. | :ref:`Texture2D<class_Texture2D>` | :ref:`clearcoat_texture<class_BaseMaterial3D_property_clearcoat_texture>` | |
  77. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  78. | :ref:`CullMode<enum_BaseMaterial3D_CullMode>` | :ref:`cull_mode<class_BaseMaterial3D_property_cull_mode>` | ``0`` |
  79. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  80. | :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` | :ref:`depth_draw_mode<class_BaseMaterial3D_property_depth_draw_mode>` | ``0`` |
  81. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  82. | :ref:`Texture2D<class_Texture2D>` | :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` | |
  83. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  84. | :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` | :ref:`detail_blend_mode<class_BaseMaterial3D_property_detail_blend_mode>` | ``0`` |
  85. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  86. | :ref:`bool<class_bool>` | :ref:`detail_enabled<class_BaseMaterial3D_property_detail_enabled>` | ``false`` |
  87. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  88. | :ref:`Texture2D<class_Texture2D>` | :ref:`detail_mask<class_BaseMaterial3D_property_detail_mask>` | |
  89. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  90. | :ref:`Texture2D<class_Texture2D>` | :ref:`detail_normal<class_BaseMaterial3D_property_detail_normal>` | |
  91. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  92. | :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` | :ref:`detail_uv_layer<class_BaseMaterial3D_property_detail_uv_layer>` | ``0`` |
  93. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  94. | :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` | :ref:`diffuse_mode<class_BaseMaterial3D_property_diffuse_mode>` | ``0`` |
  95. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  96. | :ref:`bool<class_bool>` | :ref:`disable_ambient_light<class_BaseMaterial3D_property_disable_ambient_light>` | ``false`` |
  97. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  98. | :ref:`bool<class_bool>` | :ref:`disable_receive_shadows<class_BaseMaterial3D_property_disable_receive_shadows>` | ``false`` |
  99. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  100. | :ref:`float<class_float>` | :ref:`distance_fade_max_distance<class_BaseMaterial3D_property_distance_fade_max_distance>` | ``10.0`` |
  101. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  102. | :ref:`float<class_float>` | :ref:`distance_fade_min_distance<class_BaseMaterial3D_property_distance_fade_min_distance>` | ``0.0`` |
  103. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  104. | :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` | :ref:`distance_fade_mode<class_BaseMaterial3D_property_distance_fade_mode>` | ``0`` |
  105. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  106. | :ref:`Color<class_Color>` | :ref:`emission<class_BaseMaterial3D_property_emission>` | ``Color(0, 0, 0, 1)`` |
  107. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  108. | :ref:`bool<class_bool>` | :ref:`emission_enabled<class_BaseMaterial3D_property_emission_enabled>` | ``false`` |
  109. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  110. | :ref:`float<class_float>` | :ref:`emission_energy_multiplier<class_BaseMaterial3D_property_emission_energy_multiplier>` | ``1.0`` |
  111. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  112. | :ref:`float<class_float>` | :ref:`emission_intensity<class_BaseMaterial3D_property_emission_intensity>` | |
  113. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  114. | :ref:`bool<class_bool>` | :ref:`emission_on_uv2<class_BaseMaterial3D_property_emission_on_uv2>` | ``false`` |
  115. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  116. | :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` | :ref:`emission_operator<class_BaseMaterial3D_property_emission_operator>` | ``0`` |
  117. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  118. | :ref:`Texture2D<class_Texture2D>` | :ref:`emission_texture<class_BaseMaterial3D_property_emission_texture>` | |
  119. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  120. | :ref:`bool<class_bool>` | :ref:`fixed_size<class_BaseMaterial3D_property_fixed_size>` | ``false`` |
  121. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  122. | :ref:`bool<class_bool>` | :ref:`grow<class_BaseMaterial3D_property_grow>` | ``false`` |
  123. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  124. | :ref:`float<class_float>` | :ref:`grow_amount<class_BaseMaterial3D_property_grow_amount>` | ``0.0`` |
  125. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  126. | :ref:`bool<class_bool>` | :ref:`heightmap_deep_parallax<class_BaseMaterial3D_property_heightmap_deep_parallax>` | ``false`` |
  127. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  128. | :ref:`bool<class_bool>` | :ref:`heightmap_enabled<class_BaseMaterial3D_property_heightmap_enabled>` | ``false`` |
  129. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  130. | :ref:`bool<class_bool>` | :ref:`heightmap_flip_binormal<class_BaseMaterial3D_property_heightmap_flip_binormal>` | ``false`` |
  131. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  132. | :ref:`bool<class_bool>` | :ref:`heightmap_flip_tangent<class_BaseMaterial3D_property_heightmap_flip_tangent>` | ``false`` |
  133. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  134. | :ref:`bool<class_bool>` | :ref:`heightmap_flip_texture<class_BaseMaterial3D_property_heightmap_flip_texture>` | ``false`` |
  135. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  136. | :ref:`int<class_int>` | :ref:`heightmap_max_layers<class_BaseMaterial3D_property_heightmap_max_layers>` | |
  137. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  138. | :ref:`int<class_int>` | :ref:`heightmap_min_layers<class_BaseMaterial3D_property_heightmap_min_layers>` | |
  139. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  140. | :ref:`float<class_float>` | :ref:`heightmap_scale<class_BaseMaterial3D_property_heightmap_scale>` | ``5.0`` |
  141. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  142. | :ref:`Texture2D<class_Texture2D>` | :ref:`heightmap_texture<class_BaseMaterial3D_property_heightmap_texture>` | |
  143. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  144. | :ref:`float<class_float>` | :ref:`metallic<class_BaseMaterial3D_property_metallic>` | ``0.0`` |
  145. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  146. | :ref:`float<class_float>` | :ref:`metallic_specular<class_BaseMaterial3D_property_metallic_specular>` | ``0.5`` |
  147. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  148. | :ref:`Texture2D<class_Texture2D>` | :ref:`metallic_texture<class_BaseMaterial3D_property_metallic_texture>` | |
  149. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  150. | :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` | :ref:`metallic_texture_channel<class_BaseMaterial3D_property_metallic_texture_channel>` | ``0`` |
  151. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  152. | :ref:`float<class_float>` | :ref:`msdf_outline_size<class_BaseMaterial3D_property_msdf_outline_size>` | ``0.0`` |
  153. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  154. | :ref:`float<class_float>` | :ref:`msdf_pixel_range<class_BaseMaterial3D_property_msdf_pixel_range>` | ``4.0`` |
  155. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  156. | :ref:`bool<class_bool>` | :ref:`no_depth_test<class_BaseMaterial3D_property_no_depth_test>` | ``false`` |
  157. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  158. | :ref:`bool<class_bool>` | :ref:`normal_enabled<class_BaseMaterial3D_property_normal_enabled>` | ``false`` |
  159. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  160. | :ref:`float<class_float>` | :ref:`normal_scale<class_BaseMaterial3D_property_normal_scale>` | ``1.0`` |
  161. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  162. | :ref:`Texture2D<class_Texture2D>` | :ref:`normal_texture<class_BaseMaterial3D_property_normal_texture>` | |
  163. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  164. | :ref:`Texture2D<class_Texture2D>` | :ref:`orm_texture<class_BaseMaterial3D_property_orm_texture>` | |
  165. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  166. | :ref:`int<class_int>` | :ref:`particles_anim_h_frames<class_BaseMaterial3D_property_particles_anim_h_frames>` | |
  167. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  168. | :ref:`bool<class_bool>` | :ref:`particles_anim_loop<class_BaseMaterial3D_property_particles_anim_loop>` | |
  169. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  170. | :ref:`int<class_int>` | :ref:`particles_anim_v_frames<class_BaseMaterial3D_property_particles_anim_v_frames>` | |
  171. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  172. | :ref:`float<class_float>` | :ref:`point_size<class_BaseMaterial3D_property_point_size>` | ``1.0`` |
  173. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  174. | :ref:`float<class_float>` | :ref:`proximity_fade_distance<class_BaseMaterial3D_property_proximity_fade_distance>` | ``1.0`` |
  175. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  176. | :ref:`bool<class_bool>` | :ref:`proximity_fade_enabled<class_BaseMaterial3D_property_proximity_fade_enabled>` | ``false`` |
  177. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  178. | :ref:`bool<class_bool>` | :ref:`refraction_enabled<class_BaseMaterial3D_property_refraction_enabled>` | ``false`` |
  179. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  180. | :ref:`float<class_float>` | :ref:`refraction_scale<class_BaseMaterial3D_property_refraction_scale>` | ``0.05`` |
  181. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  182. | :ref:`Texture2D<class_Texture2D>` | :ref:`refraction_texture<class_BaseMaterial3D_property_refraction_texture>` | |
  183. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  184. | :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` | :ref:`refraction_texture_channel<class_BaseMaterial3D_property_refraction_texture_channel>` | ``0`` |
  185. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  186. | :ref:`float<class_float>` | :ref:`rim<class_BaseMaterial3D_property_rim>` | ``1.0`` |
  187. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  188. | :ref:`bool<class_bool>` | :ref:`rim_enabled<class_BaseMaterial3D_property_rim_enabled>` | ``false`` |
  189. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  190. | :ref:`Texture2D<class_Texture2D>` | :ref:`rim_texture<class_BaseMaterial3D_property_rim_texture>` | |
  191. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  192. | :ref:`float<class_float>` | :ref:`rim_tint<class_BaseMaterial3D_property_rim_tint>` | ``0.5`` |
  193. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  194. | :ref:`float<class_float>` | :ref:`roughness<class_BaseMaterial3D_property_roughness>` | ``1.0`` |
  195. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  196. | :ref:`Texture2D<class_Texture2D>` | :ref:`roughness_texture<class_BaseMaterial3D_property_roughness_texture>` | |
  197. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  198. | :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` | :ref:`roughness_texture_channel<class_BaseMaterial3D_property_roughness_texture_channel>` | ``0`` |
  199. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  200. | :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` | :ref:`shading_mode<class_BaseMaterial3D_property_shading_mode>` | ``1`` |
  201. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  202. | :ref:`bool<class_bool>` | :ref:`shadow_to_opacity<class_BaseMaterial3D_property_shadow_to_opacity>` | ``false`` |
  203. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  204. | :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` | :ref:`specular_mode<class_BaseMaterial3D_property_specular_mode>` | ``0`` |
  205. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  206. | :ref:`bool<class_bool>` | :ref:`subsurf_scatter_enabled<class_BaseMaterial3D_property_subsurf_scatter_enabled>` | ``false`` |
  207. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  208. | :ref:`bool<class_bool>` | :ref:`subsurf_scatter_skin_mode<class_BaseMaterial3D_property_subsurf_scatter_skin_mode>` | ``false`` |
  209. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  210. | :ref:`float<class_float>` | :ref:`subsurf_scatter_strength<class_BaseMaterial3D_property_subsurf_scatter_strength>` | ``0.0`` |
  211. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  212. | :ref:`Texture2D<class_Texture2D>` | :ref:`subsurf_scatter_texture<class_BaseMaterial3D_property_subsurf_scatter_texture>` | |
  213. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  214. | :ref:`float<class_float>` | :ref:`subsurf_scatter_transmittance_boost<class_BaseMaterial3D_property_subsurf_scatter_transmittance_boost>` | ``0.0`` |
  215. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  216. | :ref:`Color<class_Color>` | :ref:`subsurf_scatter_transmittance_color<class_BaseMaterial3D_property_subsurf_scatter_transmittance_color>` | ``Color(1, 1, 1, 1)`` |
  217. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  218. | :ref:`float<class_float>` | :ref:`subsurf_scatter_transmittance_depth<class_BaseMaterial3D_property_subsurf_scatter_transmittance_depth>` | ``0.1`` |
  219. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  220. | :ref:`bool<class_bool>` | :ref:`subsurf_scatter_transmittance_enabled<class_BaseMaterial3D_property_subsurf_scatter_transmittance_enabled>` | ``false`` |
  221. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  222. | :ref:`Texture2D<class_Texture2D>` | :ref:`subsurf_scatter_transmittance_texture<class_BaseMaterial3D_property_subsurf_scatter_transmittance_texture>` | |
  223. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  224. | :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` | :ref:`texture_filter<class_BaseMaterial3D_property_texture_filter>` | ``3`` |
  225. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  226. | :ref:`bool<class_bool>` | :ref:`texture_repeat<class_BaseMaterial3D_property_texture_repeat>` | ``true`` |
  227. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  228. | :ref:`Transparency<enum_BaseMaterial3D_Transparency>` | :ref:`transparency<class_BaseMaterial3D_property_transparency>` | ``0`` |
  229. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  230. | :ref:`bool<class_bool>` | :ref:`use_particle_trails<class_BaseMaterial3D_property_use_particle_trails>` | ``false`` |
  231. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  232. | :ref:`bool<class_bool>` | :ref:`use_point_size<class_BaseMaterial3D_property_use_point_size>` | ``false`` |
  233. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  234. | :ref:`Vector3<class_Vector3>` | :ref:`uv1_offset<class_BaseMaterial3D_property_uv1_offset>` | ``Vector3(0, 0, 0)`` |
  235. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  236. | :ref:`Vector3<class_Vector3>` | :ref:`uv1_scale<class_BaseMaterial3D_property_uv1_scale>` | ``Vector3(1, 1, 1)`` |
  237. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  238. | :ref:`bool<class_bool>` | :ref:`uv1_triplanar<class_BaseMaterial3D_property_uv1_triplanar>` | ``false`` |
  239. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  240. | :ref:`float<class_float>` | :ref:`uv1_triplanar_sharpness<class_BaseMaterial3D_property_uv1_triplanar_sharpness>` | ``1.0`` |
  241. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  242. | :ref:`bool<class_bool>` | :ref:`uv1_world_triplanar<class_BaseMaterial3D_property_uv1_world_triplanar>` | ``false`` |
  243. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  244. | :ref:`Vector3<class_Vector3>` | :ref:`uv2_offset<class_BaseMaterial3D_property_uv2_offset>` | ``Vector3(0, 0, 0)`` |
  245. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  246. | :ref:`Vector3<class_Vector3>` | :ref:`uv2_scale<class_BaseMaterial3D_property_uv2_scale>` | ``Vector3(1, 1, 1)`` |
  247. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  248. | :ref:`bool<class_bool>` | :ref:`uv2_triplanar<class_BaseMaterial3D_property_uv2_triplanar>` | ``false`` |
  249. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  250. | :ref:`float<class_float>` | :ref:`uv2_triplanar_sharpness<class_BaseMaterial3D_property_uv2_triplanar_sharpness>` | ``1.0`` |
  251. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  252. | :ref:`bool<class_bool>` | :ref:`uv2_world_triplanar<class_BaseMaterial3D_property_uv2_world_triplanar>` | ``false`` |
  253. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  254. | :ref:`bool<class_bool>` | :ref:`vertex_color_is_srgb<class_BaseMaterial3D_property_vertex_color_is_srgb>` | ``false`` |
  255. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  256. | :ref:`bool<class_bool>` | :ref:`vertex_color_use_as_albedo<class_BaseMaterial3D_property_vertex_color_use_as_albedo>` | ``false`` |
  257. +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
  258. .. rst-class:: classref-reftable-group
  259. Methods
  260. -------
  261. .. table::
  262. :widths: auto
  263. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  264. | :ref:`bool<class_bool>` | :ref:`get_feature<class_BaseMaterial3D_method_get_feature>` **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const| |
  265. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  266. | :ref:`bool<class_bool>` | :ref:`get_flag<class_BaseMaterial3D_method_get_flag>` **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const| |
  267. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  268. | :ref:`Texture2D<class_Texture2D>` | :ref:`get_texture<class_BaseMaterial3D_method_get_texture>` **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const| |
  269. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  270. | void | :ref:`set_feature<class_BaseMaterial3D_method_set_feature>` **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)** |
  271. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  272. | void | :ref:`set_flag<class_BaseMaterial3D_method_set_flag>` **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)** |
  273. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  274. | void | :ref:`set_texture<class_BaseMaterial3D_method_set_texture>` **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)** |
  275. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  276. .. rst-class:: classref-section-separator
  277. ----
  278. .. rst-class:: classref-descriptions-group
  279. Enumerations
  280. ------------
  281. .. _enum_BaseMaterial3D_TextureParam:
  282. .. rst-class:: classref-enumeration
  283. enum **TextureParam**:
  284. .. _class_BaseMaterial3D_constant_TEXTURE_ALBEDO:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_ALBEDO** = ``0``
  287. Texture specifying per-pixel color.
  288. .. _class_BaseMaterial3D_constant_TEXTURE_METALLIC:
  289. .. rst-class:: classref-enumeration-constant
  290. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_METALLIC** = ``1``
  291. Texture specifying per-pixel metallic value.
  292. .. _class_BaseMaterial3D_constant_TEXTURE_ROUGHNESS:
  293. .. rst-class:: classref-enumeration-constant
  294. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_ROUGHNESS** = ``2``
  295. Texture specifying per-pixel roughness value.
  296. .. _class_BaseMaterial3D_constant_TEXTURE_EMISSION:
  297. .. rst-class:: classref-enumeration-constant
  298. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_EMISSION** = ``3``
  299. Texture specifying per-pixel emission color.
  300. .. _class_BaseMaterial3D_constant_TEXTURE_NORMAL:
  301. .. rst-class:: classref-enumeration-constant
  302. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_NORMAL** = ``4``
  303. Texture specifying per-pixel normal vector.
  304. .. _class_BaseMaterial3D_constant_TEXTURE_RIM:
  305. .. rst-class:: classref-enumeration-constant
  306. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_RIM** = ``5``
  307. Texture specifying per-pixel rim value.
  308. .. _class_BaseMaterial3D_constant_TEXTURE_CLEARCOAT:
  309. .. rst-class:: classref-enumeration-constant
  310. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_CLEARCOAT** = ``6``
  311. Texture specifying per-pixel clearcoat value.
  312. .. _class_BaseMaterial3D_constant_TEXTURE_FLOWMAP:
  313. .. rst-class:: classref-enumeration-constant
  314. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_FLOWMAP** = ``7``
  315. Texture specifying per-pixel flowmap direction for use with :ref:`anisotropy<class_BaseMaterial3D_property_anisotropy>`.
  316. .. _class_BaseMaterial3D_constant_TEXTURE_AMBIENT_OCCLUSION:
  317. .. rst-class:: classref-enumeration-constant
  318. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_AMBIENT_OCCLUSION** = ``8``
  319. Texture specifying per-pixel ambient occlusion value.
  320. .. _class_BaseMaterial3D_constant_TEXTURE_HEIGHTMAP:
  321. .. rst-class:: classref-enumeration-constant
  322. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_HEIGHTMAP** = ``9``
  323. Texture specifying per-pixel height.
  324. .. _class_BaseMaterial3D_constant_TEXTURE_SUBSURFACE_SCATTERING:
  325. .. rst-class:: classref-enumeration-constant
  326. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_SUBSURFACE_SCATTERING** = ``10``
  327. Texture specifying per-pixel subsurface scattering.
  328. .. _class_BaseMaterial3D_constant_TEXTURE_SUBSURFACE_TRANSMITTANCE:
  329. .. rst-class:: classref-enumeration-constant
  330. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_SUBSURFACE_TRANSMITTANCE** = ``11``
  331. Texture specifying per-pixel transmittance for subsurface scattering.
  332. .. _class_BaseMaterial3D_constant_TEXTURE_BACKLIGHT:
  333. .. rst-class:: classref-enumeration-constant
  334. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_BACKLIGHT** = ``12``
  335. Texture specifying per-pixel backlight color.
  336. .. _class_BaseMaterial3D_constant_TEXTURE_REFRACTION:
  337. .. rst-class:: classref-enumeration-constant
  338. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_REFRACTION** = ``13``
  339. Texture specifying per-pixel refraction strength.
  340. .. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_MASK:
  341. .. rst-class:: classref-enumeration-constant
  342. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_DETAIL_MASK** = ``14``
  343. Texture specifying per-pixel detail mask blending value.
  344. .. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_ALBEDO:
  345. .. rst-class:: classref-enumeration-constant
  346. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_DETAIL_ALBEDO** = ``15``
  347. Texture specifying per-pixel detail color.
  348. .. _class_BaseMaterial3D_constant_TEXTURE_DETAIL_NORMAL:
  349. .. rst-class:: classref-enumeration-constant
  350. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_DETAIL_NORMAL** = ``16``
  351. Texture specifying per-pixel detail normal.
  352. .. _class_BaseMaterial3D_constant_TEXTURE_ORM:
  353. .. rst-class:: classref-enumeration-constant
  354. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_ORM** = ``17``
  355. Texture holding ambient occlusion, roughness, and metallic.
  356. .. _class_BaseMaterial3D_constant_TEXTURE_MAX:
  357. .. rst-class:: classref-enumeration-constant
  358. :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_MAX** = ``18``
  359. Represents the size of the :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` enum.
  360. .. rst-class:: classref-item-separator
  361. ----
  362. .. _enum_BaseMaterial3D_TextureFilter:
  363. .. rst-class:: classref-enumeration
  364. enum **TextureFilter**:
  365. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST:
  366. .. rst-class:: classref-enumeration-constant
  367. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_NEAREST** = ``0``
  368. The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
  369. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR:
  370. .. rst-class:: classref-enumeration-constant
  371. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_LINEAR** = ``1``
  372. The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps.
  373. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS:
  374. .. rst-class:: classref-enumeration-constant
  375. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``2``
  376. The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps.
  377. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS:
  378. .. rst-class:: classref-enumeration-constant
  379. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``3``
  380. The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera.
  381. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC:
  382. .. rst-class:: classref-enumeration-constant
  383. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``4``
  384. The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`.
  385. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC:
  386. .. rst-class:: classref-enumeration-constant
  387. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``5``
  388. The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`.
  389. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_MAX:
  390. .. rst-class:: classref-enumeration-constant
  391. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **TEXTURE_FILTER_MAX** = ``6``
  392. Represents the size of the :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` enum.
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _enum_BaseMaterial3D_DetailUV:
  396. .. rst-class:: classref-enumeration
  397. enum **DetailUV**:
  398. .. _class_BaseMaterial3D_constant_DETAIL_UV_1:
  399. .. rst-class:: classref-enumeration-constant
  400. :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` **DETAIL_UV_1** = ``0``
  401. Use ``UV`` with the detail texture.
  402. .. _class_BaseMaterial3D_constant_DETAIL_UV_2:
  403. .. rst-class:: classref-enumeration-constant
  404. :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` **DETAIL_UV_2** = ``1``
  405. Use ``UV2`` with the detail texture.
  406. .. rst-class:: classref-item-separator
  407. ----
  408. .. _enum_BaseMaterial3D_Transparency:
  409. .. rst-class:: classref-enumeration
  410. enum **Transparency**:
  411. .. _class_BaseMaterial3D_constant_TRANSPARENCY_DISABLED:
  412. .. rst-class:: classref-enumeration-constant
  413. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **TRANSPARENCY_DISABLED** = ``0``
  414. The material will not use transparency.
  415. .. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA:
  416. .. rst-class:: classref-enumeration-constant
  417. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **TRANSPARENCY_ALPHA** = ``1``
  418. The material will use the texture's alpha values for transparency.
  419. .. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_SCISSOR:
  420. .. rst-class:: classref-enumeration-constant
  421. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **TRANSPARENCY_ALPHA_SCISSOR** = ``2``
  422. The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass.
  423. .. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_HASH:
  424. .. rst-class:: classref-enumeration-constant
  425. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **TRANSPARENCY_ALPHA_HASH** = ``3``
  426. The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque.
  427. .. _class_BaseMaterial3D_constant_TRANSPARENCY_ALPHA_DEPTH_PRE_PASS:
  428. .. rst-class:: classref-enumeration-constant
  429. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **TRANSPARENCY_ALPHA_DEPTH_PRE_PASS** = ``4``
  430. The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass.
  431. .. _class_BaseMaterial3D_constant_TRANSPARENCY_MAX:
  432. .. rst-class:: classref-enumeration-constant
  433. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **TRANSPARENCY_MAX** = ``5``
  434. Represents the size of the :ref:`Transparency<enum_BaseMaterial3D_Transparency>` enum.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _enum_BaseMaterial3D_ShadingMode:
  438. .. rst-class:: classref-enumeration
  439. enum **ShadingMode**:
  440. .. _class_BaseMaterial3D_constant_SHADING_MODE_UNSHADED:
  441. .. rst-class:: classref-enumeration-constant
  442. :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` **SHADING_MODE_UNSHADED** = ``0``
  443. The object will not receive shadows.
  444. .. _class_BaseMaterial3D_constant_SHADING_MODE_PER_PIXEL:
  445. .. rst-class:: classref-enumeration-constant
  446. :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` **SHADING_MODE_PER_PIXEL** = ``1``
  447. The object will be shaded per pixel. Useful for realistic shading effect.
  448. .. _class_BaseMaterial3D_constant_SHADING_MODE_PER_VERTEX:
  449. .. rst-class:: classref-enumeration-constant
  450. :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` **SHADING_MODE_PER_VERTEX** = ``2``
  451. The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality.
  452. .. _class_BaseMaterial3D_constant_SHADING_MODE_MAX:
  453. .. rst-class:: classref-enumeration-constant
  454. :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` **SHADING_MODE_MAX** = ``3``
  455. Represents the size of the :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` enum.
  456. .. rst-class:: classref-item-separator
  457. ----
  458. .. _enum_BaseMaterial3D_Feature:
  459. .. rst-class:: classref-enumeration
  460. enum **Feature**:
  461. .. _class_BaseMaterial3D_constant_FEATURE_EMISSION:
  462. .. rst-class:: classref-enumeration-constant
  463. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_EMISSION** = ``0``
  464. Constant for setting :ref:`emission_enabled<class_BaseMaterial3D_property_emission_enabled>`.
  465. .. _class_BaseMaterial3D_constant_FEATURE_NORMAL_MAPPING:
  466. .. rst-class:: classref-enumeration-constant
  467. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_NORMAL_MAPPING** = ``1``
  468. Constant for setting :ref:`normal_enabled<class_BaseMaterial3D_property_normal_enabled>`.
  469. .. _class_BaseMaterial3D_constant_FEATURE_RIM:
  470. .. rst-class:: classref-enumeration-constant
  471. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_RIM** = ``2``
  472. Constant for setting :ref:`rim_enabled<class_BaseMaterial3D_property_rim_enabled>`.
  473. .. _class_BaseMaterial3D_constant_FEATURE_CLEARCOAT:
  474. .. rst-class:: classref-enumeration-constant
  475. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_CLEARCOAT** = ``3``
  476. Constant for setting :ref:`clearcoat_enabled<class_BaseMaterial3D_property_clearcoat_enabled>`.
  477. .. _class_BaseMaterial3D_constant_FEATURE_ANISOTROPY:
  478. .. rst-class:: classref-enumeration-constant
  479. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_ANISOTROPY** = ``4``
  480. Constant for setting :ref:`anisotropy_enabled<class_BaseMaterial3D_property_anisotropy_enabled>`.
  481. .. _class_BaseMaterial3D_constant_FEATURE_AMBIENT_OCCLUSION:
  482. .. rst-class:: classref-enumeration-constant
  483. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_AMBIENT_OCCLUSION** = ``5``
  484. Constant for setting :ref:`ao_enabled<class_BaseMaterial3D_property_ao_enabled>`.
  485. .. _class_BaseMaterial3D_constant_FEATURE_HEIGHT_MAPPING:
  486. .. rst-class:: classref-enumeration-constant
  487. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_HEIGHT_MAPPING** = ``6``
  488. Constant for setting :ref:`heightmap_enabled<class_BaseMaterial3D_property_heightmap_enabled>`.
  489. .. _class_BaseMaterial3D_constant_FEATURE_SUBSURFACE_SCATTERING:
  490. .. rst-class:: classref-enumeration-constant
  491. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_SUBSURFACE_SCATTERING** = ``7``
  492. Constant for setting :ref:`subsurf_scatter_enabled<class_BaseMaterial3D_property_subsurf_scatter_enabled>`.
  493. .. _class_BaseMaterial3D_constant_FEATURE_SUBSURFACE_TRANSMITTANCE:
  494. .. rst-class:: classref-enumeration-constant
  495. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_SUBSURFACE_TRANSMITTANCE** = ``8``
  496. Constant for setting :ref:`subsurf_scatter_transmittance_enabled<class_BaseMaterial3D_property_subsurf_scatter_transmittance_enabled>`.
  497. .. _class_BaseMaterial3D_constant_FEATURE_BACKLIGHT:
  498. .. rst-class:: classref-enumeration-constant
  499. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_BACKLIGHT** = ``9``
  500. Constant for setting :ref:`backlight_enabled<class_BaseMaterial3D_property_backlight_enabled>`.
  501. .. _class_BaseMaterial3D_constant_FEATURE_REFRACTION:
  502. .. rst-class:: classref-enumeration-constant
  503. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_REFRACTION** = ``10``
  504. Constant for setting :ref:`refraction_enabled<class_BaseMaterial3D_property_refraction_enabled>`.
  505. .. _class_BaseMaterial3D_constant_FEATURE_DETAIL:
  506. .. rst-class:: classref-enumeration-constant
  507. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_DETAIL** = ``11``
  508. Constant for setting :ref:`detail_enabled<class_BaseMaterial3D_property_detail_enabled>`.
  509. .. _class_BaseMaterial3D_constant_FEATURE_MAX:
  510. .. rst-class:: classref-enumeration-constant
  511. :ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_MAX** = ``12``
  512. Represents the size of the :ref:`Feature<enum_BaseMaterial3D_Feature>` enum.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _enum_BaseMaterial3D_BlendMode:
  516. .. rst-class:: classref-enumeration
  517. enum **BlendMode**:
  518. .. _class_BaseMaterial3D_constant_BLEND_MODE_MIX:
  519. .. rst-class:: classref-enumeration-constant
  520. :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **BLEND_MODE_MIX** = ``0``
  521. Default blend mode. The color of the object is blended over the background based on the object's alpha value.
  522. .. _class_BaseMaterial3D_constant_BLEND_MODE_ADD:
  523. .. rst-class:: classref-enumeration-constant
  524. :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **BLEND_MODE_ADD** = ``1``
  525. The color of the object is added to the background.
  526. .. _class_BaseMaterial3D_constant_BLEND_MODE_SUB:
  527. .. rst-class:: classref-enumeration-constant
  528. :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **BLEND_MODE_SUB** = ``2``
  529. The color of the object is subtracted from the background.
  530. .. _class_BaseMaterial3D_constant_BLEND_MODE_MUL:
  531. .. rst-class:: classref-enumeration-constant
  532. :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **BLEND_MODE_MUL** = ``3``
  533. The color of the object is multiplied by the background.
  534. .. rst-class:: classref-item-separator
  535. ----
  536. .. _enum_BaseMaterial3D_AlphaAntiAliasing:
  537. .. rst-class:: classref-enumeration
  538. enum **AlphaAntiAliasing**:
  539. .. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_OFF:
  540. .. rst-class:: classref-enumeration-constant
  541. :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **ALPHA_ANTIALIASING_OFF** = ``0``
  542. Disables Alpha AntiAliasing for the material.
  543. .. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE:
  544. .. rst-class:: classref-enumeration-constant
  545. :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE** = ``1``
  546. Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask.
  547. .. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE:
  548. .. rst-class:: classref-enumeration-constant
  549. :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE** = ``2``
  550. Enables AlphaToCoverage and forces all non-zero alpha values to ``1``. Alpha values in the material are passed to the AntiAliasing sample mask.
  551. .. rst-class:: classref-item-separator
  552. ----
  553. .. _enum_BaseMaterial3D_DepthDrawMode:
  554. .. rst-class:: classref-enumeration
  555. enum **DepthDrawMode**:
  556. .. _class_BaseMaterial3D_constant_DEPTH_DRAW_OPAQUE_ONLY:
  557. .. rst-class:: classref-enumeration-constant
  558. :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` **DEPTH_DRAW_OPAQUE_ONLY** = ``0``
  559. Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass.
  560. .. _class_BaseMaterial3D_constant_DEPTH_DRAW_ALWAYS:
  561. .. rst-class:: classref-enumeration-constant
  562. :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` **DEPTH_DRAW_ALWAYS** = ``1``
  563. Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them.
  564. \ **Note:** This does not influence whether transparent objects are included in the depth prepass or not. For that, see :ref:`Transparency<enum_BaseMaterial3D_Transparency>`.
  565. .. _class_BaseMaterial3D_constant_DEPTH_DRAW_DISABLED:
  566. .. rst-class:: classref-enumeration-constant
  567. :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` **DEPTH_DRAW_DISABLED** = ``2``
  568. Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled).
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _enum_BaseMaterial3D_CullMode:
  572. .. rst-class:: classref-enumeration
  573. enum **CullMode**:
  574. .. _class_BaseMaterial3D_constant_CULL_BACK:
  575. .. rst-class:: classref-enumeration-constant
  576. :ref:`CullMode<enum_BaseMaterial3D_CullMode>` **CULL_BACK** = ``0``
  577. Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible.
  578. .. _class_BaseMaterial3D_constant_CULL_FRONT:
  579. .. rst-class:: classref-enumeration-constant
  580. :ref:`CullMode<enum_BaseMaterial3D_CullMode>` **CULL_FRONT** = ``1``
  581. Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes this means that the interior of the mesh will be drawn instead of the exterior.
  582. .. _class_BaseMaterial3D_constant_CULL_DISABLED:
  583. .. rst-class:: classref-enumeration-constant
  584. :ref:`CullMode<enum_BaseMaterial3D_CullMode>` **CULL_DISABLED** = ``2``
  585. No culling is performed.
  586. .. rst-class:: classref-item-separator
  587. ----
  588. .. _enum_BaseMaterial3D_Flags:
  589. .. rst-class:: classref-enumeration
  590. enum **Flags**:
  591. .. _class_BaseMaterial3D_constant_FLAG_DISABLE_DEPTH_TEST:
  592. .. rst-class:: classref-enumeration-constant
  593. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_DISABLE_DEPTH_TEST** = ``0``
  594. Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth.
  595. .. _class_BaseMaterial3D_constant_FLAG_ALBEDO_FROM_VERTEX_COLOR:
  596. .. rst-class:: classref-enumeration-constant
  597. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_ALBEDO_FROM_VERTEX_COLOR** = ``1``
  598. Set ``ALBEDO`` to the per-vertex color specified in the mesh.
  599. .. _class_BaseMaterial3D_constant_FLAG_SRGB_VERTEX_COLOR:
  600. .. rst-class:: classref-enumeration-constant
  601. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_SRGB_VERTEX_COLOR** = ``2``
  602. Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also :ref:`vertex_color_is_srgb<class_BaseMaterial3D_property_vertex_color_is_srgb>`.
  603. \ **Note:** Only effective when using the Vulkan Clustered or Vulkan Mobile backends.
  604. .. _class_BaseMaterial3D_constant_FLAG_USE_POINT_SIZE:
  605. .. rst-class:: classref-enumeration-constant
  606. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_USE_POINT_SIZE** = ``3``
  607. Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use ``POINT_COORD`` instead of ``UV``.
  608. .. _class_BaseMaterial3D_constant_FLAG_FIXED_SIZE:
  609. .. rst-class:: classref-enumeration-constant
  610. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_FIXED_SIZE** = ``4``
  611. Object is scaled by depth so that it always appears the same size on screen.
  612. .. _class_BaseMaterial3D_constant_FLAG_BILLBOARD_KEEP_SCALE:
  613. .. rst-class:: classref-enumeration-constant
  614. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_BILLBOARD_KEEP_SCALE** = ``5``
  615. Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>` is :ref:`BILLBOARD_ENABLED<class_BaseMaterial3D_constant_BILLBOARD_ENABLED>`.
  616. .. _class_BaseMaterial3D_constant_FLAG_UV1_USE_TRIPLANAR:
  617. .. rst-class:: classref-enumeration-constant
  618. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_UV1_USE_TRIPLANAR** = ``6``
  619. Use triplanar texture lookup for all texture lookups that would normally use ``UV``.
  620. .. _class_BaseMaterial3D_constant_FLAG_UV2_USE_TRIPLANAR:
  621. .. rst-class:: classref-enumeration-constant
  622. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_UV2_USE_TRIPLANAR** = ``7``
  623. Use triplanar texture lookup for all texture lookups that would normally use ``UV2``.
  624. .. _class_BaseMaterial3D_constant_FLAG_UV1_USE_WORLD_TRIPLANAR:
  625. .. rst-class:: classref-enumeration-constant
  626. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_UV1_USE_WORLD_TRIPLANAR** = ``8``
  627. Use triplanar texture lookup for all texture lookups that would normally use ``UV``.
  628. .. _class_BaseMaterial3D_constant_FLAG_UV2_USE_WORLD_TRIPLANAR:
  629. .. rst-class:: classref-enumeration-constant
  630. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_UV2_USE_WORLD_TRIPLANAR** = ``9``
  631. Use triplanar texture lookup for all texture lookups that would normally use ``UV2``.
  632. .. _class_BaseMaterial3D_constant_FLAG_AO_ON_UV2:
  633. .. rst-class:: classref-enumeration-constant
  634. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_AO_ON_UV2** = ``10``
  635. Use ``UV2`` coordinates to look up from the :ref:`ao_texture<class_BaseMaterial3D_property_ao_texture>`.
  636. .. _class_BaseMaterial3D_constant_FLAG_EMISSION_ON_UV2:
  637. .. rst-class:: classref-enumeration-constant
  638. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_EMISSION_ON_UV2** = ``11``
  639. Use ``UV2`` coordinates to look up from the :ref:`emission_texture<class_BaseMaterial3D_property_emission_texture>`.
  640. .. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_FORCE_SRGB:
  641. .. rst-class:: classref-enumeration-constant
  642. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = ``12``
  643. Forces the shader to convert albedo from sRGB space to linear space. See also :ref:`albedo_texture_force_srgb<class_BaseMaterial3D_property_albedo_texture_force_srgb>`.
  644. .. _class_BaseMaterial3D_constant_FLAG_DONT_RECEIVE_SHADOWS:
  645. .. rst-class:: classref-enumeration-constant
  646. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_DONT_RECEIVE_SHADOWS** = ``13``
  647. Disables receiving shadows from other objects.
  648. .. _class_BaseMaterial3D_constant_FLAG_DISABLE_AMBIENT_LIGHT:
  649. .. rst-class:: classref-enumeration-constant
  650. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_DISABLE_AMBIENT_LIGHT** = ``14``
  651. Disables receiving ambient light.
  652. .. _class_BaseMaterial3D_constant_FLAG_USE_SHADOW_TO_OPACITY:
  653. .. rst-class:: classref-enumeration-constant
  654. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_USE_SHADOW_TO_OPACITY** = ``15``
  655. Enables the shadow to opacity feature.
  656. .. _class_BaseMaterial3D_constant_FLAG_USE_TEXTURE_REPEAT:
  657. .. rst-class:: classref-enumeration-constant
  658. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_USE_TEXTURE_REPEAT** = ``16``
  659. Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.
  660. .. _class_BaseMaterial3D_constant_FLAG_INVERT_HEIGHTMAP:
  661. .. rst-class:: classref-enumeration-constant
  662. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_INVERT_HEIGHTMAP** = ``17``
  663. Invert values read from a depth texture to convert them to height values (heightmap).
  664. .. _class_BaseMaterial3D_constant_FLAG_SUBSURFACE_MODE_SKIN:
  665. .. rst-class:: classref-enumeration-constant
  666. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_SUBSURFACE_MODE_SKIN** = ``18``
  667. Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.
  668. .. _class_BaseMaterial3D_constant_FLAG_PARTICLE_TRAILS_MODE:
  669. .. rst-class:: classref-enumeration-constant
  670. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_PARTICLE_TRAILS_MODE** = ``19``
  671. Enables parts of the shader required for :ref:`GPUParticles3D<class_GPUParticles3D>` trails to function. This also requires using a mesh with appropriate skinning, such as :ref:`RibbonTrailMesh<class_RibbonTrailMesh>` or :ref:`TubeTrailMesh<class_TubeTrailMesh>`. Enabling this feature outside of materials used in :ref:`GPUParticles3D<class_GPUParticles3D>` meshes will break material rendering.
  672. .. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_MSDF:
  673. .. rst-class:: classref-enumeration-constant
  674. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_ALBEDO_TEXTURE_MSDF** = ``20``
  675. Enables multichannel signed distance field rendering shader.
  676. .. _class_BaseMaterial3D_constant_FLAG_MAX:
  677. .. rst-class:: classref-enumeration-constant
  678. :ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_MAX** = ``21``
  679. Represents the size of the :ref:`Flags<enum_BaseMaterial3D_Flags>` enum.
  680. .. rst-class:: classref-item-separator
  681. ----
  682. .. _enum_BaseMaterial3D_DiffuseMode:
  683. .. rst-class:: classref-enumeration
  684. enum **DiffuseMode**:
  685. .. _class_BaseMaterial3D_constant_DIFFUSE_BURLEY:
  686. .. rst-class:: classref-enumeration-constant
  687. :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` **DIFFUSE_BURLEY** = ``0``
  688. Default diffuse scattering algorithm.
  689. .. _class_BaseMaterial3D_constant_DIFFUSE_LAMBERT:
  690. .. rst-class:: classref-enumeration-constant
  691. :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` **DIFFUSE_LAMBERT** = ``1``
  692. Diffuse scattering ignores roughness.
  693. .. _class_BaseMaterial3D_constant_DIFFUSE_LAMBERT_WRAP:
  694. .. rst-class:: classref-enumeration-constant
  695. :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` **DIFFUSE_LAMBERT_WRAP** = ``2``
  696. Extends Lambert to cover more than 90 degrees when roughness increases.
  697. .. _class_BaseMaterial3D_constant_DIFFUSE_TOON:
  698. .. rst-class:: classref-enumeration-constant
  699. :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` **DIFFUSE_TOON** = ``3``
  700. Uses a hard cut for lighting, with smoothing affected by roughness.
  701. .. rst-class:: classref-item-separator
  702. ----
  703. .. _enum_BaseMaterial3D_SpecularMode:
  704. .. rst-class:: classref-enumeration
  705. enum **SpecularMode**:
  706. .. _class_BaseMaterial3D_constant_SPECULAR_SCHLICK_GGX:
  707. .. rst-class:: classref-enumeration-constant
  708. :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` **SPECULAR_SCHLICK_GGX** = ``0``
  709. Default specular blob.
  710. .. _class_BaseMaterial3D_constant_SPECULAR_TOON:
  711. .. rst-class:: classref-enumeration-constant
  712. :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` **SPECULAR_TOON** = ``1``
  713. Toon blob which changes size based on roughness.
  714. .. _class_BaseMaterial3D_constant_SPECULAR_DISABLED:
  715. .. rst-class:: classref-enumeration-constant
  716. :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` **SPECULAR_DISABLED** = ``2``
  717. No specular blob.
  718. .. rst-class:: classref-item-separator
  719. ----
  720. .. _enum_BaseMaterial3D_BillboardMode:
  721. .. rst-class:: classref-enumeration
  722. enum **BillboardMode**:
  723. .. _class_BaseMaterial3D_constant_BILLBOARD_DISABLED:
  724. .. rst-class:: classref-enumeration-constant
  725. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **BILLBOARD_DISABLED** = ``0``
  726. Billboard mode is disabled.
  727. .. _class_BaseMaterial3D_constant_BILLBOARD_ENABLED:
  728. .. rst-class:: classref-enumeration-constant
  729. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **BILLBOARD_ENABLED** = ``1``
  730. The object's Z axis will always face the camera.
  731. .. _class_BaseMaterial3D_constant_BILLBOARD_FIXED_Y:
  732. .. rst-class:: classref-enumeration-constant
  733. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **BILLBOARD_FIXED_Y** = ``2``
  734. The object's X axis will always face the camera.
  735. .. _class_BaseMaterial3D_constant_BILLBOARD_PARTICLES:
  736. .. rst-class:: classref-enumeration-constant
  737. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **BILLBOARD_PARTICLES** = ``3``
  738. Used for particle systems when assigned to :ref:`GPUParticles3D<class_GPUParticles3D>` and :ref:`CPUParticles3D<class_CPUParticles3D>` nodes. Enables ``particles_anim_*`` properties.
  739. The :ref:`ParticleProcessMaterial.anim_speed_min<class_ParticleProcessMaterial_property_anim_speed_min>` or :ref:`CPUParticles3D.anim_speed_min<class_CPUParticles3D_property_anim_speed_min>` should also be set to a value bigger than zero for the animation to play.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _enum_BaseMaterial3D_TextureChannel:
  743. .. rst-class:: classref-enumeration
  744. enum **TextureChannel**:
  745. .. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_RED:
  746. .. rst-class:: classref-enumeration-constant
  747. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **TEXTURE_CHANNEL_RED** = ``0``
  748. Used to read from the red channel of a texture.
  749. .. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_GREEN:
  750. .. rst-class:: classref-enumeration-constant
  751. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **TEXTURE_CHANNEL_GREEN** = ``1``
  752. Used to read from the green channel of a texture.
  753. .. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_BLUE:
  754. .. rst-class:: classref-enumeration-constant
  755. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **TEXTURE_CHANNEL_BLUE** = ``2``
  756. Used to read from the blue channel of a texture.
  757. .. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_ALPHA:
  758. .. rst-class:: classref-enumeration-constant
  759. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **TEXTURE_CHANNEL_ALPHA** = ``3``
  760. Used to read from the alpha channel of a texture.
  761. .. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_GRAYSCALE:
  762. .. rst-class:: classref-enumeration-constant
  763. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **TEXTURE_CHANNEL_GRAYSCALE** = ``4``
  764. Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture.
  765. .. rst-class:: classref-item-separator
  766. ----
  767. .. _enum_BaseMaterial3D_EmissionOperator:
  768. .. rst-class:: classref-enumeration
  769. enum **EmissionOperator**:
  770. .. _class_BaseMaterial3D_constant_EMISSION_OP_ADD:
  771. .. rst-class:: classref-enumeration-constant
  772. :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` **EMISSION_OP_ADD** = ``0``
  773. Adds the emission color to the color from the emission texture.
  774. .. _class_BaseMaterial3D_constant_EMISSION_OP_MULTIPLY:
  775. .. rst-class:: classref-enumeration-constant
  776. :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` **EMISSION_OP_MULTIPLY** = ``1``
  777. Multiplies the emission color by the color from the emission texture.
  778. .. rst-class:: classref-item-separator
  779. ----
  780. .. _enum_BaseMaterial3D_DistanceFadeMode:
  781. .. rst-class:: classref-enumeration
  782. enum **DistanceFadeMode**:
  783. .. _class_BaseMaterial3D_constant_DISTANCE_FADE_DISABLED:
  784. .. rst-class:: classref-enumeration-constant
  785. :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` **DISTANCE_FADE_DISABLED** = ``0``
  786. Do not use distance fade.
  787. .. _class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_ALPHA:
  788. .. rst-class:: classref-enumeration-constant
  789. :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` **DISTANCE_FADE_PIXEL_ALPHA** = ``1``
  790. Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel.
  791. .. _class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_DITHER:
  792. .. rst-class:: classref-enumeration-constant
  793. :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` **DISTANCE_FADE_PIXEL_DITHER** = ``2``
  794. Smoothly fades the object out based on each pixel's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA<class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_ALPHA>`.
  795. .. _class_BaseMaterial3D_constant_DISTANCE_FADE_OBJECT_DITHER:
  796. .. rst-class:: classref-enumeration-constant
  797. :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` **DISTANCE_FADE_OBJECT_DITHER** = ``3``
  798. Smoothly fades the object out based on the object's distance from the camera using a dither approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA<class_BaseMaterial3D_constant_DISTANCE_FADE_PIXEL_ALPHA>`.
  799. .. rst-class:: classref-section-separator
  800. ----
  801. .. rst-class:: classref-descriptions-group
  802. Property Descriptions
  803. ---------------------
  804. .. _class_BaseMaterial3D_property_albedo_color:
  805. .. rst-class:: classref-property
  806. :ref:`Color<class_Color>` **albedo_color** = ``Color(1, 1, 1, 1)``
  807. .. rst-class:: classref-property-setget
  808. - void **set_albedo** **(** :ref:`Color<class_Color>` value **)**
  809. - :ref:`Color<class_Color>` **get_albedo** **(** **)**
  810. The material's base color.
  811. \ **Note:** If :ref:`detail_enabled<class_BaseMaterial3D_property_detail_enabled>` is ``true`` and a :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` texture is specified, :ref:`albedo_color<class_BaseMaterial3D_property_albedo_color>` will *not* modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` texture instead.
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_BaseMaterial3D_property_albedo_texture:
  815. .. rst-class:: classref-property
  816. :ref:`Texture2D<class_Texture2D>` **albedo_texture**
  817. .. rst-class:: classref-property-setget
  818. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  819. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  820. Texture to multiply by :ref:`albedo_color<class_BaseMaterial3D_property_albedo_color>`. Used for basic texturing of objects.
  821. If the texture appears unexpectedly too dark or too bright, check :ref:`albedo_texture_force_srgb<class_BaseMaterial3D_property_albedo_texture_force_srgb>`.
  822. .. rst-class:: classref-item-separator
  823. ----
  824. .. _class_BaseMaterial3D_property_albedo_texture_force_srgb:
  825. .. rst-class:: classref-property
  826. :ref:`bool<class_bool>` **albedo_texture_force_srgb** = ``false``
  827. .. rst-class:: classref-property-setget
  828. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  829. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  830. If ``true``, forces a conversion of the :ref:`albedo_texture<class_BaseMaterial3D_property_albedo_texture>` from sRGB color space to linear color space. See also :ref:`vertex_color_is_srgb<class_BaseMaterial3D_property_vertex_color_is_srgb>`.
  831. This should only be enabled when needed (typically when using a :ref:`ViewportTexture<class_ViewportTexture>` as :ref:`albedo_texture<class_BaseMaterial3D_property_albedo_texture>`). If :ref:`albedo_texture_force_srgb<class_BaseMaterial3D_property_albedo_texture_force_srgb>` is ``true`` when it shouldn't be, the texture will appear to be too dark. If :ref:`albedo_texture_force_srgb<class_BaseMaterial3D_property_albedo_texture_force_srgb>` is ``false`` when it shouldn't be, the texture will appear to be too bright.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _class_BaseMaterial3D_property_albedo_texture_msdf:
  835. .. rst-class:: classref-property
  836. :ref:`bool<class_bool>` **albedo_texture_msdf** = ``false``
  837. .. rst-class:: classref-property-setget
  838. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  839. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  840. Enables multichannel signed distance field rendering shader. Use :ref:`msdf_pixel_range<class_BaseMaterial3D_property_msdf_pixel_range>` and :ref:`msdf_outline_size<class_BaseMaterial3D_property_msdf_outline_size>` to configure MSDF parameters.
  841. .. rst-class:: classref-item-separator
  842. ----
  843. .. _class_BaseMaterial3D_property_alpha_antialiasing_edge:
  844. .. rst-class:: classref-property
  845. :ref:`float<class_float>` **alpha_antialiasing_edge**
  846. .. rst-class:: classref-property-setget
  847. - void **set_alpha_antialiasing_edge** **(** :ref:`float<class_float>` value **)**
  848. - :ref:`float<class_float>` **get_alpha_antialiasing_edge** **(** **)**
  849. Threshold at which antialiasing will be applied on the alpha channel.
  850. .. rst-class:: classref-item-separator
  851. ----
  852. .. _class_BaseMaterial3D_property_alpha_antialiasing_mode:
  853. .. rst-class:: classref-property
  854. :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode**
  855. .. rst-class:: classref-property-setget
  856. - void **set_alpha_antialiasing** **(** :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` value **)**
  857. - :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing** **(** **)**
  858. The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`.
  859. .. rst-class:: classref-item-separator
  860. ----
  861. .. _class_BaseMaterial3D_property_alpha_hash_scale:
  862. .. rst-class:: classref-property
  863. :ref:`float<class_float>` **alpha_hash_scale**
  864. .. rst-class:: classref-property-setget
  865. - void **set_alpha_hash_scale** **(** :ref:`float<class_float>` value **)**
  866. - :ref:`float<class_float>` **get_alpha_hash_scale** **(** **)**
  867. The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``.
  868. .. rst-class:: classref-item-separator
  869. ----
  870. .. _class_BaseMaterial3D_property_alpha_scissor_threshold:
  871. .. rst-class:: classref-property
  872. :ref:`float<class_float>` **alpha_scissor_threshold**
  873. .. rst-class:: classref-property-setget
  874. - void **set_alpha_scissor_threshold** **(** :ref:`float<class_float>` value **)**
  875. - :ref:`float<class_float>` **get_alpha_scissor_threshold** **(** **)**
  876. Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing :ref:`alpha_scissor_threshold<class_BaseMaterial3D_property_alpha_scissor_threshold>`. If the material disappears at a distance, try decreasing :ref:`alpha_scissor_threshold<class_BaseMaterial3D_property_alpha_scissor_threshold>`.
  877. .. rst-class:: classref-item-separator
  878. ----
  879. .. _class_BaseMaterial3D_property_anisotropy:
  880. .. rst-class:: classref-property
  881. :ref:`float<class_float>` **anisotropy** = ``0.0``
  882. .. rst-class:: classref-property-setget
  883. - void **set_anisotropy** **(** :ref:`float<class_float>` value **)**
  884. - :ref:`float<class_float>` **get_anisotropy** **(** **)**
  885. The strength of the anisotropy effect. This is multiplied by :ref:`anisotropy_flowmap<class_BaseMaterial3D_property_anisotropy_flowmap>`'s alpha channel if a texture is defined there and the texture contains an alpha channel.
  886. .. rst-class:: classref-item-separator
  887. ----
  888. .. _class_BaseMaterial3D_property_anisotropy_enabled:
  889. .. rst-class:: classref-property
  890. :ref:`bool<class_bool>` **anisotropy_enabled** = ``false``
  891. .. rst-class:: classref-property-setget
  892. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  893. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  894. If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections.
  895. \ **Note:** Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.
  896. \ **Note:** Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting :ref:`texture_filter<class_BaseMaterial3D_property_texture_filter>` to :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC<class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC>`.
  897. .. rst-class:: classref-item-separator
  898. ----
  899. .. _class_BaseMaterial3D_property_anisotropy_flowmap:
  900. .. rst-class:: classref-property
  901. :ref:`Texture2D<class_Texture2D>` **anisotropy_flowmap**
  902. .. rst-class:: classref-property-setget
  903. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  904. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  905. Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.
  906. If present, the texture's alpha channel will be used to multiply the strength of the :ref:`anisotropy<class_BaseMaterial3D_property_anisotropy>` effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored.
  907. .. rst-class:: classref-item-separator
  908. ----
  909. .. _class_BaseMaterial3D_property_ao_enabled:
  910. .. rst-class:: classref-property
  911. :ref:`bool<class_bool>` **ao_enabled** = ``false``
  912. .. rst-class:: classref-property-setget
  913. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  914. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  915. If ``true``, ambient occlusion is enabled. Ambient occlusion darkens areas based on the :ref:`ao_texture<class_BaseMaterial3D_property_ao_texture>`.
  916. .. rst-class:: classref-item-separator
  917. ----
  918. .. _class_BaseMaterial3D_property_ao_light_affect:
  919. .. rst-class:: classref-property
  920. :ref:`float<class_float>` **ao_light_affect** = ``0.0``
  921. .. rst-class:: classref-property-setget
  922. - void **set_ao_light_affect** **(** :ref:`float<class_float>` value **)**
  923. - :ref:`float<class_float>` **get_ao_light_affect** **(** **)**
  924. Amount that ambient occlusion affects lighting from lights. If ``0``, ambient occlusion only affects ambient light. If ``1``, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic.
  925. .. rst-class:: classref-item-separator
  926. ----
  927. .. _class_BaseMaterial3D_property_ao_on_uv2:
  928. .. rst-class:: classref-property
  929. :ref:`bool<class_bool>` **ao_on_uv2** = ``false``
  930. .. rst-class:: classref-property-setget
  931. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  932. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  933. If ``true``, use ``UV2`` coordinates to look up from the :ref:`ao_texture<class_BaseMaterial3D_property_ao_texture>`.
  934. .. rst-class:: classref-item-separator
  935. ----
  936. .. _class_BaseMaterial3D_property_ao_texture:
  937. .. rst-class:: classref-property
  938. :ref:`Texture2D<class_Texture2D>` **ao_texture**
  939. .. rst-class:: classref-property-setget
  940. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  941. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  942. Texture that defines the amount of ambient occlusion for a given point on the object.
  943. .. rst-class:: classref-item-separator
  944. ----
  945. .. _class_BaseMaterial3D_property_ao_texture_channel:
  946. .. rst-class:: classref-property
  947. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **ao_texture_channel** = ``0``
  948. .. rst-class:: classref-property-setget
  949. - void **set_ao_texture_channel** **(** :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` value **)**
  950. - :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **get_ao_texture_channel** **(** **)**
  951. Specifies the channel of the :ref:`ao_texture<class_BaseMaterial3D_property_ao_texture>` in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  952. .. rst-class:: classref-item-separator
  953. ----
  954. .. _class_BaseMaterial3D_property_backlight:
  955. .. rst-class:: classref-property
  956. :ref:`Color<class_Color>` **backlight** = ``Color(0, 0, 0, 1)``
  957. .. rst-class:: classref-property-setget
  958. - void **set_backlight** **(** :ref:`Color<class_Color>` value **)**
  959. - :ref:`Color<class_Color>` **get_backlight** **(** **)**
  960. The color used by the backlight effect. Represents the light passing through an object.
  961. .. rst-class:: classref-item-separator
  962. ----
  963. .. _class_BaseMaterial3D_property_backlight_enabled:
  964. .. rst-class:: classref-property
  965. :ref:`bool<class_bool>` **backlight_enabled** = ``false``
  966. .. rst-class:: classref-property-setget
  967. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  968. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  969. If ``true``, the backlight effect is enabled. See also :ref:`subsurf_scatter_transmittance_enabled<class_BaseMaterial3D_property_subsurf_scatter_transmittance_enabled>`.
  970. .. rst-class:: classref-item-separator
  971. ----
  972. .. _class_BaseMaterial3D_property_backlight_texture:
  973. .. rst-class:: classref-property
  974. :ref:`Texture2D<class_Texture2D>` **backlight_texture**
  975. .. rst-class:: classref-property-setget
  976. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  977. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  978. Texture used to control the backlight effect per-pixel. Added to :ref:`backlight<class_BaseMaterial3D_property_backlight>`.
  979. .. rst-class:: classref-item-separator
  980. ----
  981. .. _class_BaseMaterial3D_property_billboard_keep_scale:
  982. .. rst-class:: classref-property
  983. :ref:`bool<class_bool>` **billboard_keep_scale** = ``false``
  984. .. rst-class:: classref-property-setget
  985. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  986. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  987. If ``true``, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>` is :ref:`BILLBOARD_ENABLED<class_BaseMaterial3D_constant_BILLBOARD_ENABLED>`.
  988. .. rst-class:: classref-item-separator
  989. ----
  990. .. _class_BaseMaterial3D_property_billboard_mode:
  991. .. rst-class:: classref-property
  992. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard_mode** = ``0``
  993. .. rst-class:: classref-property-setget
  994. - void **set_billboard_mode** **(** :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` value **)**
  995. - :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode** **(** **)**
  996. Controls how the object faces the camera. See :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>`.
  997. \ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See `GitHub issue #41567 <https://github.com/godotengine/godot/issues/41567>`__ for details.
  998. .. rst-class:: classref-item-separator
  999. ----
  1000. .. _class_BaseMaterial3D_property_blend_mode:
  1001. .. rst-class:: classref-property
  1002. :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **blend_mode** = ``0``
  1003. .. rst-class:: classref-property-setget
  1004. - void **set_blend_mode** **(** :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` value **)**
  1005. - :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **get_blend_mode** **(** **)**
  1006. The material's blend mode.
  1007. \ **Note:** Values other than ``Mix`` force the object into the transparent pipeline. See :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>`.
  1008. .. rst-class:: classref-item-separator
  1009. ----
  1010. .. _class_BaseMaterial3D_property_clearcoat:
  1011. .. rst-class:: classref-property
  1012. :ref:`float<class_float>` **clearcoat** = ``1.0``
  1013. .. rst-class:: classref-property-setget
  1014. - void **set_clearcoat** **(** :ref:`float<class_float>` value **)**
  1015. - :ref:`float<class_float>` **get_clearcoat** **(** **)**
  1016. Sets the strength of the clearcoat effect. Setting to ``0`` looks the same as disabling the clearcoat effect.
  1017. .. rst-class:: classref-item-separator
  1018. ----
  1019. .. _class_BaseMaterial3D_property_clearcoat_enabled:
  1020. .. rst-class:: classref-property
  1021. :ref:`bool<class_bool>` **clearcoat_enabled** = ``false``
  1022. .. rst-class:: classref-property-setget
  1023. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1024. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1025. If ``true``, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.
  1026. \ **Note:** Clearcoat rendering is not visible if the material's :ref:`shading_mode<class_BaseMaterial3D_property_shading_mode>` is :ref:`SHADING_MODE_UNSHADED<class_BaseMaterial3D_constant_SHADING_MODE_UNSHADED>`.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_BaseMaterial3D_property_clearcoat_roughness:
  1030. .. rst-class:: classref-property
  1031. :ref:`float<class_float>` **clearcoat_roughness** = ``0.5``
  1032. .. rst-class:: classref-property-setget
  1033. - void **set_clearcoat_roughness** **(** :ref:`float<class_float>` value **)**
  1034. - :ref:`float<class_float>` **get_clearcoat_roughness** **(** **)**
  1035. Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat.
  1036. .. rst-class:: classref-item-separator
  1037. ----
  1038. .. _class_BaseMaterial3D_property_clearcoat_texture:
  1039. .. rst-class:: classref-property
  1040. :ref:`Texture2D<class_Texture2D>` **clearcoat_texture**
  1041. .. rst-class:: classref-property-setget
  1042. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1043. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1044. Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel.
  1045. .. rst-class:: classref-item-separator
  1046. ----
  1047. .. _class_BaseMaterial3D_property_cull_mode:
  1048. .. rst-class:: classref-property
  1049. :ref:`CullMode<enum_BaseMaterial3D_CullMode>` **cull_mode** = ``0``
  1050. .. rst-class:: classref-property-setget
  1051. - void **set_cull_mode** **(** :ref:`CullMode<enum_BaseMaterial3D_CullMode>` value **)**
  1052. - :ref:`CullMode<enum_BaseMaterial3D_CullMode>` **get_cull_mode** **(** **)**
  1053. Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See :ref:`CullMode<enum_BaseMaterial3D_CullMode>`.
  1054. .. rst-class:: classref-item-separator
  1055. ----
  1056. .. _class_BaseMaterial3D_property_depth_draw_mode:
  1057. .. rst-class:: classref-property
  1058. :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` **depth_draw_mode** = ``0``
  1059. .. rst-class:: classref-property-setget
  1060. - void **set_depth_draw_mode** **(** :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` value **)**
  1061. - :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>` **get_depth_draw_mode** **(** **)**
  1062. Determines when depth rendering takes place. See :ref:`DepthDrawMode<enum_BaseMaterial3D_DepthDrawMode>`. See also :ref:`transparency<class_BaseMaterial3D_property_transparency>`.
  1063. .. rst-class:: classref-item-separator
  1064. ----
  1065. .. _class_BaseMaterial3D_property_detail_albedo:
  1066. .. rst-class:: classref-property
  1067. :ref:`Texture2D<class_Texture2D>` **detail_albedo**
  1068. .. rst-class:: classref-property-setget
  1069. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1070. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1071. Texture that specifies the color of the detail overlay. :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>`'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see :ref:`detail_mask<class_BaseMaterial3D_property_detail_mask>`.
  1072. \ **Note:** :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` is *not* modulated by :ref:`albedo_color<class_BaseMaterial3D_property_albedo_color>`.
  1073. .. rst-class:: classref-item-separator
  1074. ----
  1075. .. _class_BaseMaterial3D_property_detail_blend_mode:
  1076. .. rst-class:: classref-property
  1077. :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **detail_blend_mode** = ``0``
  1078. .. rst-class:: classref-property-setget
  1079. - void **set_detail_blend_mode** **(** :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` value **)**
  1080. - :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` **get_detail_blend_mode** **(** **)**
  1081. Specifies how the :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` should blend with the current ``ALBEDO``. See :ref:`BlendMode<enum_BaseMaterial3D_BlendMode>` for options.
  1082. .. rst-class:: classref-item-separator
  1083. ----
  1084. .. _class_BaseMaterial3D_property_detail_enabled:
  1085. .. rst-class:: classref-property
  1086. :ref:`bool<class_bool>` **detail_enabled** = ``false``
  1087. .. rst-class:: classref-property-setget
  1088. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1089. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1090. If ``true``, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on :ref:`detail_mask<class_BaseMaterial3D_property_detail_mask>` and :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>`'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures.
  1091. .. rst-class:: classref-item-separator
  1092. ----
  1093. .. _class_BaseMaterial3D_property_detail_mask:
  1094. .. rst-class:: classref-property
  1095. :ref:`Texture2D<class_Texture2D>` **detail_mask**
  1096. .. rst-class:: classref-property-setget
  1097. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1098. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1099. Texture used to specify how the detail textures get blended with the base textures. :ref:`detail_mask<class_BaseMaterial3D_property_detail_mask>` can be used together with :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>`'s alpha channel (if any).
  1100. .. rst-class:: classref-item-separator
  1101. ----
  1102. .. _class_BaseMaterial3D_property_detail_normal:
  1103. .. rst-class:: classref-property
  1104. :ref:`Texture2D<class_Texture2D>` **detail_normal**
  1105. .. rst-class:: classref-property-setget
  1106. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1107. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1108. Texture that specifies the per-pixel normal of the detail overlay. The :ref:`detail_normal<class_BaseMaterial3D_property_detail_normal>` texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`detail_normal<class_BaseMaterial3D_property_detail_normal>` is oriented around the surface normal provided by the :ref:`Mesh<class_Mesh>`.
  1109. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
  1110. .. rst-class:: classref-item-separator
  1111. ----
  1112. .. _class_BaseMaterial3D_property_detail_uv_layer:
  1113. .. rst-class:: classref-property
  1114. :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` **detail_uv_layer** = ``0``
  1115. .. rst-class:: classref-property-setget
  1116. - void **set_detail_uv** **(** :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` value **)**
  1117. - :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` **get_detail_uv** **(** **)**
  1118. Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`DetailUV<enum_BaseMaterial3D_DetailUV>` for options.
  1119. .. rst-class:: classref-item-separator
  1120. ----
  1121. .. _class_BaseMaterial3D_property_diffuse_mode:
  1122. .. rst-class:: classref-property
  1123. :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` **diffuse_mode** = ``0``
  1124. .. rst-class:: classref-property-setget
  1125. - void **set_diffuse_mode** **(** :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` value **)**
  1126. - :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>` **get_diffuse_mode** **(** **)**
  1127. The algorithm used for diffuse light scattering. See :ref:`DiffuseMode<enum_BaseMaterial3D_DiffuseMode>`.
  1128. .. rst-class:: classref-item-separator
  1129. ----
  1130. .. _class_BaseMaterial3D_property_disable_ambient_light:
  1131. .. rst-class:: classref-property
  1132. :ref:`bool<class_bool>` **disable_ambient_light** = ``false``
  1133. .. rst-class:: classref-property-setget
  1134. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1135. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1136. If ``true``, the object receives no ambient light.
  1137. .. rst-class:: classref-item-separator
  1138. ----
  1139. .. _class_BaseMaterial3D_property_disable_receive_shadows:
  1140. .. rst-class:: classref-property
  1141. :ref:`bool<class_bool>` **disable_receive_shadows** = ``false``
  1142. .. rst-class:: classref-property-setget
  1143. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1144. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1145. If ``true``, the object receives no shadow that would otherwise be cast onto it.
  1146. .. rst-class:: classref-item-separator
  1147. ----
  1148. .. _class_BaseMaterial3D_property_distance_fade_max_distance:
  1149. .. rst-class:: classref-property
  1150. :ref:`float<class_float>` **distance_fade_max_distance** = ``10.0``
  1151. .. rst-class:: classref-property-setget
  1152. - void **set_distance_fade_max_distance** **(** :ref:`float<class_float>` value **)**
  1153. - :ref:`float<class_float>` **get_distance_fade_max_distance** **(** **)**
  1154. Distance at which the object appears fully opaque.
  1155. \ **Note:** If ``distance_fade_max_distance`` is less than ``distance_fade_min_distance``, the behavior will be reversed. The object will start to fade away at ``distance_fade_max_distance`` and will fully disappear once it reaches ``distance_fade_min_distance``.
  1156. .. rst-class:: classref-item-separator
  1157. ----
  1158. .. _class_BaseMaterial3D_property_distance_fade_min_distance:
  1159. .. rst-class:: classref-property
  1160. :ref:`float<class_float>` **distance_fade_min_distance** = ``0.0``
  1161. .. rst-class:: classref-property-setget
  1162. - void **set_distance_fade_min_distance** **(** :ref:`float<class_float>` value **)**
  1163. - :ref:`float<class_float>` **get_distance_fade_min_distance** **(** **)**
  1164. Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.
  1165. \ **Note:** If ``distance_fade_min_distance`` is greater than ``distance_fade_max_distance``, the behavior will be reversed. The object will start to fade away at ``distance_fade_max_distance`` and will fully disappear once it reaches ``distance_fade_min_distance``.
  1166. .. rst-class:: classref-item-separator
  1167. ----
  1168. .. _class_BaseMaterial3D_property_distance_fade_mode:
  1169. .. rst-class:: classref-property
  1170. :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` **distance_fade_mode** = ``0``
  1171. .. rst-class:: classref-property-setget
  1172. - void **set_distance_fade** **(** :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` value **)**
  1173. - :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>` **get_distance_fade** **(** **)**
  1174. Specifies which type of fade to use. Can be any of the :ref:`DistanceFadeMode<enum_BaseMaterial3D_DistanceFadeMode>`\ s.
  1175. .. rst-class:: classref-item-separator
  1176. ----
  1177. .. _class_BaseMaterial3D_property_emission:
  1178. .. rst-class:: classref-property
  1179. :ref:`Color<class_Color>` **emission** = ``Color(0, 0, 0, 1)``
  1180. .. rst-class:: classref-property-setget
  1181. - void **set_emission** **(** :ref:`Color<class_Color>` value **)**
  1182. - :ref:`Color<class_Color>` **get_emission** **(** **)**
  1183. The emitted light's color. See :ref:`emission_enabled<class_BaseMaterial3D_property_emission_enabled>`.
  1184. .. rst-class:: classref-item-separator
  1185. ----
  1186. .. _class_BaseMaterial3D_property_emission_enabled:
  1187. .. rst-class:: classref-property
  1188. :ref:`bool<class_bool>` **emission_enabled** = ``false``
  1189. .. rst-class:: classref-property-setget
  1190. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1191. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1192. If ``true``, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a :ref:`VoxelGI<class_VoxelGI>`, SDFGI, or :ref:`LightmapGI<class_LightmapGI>` is used and this object is used in baked lighting.
  1193. .. rst-class:: classref-item-separator
  1194. ----
  1195. .. _class_BaseMaterial3D_property_emission_energy_multiplier:
  1196. .. rst-class:: classref-property
  1197. :ref:`float<class_float>` **emission_energy_multiplier** = ``1.0``
  1198. .. rst-class:: classref-property-setget
  1199. - void **set_emission_energy_multiplier** **(** :ref:`float<class_float>` value **)**
  1200. - :ref:`float<class_float>` **get_emission_energy_multiplier** **(** **)**
  1201. Multiplier for emitted light. See :ref:`emission_enabled<class_BaseMaterial3D_property_emission_enabled>`.
  1202. .. rst-class:: classref-item-separator
  1203. ----
  1204. .. _class_BaseMaterial3D_property_emission_intensity:
  1205. .. rst-class:: classref-property
  1206. :ref:`float<class_float>` **emission_intensity**
  1207. .. rst-class:: classref-property-setget
  1208. - void **set_emission_intensity** **(** :ref:`float<class_float>` value **)**
  1209. - :ref:`float<class_float>` **get_emission_intensity** **(** **)**
  1210. Luminance of emitted light, measured in nits (candela per square meter). Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is enabled. The default is roughly equivalent to an indoor lightbulb.
  1211. .. rst-class:: classref-item-separator
  1212. ----
  1213. .. _class_BaseMaterial3D_property_emission_on_uv2:
  1214. .. rst-class:: classref-property
  1215. :ref:`bool<class_bool>` **emission_on_uv2** = ``false``
  1216. .. rst-class:: classref-property-setget
  1217. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1218. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1219. Use ``UV2`` to read from the :ref:`emission_texture<class_BaseMaterial3D_property_emission_texture>`.
  1220. .. rst-class:: classref-item-separator
  1221. ----
  1222. .. _class_BaseMaterial3D_property_emission_operator:
  1223. .. rst-class:: classref-property
  1224. :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` **emission_operator** = ``0``
  1225. .. rst-class:: classref-property-setget
  1226. - void **set_emission_operator** **(** :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` value **)**
  1227. - :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` **get_emission_operator** **(** **)**
  1228. Sets how :ref:`emission<class_BaseMaterial3D_property_emission>` interacts with :ref:`emission_texture<class_BaseMaterial3D_property_emission_texture>`. Can either add or multiply. See :ref:`EmissionOperator<enum_BaseMaterial3D_EmissionOperator>` for options.
  1229. .. rst-class:: classref-item-separator
  1230. ----
  1231. .. _class_BaseMaterial3D_property_emission_texture:
  1232. .. rst-class:: classref-property
  1233. :ref:`Texture2D<class_Texture2D>` **emission_texture**
  1234. .. rst-class:: classref-property-setget
  1235. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1236. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1237. Texture that specifies how much surface emits light at a given point.
  1238. .. rst-class:: classref-item-separator
  1239. ----
  1240. .. _class_BaseMaterial3D_property_fixed_size:
  1241. .. rst-class:: classref-property
  1242. :ref:`bool<class_bool>` **fixed_size** = ``false``
  1243. .. rst-class:: classref-property-setget
  1244. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1245. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1246. If ``true``, the object is rendered at the same size regardless of distance.
  1247. .. rst-class:: classref-item-separator
  1248. ----
  1249. .. _class_BaseMaterial3D_property_grow:
  1250. .. rst-class:: classref-property
  1251. :ref:`bool<class_bool>` **grow** = ``false``
  1252. .. rst-class:: classref-property-setget
  1253. - void **set_grow_enabled** **(** :ref:`bool<class_bool>` value **)**
  1254. - :ref:`bool<class_bool>` **is_grow_enabled** **(** **)**
  1255. If ``true``, enables the vertex grow setting. See :ref:`grow_amount<class_BaseMaterial3D_property_grow_amount>`.
  1256. .. rst-class:: classref-item-separator
  1257. ----
  1258. .. _class_BaseMaterial3D_property_grow_amount:
  1259. .. rst-class:: classref-property
  1260. :ref:`float<class_float>` **grow_amount** = ``0.0``
  1261. .. rst-class:: classref-property-setget
  1262. - void **set_grow** **(** :ref:`float<class_float>` value **)**
  1263. - :ref:`float<class_float>` **get_grow** **(** **)**
  1264. Grows object vertices in the direction of their normals.
  1265. .. rst-class:: classref-item-separator
  1266. ----
  1267. .. _class_BaseMaterial3D_property_heightmap_deep_parallax:
  1268. .. rst-class:: classref-property
  1269. :ref:`bool<class_bool>` **heightmap_deep_parallax** = ``false``
  1270. .. rst-class:: classref-property-setget
  1271. - void **set_heightmap_deep_parallax** **(** :ref:`bool<class_bool>` value **)**
  1272. - :ref:`bool<class_bool>` **is_heightmap_deep_parallax_enabled** **(** **)**
  1273. If ``true``, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see :ref:`heightmap_enabled<class_BaseMaterial3D_property_heightmap_enabled>`). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference.
  1274. .. rst-class:: classref-item-separator
  1275. ----
  1276. .. _class_BaseMaterial3D_property_heightmap_enabled:
  1277. .. rst-class:: classref-property
  1278. :ref:`bool<class_bool>` **heightmap_enabled** = ``false``
  1279. .. rst-class:: classref-property-setget
  1280. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1281. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1282. If ``true``, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also :ref:`normal_enabled<class_BaseMaterial3D_property_normal_enabled>`. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference.
  1283. \ **Note:** Height mapping is not supported if triplanar mapping is used on the same material. The value of :ref:`heightmap_enabled<class_BaseMaterial3D_property_heightmap_enabled>` will be ignored if :ref:`uv1_triplanar<class_BaseMaterial3D_property_uv1_triplanar>` is enabled.
  1284. .. rst-class:: classref-item-separator
  1285. ----
  1286. .. _class_BaseMaterial3D_property_heightmap_flip_binormal:
  1287. .. rst-class:: classref-property
  1288. :ref:`bool<class_bool>` **heightmap_flip_binormal** = ``false``
  1289. .. rst-class:: classref-property-setget
  1290. - void **set_heightmap_deep_parallax_flip_binormal** **(** :ref:`bool<class_bool>` value **)**
  1291. - :ref:`bool<class_bool>` **get_heightmap_deep_parallax_flip_binormal** **(** **)**
  1292. If ``true``, flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable :ref:`heightmap_scale<class_BaseMaterial3D_property_heightmap_scale>`), try setting this to ``true``.
  1293. .. rst-class:: classref-item-separator
  1294. ----
  1295. .. _class_BaseMaterial3D_property_heightmap_flip_tangent:
  1296. .. rst-class:: classref-property
  1297. :ref:`bool<class_bool>` **heightmap_flip_tangent** = ``false``
  1298. .. rst-class:: classref-property-setget
  1299. - void **set_heightmap_deep_parallax_flip_tangent** **(** :ref:`bool<class_bool>` value **)**
  1300. - :ref:`bool<class_bool>` **get_heightmap_deep_parallax_flip_tangent** **(** **)**
  1301. If ``true``, flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable :ref:`heightmap_scale<class_BaseMaterial3D_property_heightmap_scale>`), try setting this to ``true``.
  1302. .. rst-class:: classref-item-separator
  1303. ----
  1304. .. _class_BaseMaterial3D_property_heightmap_flip_texture:
  1305. .. rst-class:: classref-property
  1306. :ref:`bool<class_bool>` **heightmap_flip_texture** = ``false``
  1307. .. rst-class:: classref-property-setget
  1308. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1309. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1310. If ``true``, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values.
  1311. This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case :ref:`heightmap_flip_texture<class_BaseMaterial3D_property_heightmap_flip_texture>` should remain ``false``.
  1312. .. rst-class:: classref-item-separator
  1313. ----
  1314. .. _class_BaseMaterial3D_property_heightmap_max_layers:
  1315. .. rst-class:: classref-property
  1316. :ref:`int<class_int>` **heightmap_max_layers**
  1317. .. rst-class:: classref-property-setget
  1318. - void **set_heightmap_deep_parallax_max_layers** **(** :ref:`int<class_int>` value **)**
  1319. - :ref:`int<class_int>` **get_heightmap_deep_parallax_max_layers** **(** **)**
  1320. The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference.
  1321. \ **Note:** Only effective if :ref:`heightmap_deep_parallax<class_BaseMaterial3D_property_heightmap_deep_parallax>` is ``true``.
  1322. .. rst-class:: classref-item-separator
  1323. ----
  1324. .. _class_BaseMaterial3D_property_heightmap_min_layers:
  1325. .. rst-class:: classref-property
  1326. :ref:`int<class_int>` **heightmap_min_layers**
  1327. .. rst-class:: classref-property-setget
  1328. - void **set_heightmap_deep_parallax_min_layers** **(** :ref:`int<class_int>` value **)**
  1329. - :ref:`int<class_int>` **get_heightmap_deep_parallax_min_layers** **(** **)**
  1330. The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference.
  1331. \ **Note:** Only effective if :ref:`heightmap_deep_parallax<class_BaseMaterial3D_property_heightmap_deep_parallax>` is ``true``.
  1332. .. rst-class:: classref-item-separator
  1333. ----
  1334. .. _class_BaseMaterial3D_property_heightmap_scale:
  1335. .. rst-class:: classref-property
  1336. :ref:`float<class_float>` **heightmap_scale** = ``5.0``
  1337. .. rst-class:: classref-property-setget
  1338. - void **set_heightmap_scale** **(** :ref:`float<class_float>` value **)**
  1339. - :ref:`float<class_float>` **get_heightmap_scale** **(** **)**
  1340. The heightmap scale to use for the parallax effect (see :ref:`heightmap_enabled<class_BaseMaterial3D_property_heightmap_enabled>`). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using :ref:`heightmap_flip_texture<class_BaseMaterial3D_property_heightmap_flip_texture>` as the material will also appear to be "closer" to the camera. In most cases, :ref:`heightmap_scale<class_BaseMaterial3D_property_heightmap_scale>` should be kept to a positive value.
  1341. \ **Note:** If the height map effect looks strange regardless of this value, try adjusting :ref:`heightmap_flip_binormal<class_BaseMaterial3D_property_heightmap_flip_binormal>` and :ref:`heightmap_flip_tangent<class_BaseMaterial3D_property_heightmap_flip_tangent>`. See also :ref:`heightmap_texture<class_BaseMaterial3D_property_heightmap_texture>` for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how :ref:`heightmap_scale<class_BaseMaterial3D_property_heightmap_scale>` behaves.
  1342. .. rst-class:: classref-item-separator
  1343. ----
  1344. .. _class_BaseMaterial3D_property_heightmap_texture:
  1345. .. rst-class:: classref-property
  1346. :ref:`Texture2D<class_Texture2D>` **heightmap_texture**
  1347. .. rst-class:: classref-property-setget
  1348. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1349. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1350. The texture to use as a height map. See also :ref:`heightmap_enabled<class_BaseMaterial3D_property_heightmap_enabled>`.
  1351. For best results, the texture should be normalized (with :ref:`heightmap_scale<class_BaseMaterial3D_property_heightmap_scale>` reduced to compensate). In `GIMP <https://gimp.org>`__, this can be done using **Colors > Auto > Equalize**. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves.
  1352. \ **Note:** To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data.
  1353. .. rst-class:: classref-item-separator
  1354. ----
  1355. .. _class_BaseMaterial3D_property_metallic:
  1356. .. rst-class:: classref-property
  1357. :ref:`float<class_float>` **metallic** = ``0.0``
  1358. .. rst-class:: classref-property-setget
  1359. - void **set_metallic** **(** :ref:`float<class_float>` value **)**
  1360. - :ref:`float<class_float>` **get_metallic** **(** **)**
  1361. A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between ``0`` and ``1`` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use :ref:`roughness<class_BaseMaterial3D_property_roughness>`.
  1362. .. rst-class:: classref-item-separator
  1363. ----
  1364. .. _class_BaseMaterial3D_property_metallic_specular:
  1365. .. rst-class:: classref-property
  1366. :ref:`float<class_float>` **metallic_specular** = ``0.5``
  1367. .. rst-class:: classref-property-setget
  1368. - void **set_specular** **(** :ref:`float<class_float>` value **)**
  1369. - :ref:`float<class_float>` **get_specular** **(** **)**
  1370. Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to ``0.0``, no specular reflections will be visible. This differs from the :ref:`SPECULAR_DISABLED<class_BaseMaterial3D_constant_SPECULAR_DISABLED>` :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` as :ref:`SPECULAR_DISABLED<class_BaseMaterial3D_constant_SPECULAR_DISABLED>` only applies to the specular lobe from the light source.
  1371. \ **Note:** Unlike :ref:`metallic<class_BaseMaterial3D_property_metallic>`, this is not energy-conserving, so it should be left at ``0.5`` in most cases. See also :ref:`roughness<class_BaseMaterial3D_property_roughness>`.
  1372. .. rst-class:: classref-item-separator
  1373. ----
  1374. .. _class_BaseMaterial3D_property_metallic_texture:
  1375. .. rst-class:: classref-property
  1376. :ref:`Texture2D<class_Texture2D>` **metallic_texture**
  1377. .. rst-class:: classref-property-setget
  1378. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1379. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1380. Texture used to specify metallic for an object. This is multiplied by :ref:`metallic<class_BaseMaterial3D_property_metallic>`.
  1381. .. rst-class:: classref-item-separator
  1382. ----
  1383. .. _class_BaseMaterial3D_property_metallic_texture_channel:
  1384. .. rst-class:: classref-property
  1385. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **metallic_texture_channel** = ``0``
  1386. .. rst-class:: classref-property-setget
  1387. - void **set_metallic_texture_channel** **(** :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` value **)**
  1388. - :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **get_metallic_texture_channel** **(** **)**
  1389. Specifies the channel of the :ref:`metallic_texture<class_BaseMaterial3D_property_metallic_texture>` in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  1390. .. rst-class:: classref-item-separator
  1391. ----
  1392. .. _class_BaseMaterial3D_property_msdf_outline_size:
  1393. .. rst-class:: classref-property
  1394. :ref:`float<class_float>` **msdf_outline_size** = ``0.0``
  1395. .. rst-class:: classref-property-setget
  1396. - void **set_msdf_outline_size** **(** :ref:`float<class_float>` value **)**
  1397. - :ref:`float<class_float>` **get_msdf_outline_size** **(** **)**
  1398. The width of the shape outine.
  1399. .. rst-class:: classref-item-separator
  1400. ----
  1401. .. _class_BaseMaterial3D_property_msdf_pixel_range:
  1402. .. rst-class:: classref-property
  1403. :ref:`float<class_float>` **msdf_pixel_range** = ``4.0``
  1404. .. rst-class:: classref-property-setget
  1405. - void **set_msdf_pixel_range** **(** :ref:`float<class_float>` value **)**
  1406. - :ref:`float<class_float>` **get_msdf_pixel_range** **(** **)**
  1407. The width of the range around the shape between the minimum and maximum representable signed distance.
  1408. .. rst-class:: classref-item-separator
  1409. ----
  1410. .. _class_BaseMaterial3D_property_no_depth_test:
  1411. .. rst-class:: classref-property
  1412. :ref:`bool<class_bool>` **no_depth_test** = ``false``
  1413. .. rst-class:: classref-property-setget
  1414. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1415. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1416. If ``true``, depth testing is disabled and the object will be drawn in render order.
  1417. .. rst-class:: classref-item-separator
  1418. ----
  1419. .. _class_BaseMaterial3D_property_normal_enabled:
  1420. .. rst-class:: classref-property
  1421. :ref:`bool<class_bool>` **normal_enabled** = ``false``
  1422. .. rst-class:: classref-property-setget
  1423. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1424. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1425. If ``true``, normal mapping is enabled.
  1426. .. rst-class:: classref-item-separator
  1427. ----
  1428. .. _class_BaseMaterial3D_property_normal_scale:
  1429. .. rst-class:: classref-property
  1430. :ref:`float<class_float>` **normal_scale** = ``1.0``
  1431. .. rst-class:: classref-property-setget
  1432. - void **set_normal_scale** **(** :ref:`float<class_float>` value **)**
  1433. - :ref:`float<class_float>` **get_normal_scale** **(** **)**
  1434. The strength of the normal map's effect.
  1435. .. rst-class:: classref-item-separator
  1436. ----
  1437. .. _class_BaseMaterial3D_property_normal_texture:
  1438. .. rst-class:: classref-property
  1439. :ref:`Texture2D<class_Texture2D>` **normal_texture**
  1440. .. rst-class:: classref-property-setget
  1441. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1442. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1443. Texture used to specify the normal at a given pixel. The :ref:`normal_texture<class_BaseMaterial3D_property_normal_texture>` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`normal_texture<class_BaseMaterial3D_property_normal_texture>` is oriented around the surface normal provided by the :ref:`Mesh<class_Mesh>`.
  1444. \ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool<class_SurfaceTool>`, you can use :ref:`SurfaceTool.generate_normals<class_SurfaceTool_method_generate_normals>` and :ref:`SurfaceTool.generate_tangents<class_SurfaceTool_method_generate_tangents>` to automatically generate normals and tangents respectively.
  1445. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
  1446. \ **Note:** If :ref:`detail_enabled<class_BaseMaterial3D_property_detail_enabled>` is ``true``, the :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` texture is drawn *below* the :ref:`normal_texture<class_BaseMaterial3D_property_normal_texture>`. To display a normal map *above* the :ref:`detail_albedo<class_BaseMaterial3D_property_detail_albedo>` texture, use :ref:`detail_normal<class_BaseMaterial3D_property_detail_normal>` instead.
  1447. .. rst-class:: classref-item-separator
  1448. ----
  1449. .. _class_BaseMaterial3D_property_orm_texture:
  1450. .. rst-class:: classref-property
  1451. :ref:`Texture2D<class_Texture2D>` **orm_texture**
  1452. .. rst-class:: classref-property-setget
  1453. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1454. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1455. The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of :ref:`ao_texture<class_BaseMaterial3D_property_ao_texture>`, :ref:`roughness_texture<class_BaseMaterial3D_property_roughness_texture>` and :ref:`metallic_texture<class_BaseMaterial3D_property_metallic_texture>` in :ref:`ORMMaterial3D<class_ORMMaterial3D>`. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored.
  1456. .. rst-class:: classref-item-separator
  1457. ----
  1458. .. _class_BaseMaterial3D_property_particles_anim_h_frames:
  1459. .. rst-class:: classref-property
  1460. :ref:`int<class_int>` **particles_anim_h_frames**
  1461. .. rst-class:: classref-property-setget
  1462. - void **set_particles_anim_h_frames** **(** :ref:`int<class_int>` value **)**
  1463. - :ref:`int<class_int>` **get_particles_anim_h_frames** **(** **)**
  1464. The number of horizontal frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES<class_BaseMaterial3D_constant_BILLBOARD_PARTICLES>`. See :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>`.
  1465. .. rst-class:: classref-item-separator
  1466. ----
  1467. .. _class_BaseMaterial3D_property_particles_anim_loop:
  1468. .. rst-class:: classref-property
  1469. :ref:`bool<class_bool>` **particles_anim_loop**
  1470. .. rst-class:: classref-property-setget
  1471. - void **set_particles_anim_loop** **(** :ref:`bool<class_bool>` value **)**
  1472. - :ref:`bool<class_bool>` **get_particles_anim_loop** **(** **)**
  1473. If ``true``, particle animations are looped. Only enabled when using :ref:`BILLBOARD_PARTICLES<class_BaseMaterial3D_constant_BILLBOARD_PARTICLES>`. See :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>`.
  1474. .. rst-class:: classref-item-separator
  1475. ----
  1476. .. _class_BaseMaterial3D_property_particles_anim_v_frames:
  1477. .. rst-class:: classref-property
  1478. :ref:`int<class_int>` **particles_anim_v_frames**
  1479. .. rst-class:: classref-property-setget
  1480. - void **set_particles_anim_v_frames** **(** :ref:`int<class_int>` value **)**
  1481. - :ref:`int<class_int>` **get_particles_anim_v_frames** **(** **)**
  1482. The number of vertical frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES<class_BaseMaterial3D_constant_BILLBOARD_PARTICLES>`. See :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>`.
  1483. .. rst-class:: classref-item-separator
  1484. ----
  1485. .. _class_BaseMaterial3D_property_point_size:
  1486. .. rst-class:: classref-property
  1487. :ref:`float<class_float>` **point_size** = ``1.0``
  1488. .. rst-class:: classref-property-setget
  1489. - void **set_point_size** **(** :ref:`float<class_float>` value **)**
  1490. - :ref:`float<class_float>` **get_point_size** **(** **)**
  1491. The point size in pixels. See :ref:`use_point_size<class_BaseMaterial3D_property_use_point_size>`.
  1492. .. rst-class:: classref-item-separator
  1493. ----
  1494. .. _class_BaseMaterial3D_property_proximity_fade_distance:
  1495. .. rst-class:: classref-property
  1496. :ref:`float<class_float>` **proximity_fade_distance** = ``1.0``
  1497. .. rst-class:: classref-property-setget
  1498. - void **set_proximity_fade_distance** **(** :ref:`float<class_float>` value **)**
  1499. - :ref:`float<class_float>` **get_proximity_fade_distance** **(** **)**
  1500. Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.
  1501. .. rst-class:: classref-item-separator
  1502. ----
  1503. .. _class_BaseMaterial3D_property_proximity_fade_enabled:
  1504. .. rst-class:: classref-property
  1505. :ref:`bool<class_bool>` **proximity_fade_enabled** = ``false``
  1506. .. rst-class:: classref-property-setget
  1507. - void **set_proximity_fade_enabled** **(** :ref:`bool<class_bool>` value **)**
  1508. - :ref:`bool<class_bool>` **is_proximity_fade_enabled** **(** **)**
  1509. If ``true``, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.
  1510. .. rst-class:: classref-item-separator
  1511. ----
  1512. .. _class_BaseMaterial3D_property_refraction_enabled:
  1513. .. rst-class:: classref-property
  1514. :ref:`bool<class_bool>` **refraction_enabled** = ``false``
  1515. .. rst-class:: classref-property-setget
  1516. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1517. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1518. If ``true``, the refraction effect is enabled. Distorts transparency based on light from behind the object.
  1519. .. rst-class:: classref-item-separator
  1520. ----
  1521. .. _class_BaseMaterial3D_property_refraction_scale:
  1522. .. rst-class:: classref-property
  1523. :ref:`float<class_float>` **refraction_scale** = ``0.05``
  1524. .. rst-class:: classref-property-setget
  1525. - void **set_refraction** **(** :ref:`float<class_float>` value **)**
  1526. - :ref:`float<class_float>` **get_refraction** **(** **)**
  1527. The strength of the refraction effect.
  1528. .. rst-class:: classref-item-separator
  1529. ----
  1530. .. _class_BaseMaterial3D_property_refraction_texture:
  1531. .. rst-class:: classref-property
  1532. :ref:`Texture2D<class_Texture2D>` **refraction_texture**
  1533. .. rst-class:: classref-property-setget
  1534. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1535. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1536. Texture that controls the strength of the refraction per-pixel. Multiplied by :ref:`refraction_scale<class_BaseMaterial3D_property_refraction_scale>`.
  1537. .. rst-class:: classref-item-separator
  1538. ----
  1539. .. _class_BaseMaterial3D_property_refraction_texture_channel:
  1540. .. rst-class:: classref-property
  1541. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **refraction_texture_channel** = ``0``
  1542. .. rst-class:: classref-property-setget
  1543. - void **set_refraction_texture_channel** **(** :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` value **)**
  1544. - :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **get_refraction_texture_channel** **(** **)**
  1545. Specifies the channel of the :ref:`refraction_texture<class_BaseMaterial3D_property_refraction_texture>` in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  1546. .. rst-class:: classref-item-separator
  1547. ----
  1548. .. _class_BaseMaterial3D_property_rim:
  1549. .. rst-class:: classref-property
  1550. :ref:`float<class_float>` **rim** = ``1.0``
  1551. .. rst-class:: classref-property-setget
  1552. - void **set_rim** **(** :ref:`float<class_float>` value **)**
  1553. - :ref:`float<class_float>` **get_rim** **(** **)**
  1554. Sets the strength of the rim lighting effect.
  1555. .. rst-class:: classref-item-separator
  1556. ----
  1557. .. _class_BaseMaterial3D_property_rim_enabled:
  1558. .. rst-class:: classref-property
  1559. :ref:`bool<class_bool>` **rim_enabled** = ``false``
  1560. .. rst-class:: classref-property-setget
  1561. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1562. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1563. If ``true``, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.
  1564. \ **Note:** Rim lighting is not visible if the material's :ref:`shading_mode<class_BaseMaterial3D_property_shading_mode>` is :ref:`SHADING_MODE_UNSHADED<class_BaseMaterial3D_constant_SHADING_MODE_UNSHADED>`.
  1565. .. rst-class:: classref-item-separator
  1566. ----
  1567. .. _class_BaseMaterial3D_property_rim_texture:
  1568. .. rst-class:: classref-property
  1569. :ref:`Texture2D<class_Texture2D>` **rim_texture**
  1570. .. rst-class:: classref-property-setget
  1571. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1572. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1573. Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by :ref:`rim<class_BaseMaterial3D_property_rim>`.
  1574. .. rst-class:: classref-item-separator
  1575. ----
  1576. .. _class_BaseMaterial3D_property_rim_tint:
  1577. .. rst-class:: classref-property
  1578. :ref:`float<class_float>` **rim_tint** = ``0.5``
  1579. .. rst-class:: classref-property-setget
  1580. - void **set_rim_tint** **(** :ref:`float<class_float>` value **)**
  1581. - :ref:`float<class_float>` **get_rim_tint** **(** **)**
  1582. The amount of to blend light and albedo color when rendering rim effect. If ``0`` the light color is used, while ``1`` means albedo color is used. An intermediate value generally works best.
  1583. .. rst-class:: classref-item-separator
  1584. ----
  1585. .. _class_BaseMaterial3D_property_roughness:
  1586. .. rst-class:: classref-property
  1587. :ref:`float<class_float>` **roughness** = ``1.0``
  1588. .. rst-class:: classref-property-setget
  1589. - void **set_roughness** **(** :ref:`float<class_float>` value **)**
  1590. - :ref:`float<class_float>` **get_roughness** **(** **)**
  1591. Surface reflection. A value of ``0`` represents a perfect mirror while a value of ``1`` completely blurs the reflection. See also :ref:`metallic<class_BaseMaterial3D_property_metallic>`.
  1592. .. rst-class:: classref-item-separator
  1593. ----
  1594. .. _class_BaseMaterial3D_property_roughness_texture:
  1595. .. rst-class:: classref-property
  1596. :ref:`Texture2D<class_Texture2D>` **roughness_texture**
  1597. .. rst-class:: classref-property-setget
  1598. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1599. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1600. Texture used to control the roughness per-pixel. Multiplied by :ref:`roughness<class_BaseMaterial3D_property_roughness>`.
  1601. .. rst-class:: classref-item-separator
  1602. ----
  1603. .. _class_BaseMaterial3D_property_roughness_texture_channel:
  1604. .. rst-class:: classref-property
  1605. :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **roughness_texture_channel** = ``0``
  1606. .. rst-class:: classref-property-setget
  1607. - void **set_roughness_texture_channel** **(** :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` value **)**
  1608. - :ref:`TextureChannel<enum_BaseMaterial3D_TextureChannel>` **get_roughness_texture_channel** **(** **)**
  1609. Specifies the channel of the :ref:`roughness_texture<class_BaseMaterial3D_property_roughness_texture>` in which the roughness information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
  1610. .. rst-class:: classref-item-separator
  1611. ----
  1612. .. _class_BaseMaterial3D_property_shading_mode:
  1613. .. rst-class:: classref-property
  1614. :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` **shading_mode** = ``1``
  1615. .. rst-class:: classref-property-setget
  1616. - void **set_shading_mode** **(** :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` value **)**
  1617. - :ref:`ShadingMode<enum_BaseMaterial3D_ShadingMode>` **get_shading_mode** **(** **)**
  1618. Sets whether the shading takes place per-pixel or per-vertex. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel.
  1619. .. rst-class:: classref-item-separator
  1620. ----
  1621. .. _class_BaseMaterial3D_property_shadow_to_opacity:
  1622. .. rst-class:: classref-property
  1623. :ref:`bool<class_bool>` **shadow_to_opacity** = ``false``
  1624. .. rst-class:: classref-property-setget
  1625. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1626. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1627. If ``true``, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR.
  1628. .. rst-class:: classref-item-separator
  1629. ----
  1630. .. _class_BaseMaterial3D_property_specular_mode:
  1631. .. rst-class:: classref-property
  1632. :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` **specular_mode** = ``0``
  1633. .. rst-class:: classref-property-setget
  1634. - void **set_specular_mode** **(** :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` value **)**
  1635. - :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>` **get_specular_mode** **(** **)**
  1636. The method for rendering the specular blob. See :ref:`SpecularMode<enum_BaseMaterial3D_SpecularMode>`.
  1637. \ **Note:** :ref:`specular_mode<class_BaseMaterial3D_property_specular_mode>` only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, :ref:`VoxelGI<class_VoxelGI>`, SDFGI or :ref:`ReflectionProbe<class_ReflectionProbe>`\ s. To disable reflections from these sources as well, set :ref:`metallic_specular<class_BaseMaterial3D_property_metallic_specular>` to ``0.0`` instead.
  1638. .. rst-class:: classref-item-separator
  1639. ----
  1640. .. _class_BaseMaterial3D_property_subsurf_scatter_enabled:
  1641. .. rst-class:: classref-property
  1642. :ref:`bool<class_bool>` **subsurf_scatter_enabled** = ``false``
  1643. .. rst-class:: classref-property-setget
  1644. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1645. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1646. If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
  1647. .. rst-class:: classref-item-separator
  1648. ----
  1649. .. _class_BaseMaterial3D_property_subsurf_scatter_skin_mode:
  1650. .. rst-class:: classref-property
  1651. :ref:`bool<class_bool>` **subsurf_scatter_skin_mode** = ``false``
  1652. .. rst-class:: classref-property-setget
  1653. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1654. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1655. If ``true``, subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.
  1656. .. rst-class:: classref-item-separator
  1657. ----
  1658. .. _class_BaseMaterial3D_property_subsurf_scatter_strength:
  1659. .. rst-class:: classref-property
  1660. :ref:`float<class_float>` **subsurf_scatter_strength** = ``0.0``
  1661. .. rst-class:: classref-property-setget
  1662. - void **set_subsurface_scattering_strength** **(** :ref:`float<class_float>` value **)**
  1663. - :ref:`float<class_float>` **get_subsurface_scattering_strength** **(** **)**
  1664. The strength of the subsurface scattering effect.
  1665. .. rst-class:: classref-item-separator
  1666. ----
  1667. .. _class_BaseMaterial3D_property_subsurf_scatter_texture:
  1668. .. rst-class:: classref-property
  1669. :ref:`Texture2D<class_Texture2D>` **subsurf_scatter_texture**
  1670. .. rst-class:: classref-property-setget
  1671. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1672. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1673. Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by :ref:`subsurf_scatter_strength<class_BaseMaterial3D_property_subsurf_scatter_strength>`.
  1674. .. rst-class:: classref-item-separator
  1675. ----
  1676. .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_boost:
  1677. .. rst-class:: classref-property
  1678. :ref:`float<class_float>` **subsurf_scatter_transmittance_boost** = ``0.0``
  1679. .. rst-class:: classref-property-setget
  1680. - void **set_transmittance_boost** **(** :ref:`float<class_float>` value **)**
  1681. - :ref:`float<class_float>` **get_transmittance_boost** **(** **)**
  1682. The intensity of the subsurface scattering transmittance effect.
  1683. .. rst-class:: classref-item-separator
  1684. ----
  1685. .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_color:
  1686. .. rst-class:: classref-property
  1687. :ref:`Color<class_Color>` **subsurf_scatter_transmittance_color** = ``Color(1, 1, 1, 1)``
  1688. .. rst-class:: classref-property-setget
  1689. - void **set_transmittance_color** **(** :ref:`Color<class_Color>` value **)**
  1690. - :ref:`Color<class_Color>` **get_transmittance_color** **(** **)**
  1691. The color to multiply the subsurface scattering transmittance effect with. Ignored if :ref:`subsurf_scatter_skin_mode<class_BaseMaterial3D_property_subsurf_scatter_skin_mode>` is ``true``.
  1692. .. rst-class:: classref-item-separator
  1693. ----
  1694. .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_depth:
  1695. .. rst-class:: classref-property
  1696. :ref:`float<class_float>` **subsurf_scatter_transmittance_depth** = ``0.1``
  1697. .. rst-class:: classref-property-setget
  1698. - void **set_transmittance_depth** **(** :ref:`float<class_float>` value **)**
  1699. - :ref:`float<class_float>` **get_transmittance_depth** **(** **)**
  1700. The depth of the subsurface scattering transmittance effect.
  1701. .. rst-class:: classref-item-separator
  1702. ----
  1703. .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_enabled:
  1704. .. rst-class:: classref-property
  1705. :ref:`bool<class_bool>` **subsurf_scatter_transmittance_enabled** = ``false``
  1706. .. rst-class:: classref-property-setget
  1707. - void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1708. - :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1709. If ``true``, enables subsurface scattering transmittance. Only effective if :ref:`subsurf_scatter_enabled<class_BaseMaterial3D_property_subsurf_scatter_enabled>` is ``true``. See also :ref:`backlight_enabled<class_BaseMaterial3D_property_backlight_enabled>`.
  1710. .. rst-class:: classref-item-separator
  1711. ----
  1712. .. _class_BaseMaterial3D_property_subsurf_scatter_transmittance_texture:
  1713. .. rst-class:: classref-property
  1714. :ref:`Texture2D<class_Texture2D>` **subsurf_scatter_transmittance_texture**
  1715. .. rst-class:: classref-property-setget
  1716. - void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1717. - :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1718. The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also :ref:`subsurf_scatter_texture<class_BaseMaterial3D_property_subsurf_scatter_texture>`. Ignored if :ref:`subsurf_scatter_skin_mode<class_BaseMaterial3D_property_subsurf_scatter_skin_mode>` is ``true``.
  1719. .. rst-class:: classref-item-separator
  1720. ----
  1721. .. _class_BaseMaterial3D_property_texture_filter:
  1722. .. rst-class:: classref-property
  1723. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3``
  1724. .. rst-class:: classref-property-setget
  1725. - void **set_texture_filter** **(** :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` value **)**
  1726. - :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter** **(** **)**
  1727. Filter flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` for options.
  1728. \ **Note:** :ref:`heightmap_texture<class_BaseMaterial3D_property_heightmap_texture>` is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering.
  1729. .. rst-class:: classref-item-separator
  1730. ----
  1731. .. _class_BaseMaterial3D_property_texture_repeat:
  1732. .. rst-class:: classref-property
  1733. :ref:`bool<class_bool>` **texture_repeat** = ``true``
  1734. .. rst-class:: classref-property-setget
  1735. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1736. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1737. Repeat flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` for options.
  1738. .. rst-class:: classref-item-separator
  1739. ----
  1740. .. _class_BaseMaterial3D_property_transparency:
  1741. .. rst-class:: classref-property
  1742. :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **transparency** = ``0``
  1743. .. rst-class:: classref-property-setget
  1744. - void **set_transparency** **(** :ref:`Transparency<enum_BaseMaterial3D_Transparency>` value **)**
  1745. - :ref:`Transparency<enum_BaseMaterial3D_Transparency>` **get_transparency** **(** **)**
  1746. If ``true``, transparency is enabled on the body. See also :ref:`blend_mode<class_BaseMaterial3D_property_blend_mode>`.
  1747. .. rst-class:: classref-item-separator
  1748. ----
  1749. .. _class_BaseMaterial3D_property_use_particle_trails:
  1750. .. rst-class:: classref-property
  1751. :ref:`bool<class_bool>` **use_particle_trails** = ``false``
  1752. .. rst-class:: classref-property-setget
  1753. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1754. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1755. If ``true``, enables parts of the shader required for :ref:`GPUParticles3D<class_GPUParticles3D>` trails to function. This also requires using a mesh with appropriate skinning, such as :ref:`RibbonTrailMesh<class_RibbonTrailMesh>` or :ref:`TubeTrailMesh<class_TubeTrailMesh>`. Enabling this feature outside of materials used in :ref:`GPUParticles3D<class_GPUParticles3D>` meshes will break material rendering.
  1756. .. rst-class:: classref-item-separator
  1757. ----
  1758. .. _class_BaseMaterial3D_property_use_point_size:
  1759. .. rst-class:: classref-property
  1760. :ref:`bool<class_bool>` **use_point_size** = ``false``
  1761. .. rst-class:: classref-property-setget
  1762. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1763. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1764. If ``true``, render point size can be changed.
  1765. \ **Note:** This is only effective for objects whose geometry is point-based rather than triangle-based. See also :ref:`point_size<class_BaseMaterial3D_property_point_size>`.
  1766. .. rst-class:: classref-item-separator
  1767. ----
  1768. .. _class_BaseMaterial3D_property_uv1_offset:
  1769. .. rst-class:: classref-property
  1770. :ref:`Vector3<class_Vector3>` **uv1_offset** = ``Vector3(0, 0, 0)``
  1771. .. rst-class:: classref-property-setget
  1772. - void **set_uv1_offset** **(** :ref:`Vector3<class_Vector3>` value **)**
  1773. - :ref:`Vector3<class_Vector3>` **get_uv1_offset** **(** **)**
  1774. How much to offset the ``UV`` coordinates. This amount will be added to ``UV`` in the vertex function. This can be used to offset a texture. The Z component is used when :ref:`uv1_triplanar<class_BaseMaterial3D_property_uv1_triplanar>` is enabled, but it is not used anywhere else.
  1775. .. rst-class:: classref-item-separator
  1776. ----
  1777. .. _class_BaseMaterial3D_property_uv1_scale:
  1778. .. rst-class:: classref-property
  1779. :ref:`Vector3<class_Vector3>` **uv1_scale** = ``Vector3(1, 1, 1)``
  1780. .. rst-class:: classref-property-setget
  1781. - void **set_uv1_scale** **(** :ref:`Vector3<class_Vector3>` value **)**
  1782. - :ref:`Vector3<class_Vector3>` **get_uv1_scale** **(** **)**
  1783. How much to scale the ``UV`` coordinates. This is multiplied by ``UV`` in the vertex function. The Z component is used when :ref:`uv1_triplanar<class_BaseMaterial3D_property_uv1_triplanar>` is enabled, but it is not used anywhere else.
  1784. .. rst-class:: classref-item-separator
  1785. ----
  1786. .. _class_BaseMaterial3D_property_uv1_triplanar:
  1787. .. rst-class:: classref-property
  1788. :ref:`bool<class_bool>` **uv1_triplanar** = ``false``
  1789. .. rst-class:: classref-property-setget
  1790. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1791. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1792. If ``true``, instead of using ``UV`` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
  1793. .. rst-class:: classref-item-separator
  1794. ----
  1795. .. _class_BaseMaterial3D_property_uv1_triplanar_sharpness:
  1796. .. rst-class:: classref-property
  1797. :ref:`float<class_float>` **uv1_triplanar_sharpness** = ``1.0``
  1798. .. rst-class:: classref-property-setget
  1799. - void **set_uv1_triplanar_blend_sharpness** **(** :ref:`float<class_float>` value **)**
  1800. - :ref:`float<class_float>` **get_uv1_triplanar_blend_sharpness** **(** **)**
  1801. A lower number blends the texture more softly while a higher number blends the texture more sharply.
  1802. \ **Note:** :ref:`uv1_triplanar_sharpness<class_BaseMaterial3D_property_uv1_triplanar_sharpness>` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh.
  1803. .. rst-class:: classref-item-separator
  1804. ----
  1805. .. _class_BaseMaterial3D_property_uv1_world_triplanar:
  1806. .. rst-class:: classref-property
  1807. :ref:`bool<class_bool>` **uv1_world_triplanar** = ``false``
  1808. .. rst-class:: classref-property-setget
  1809. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1810. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1811. If ``true``, triplanar mapping for ``UV`` is calculated in world space rather than object local space. See also :ref:`uv1_triplanar<class_BaseMaterial3D_property_uv1_triplanar>`.
  1812. .. rst-class:: classref-item-separator
  1813. ----
  1814. .. _class_BaseMaterial3D_property_uv2_offset:
  1815. .. rst-class:: classref-property
  1816. :ref:`Vector3<class_Vector3>` **uv2_offset** = ``Vector3(0, 0, 0)``
  1817. .. rst-class:: classref-property-setget
  1818. - void **set_uv2_offset** **(** :ref:`Vector3<class_Vector3>` value **)**
  1819. - :ref:`Vector3<class_Vector3>` **get_uv2_offset** **(** **)**
  1820. How much to offset the ``UV2`` coordinates. This amount will be added to ``UV2`` in the vertex function. This can be used to offset a texture. The Z component is used when :ref:`uv2_triplanar<class_BaseMaterial3D_property_uv2_triplanar>` is enabled, but it is not used anywhere else.
  1821. .. rst-class:: classref-item-separator
  1822. ----
  1823. .. _class_BaseMaterial3D_property_uv2_scale:
  1824. .. rst-class:: classref-property
  1825. :ref:`Vector3<class_Vector3>` **uv2_scale** = ``Vector3(1, 1, 1)``
  1826. .. rst-class:: classref-property-setget
  1827. - void **set_uv2_scale** **(** :ref:`Vector3<class_Vector3>` value **)**
  1828. - :ref:`Vector3<class_Vector3>` **get_uv2_scale** **(** **)**
  1829. How much to scale the ``UV2`` coordinates. This is multiplied by ``UV2`` in the vertex function. The Z component is used when :ref:`uv2_triplanar<class_BaseMaterial3D_property_uv2_triplanar>` is enabled, but it is not used anywhere else.
  1830. .. rst-class:: classref-item-separator
  1831. ----
  1832. .. _class_BaseMaterial3D_property_uv2_triplanar:
  1833. .. rst-class:: classref-property
  1834. :ref:`bool<class_bool>` **uv2_triplanar** = ``false``
  1835. .. rst-class:: classref-property-setget
  1836. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1837. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1838. If ``true``, instead of using ``UV2`` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.
  1839. .. rst-class:: classref-item-separator
  1840. ----
  1841. .. _class_BaseMaterial3D_property_uv2_triplanar_sharpness:
  1842. .. rst-class:: classref-property
  1843. :ref:`float<class_float>` **uv2_triplanar_sharpness** = ``1.0``
  1844. .. rst-class:: classref-property-setget
  1845. - void **set_uv2_triplanar_blend_sharpness** **(** :ref:`float<class_float>` value **)**
  1846. - :ref:`float<class_float>` **get_uv2_triplanar_blend_sharpness** **(** **)**
  1847. A lower number blends the texture more softly while a higher number blends the texture more sharply.
  1848. \ **Note:** :ref:`uv2_triplanar_sharpness<class_BaseMaterial3D_property_uv2_triplanar_sharpness>` is clamped between ``0.0`` and ``150.0`` (inclusive) as values outside that range can look broken depending on the mesh.
  1849. .. rst-class:: classref-item-separator
  1850. ----
  1851. .. _class_BaseMaterial3D_property_uv2_world_triplanar:
  1852. .. rst-class:: classref-property
  1853. :ref:`bool<class_bool>` **uv2_world_triplanar** = ``false``
  1854. .. rst-class:: classref-property-setget
  1855. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1856. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1857. If ``true``, triplanar mapping for ``UV2`` is calculated in world space rather than object local space. See also :ref:`uv2_triplanar<class_BaseMaterial3D_property_uv2_triplanar>`.
  1858. .. rst-class:: classref-item-separator
  1859. ----
  1860. .. _class_BaseMaterial3D_property_vertex_color_is_srgb:
  1861. .. rst-class:: classref-property
  1862. :ref:`bool<class_bool>` **vertex_color_is_srgb** = ``false``
  1863. .. rst-class:: classref-property-setget
  1864. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1865. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1866. If ``true``, vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If ``false``, vertex colors are considered to be stored in linear color space and are rendered as-is. See also :ref:`albedo_texture_force_srgb<class_BaseMaterial3D_property_albedo_texture_force_srgb>`.
  1867. \ **Note:** Only effective when using the Vulkan Clustered or Vulkan Mobile backends.
  1868. .. rst-class:: classref-item-separator
  1869. ----
  1870. .. _class_BaseMaterial3D_property_vertex_color_use_as_albedo:
  1871. .. rst-class:: classref-property
  1872. :ref:`bool<class_bool>` **vertex_color_use_as_albedo** = ``false``
  1873. .. rst-class:: classref-property-setget
  1874. - void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1875. - :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1876. If ``true``, the vertex color is used as albedo color.
  1877. .. rst-class:: classref-section-separator
  1878. ----
  1879. .. rst-class:: classref-descriptions-group
  1880. Method Descriptions
  1881. -------------------
  1882. .. _class_BaseMaterial3D_method_get_feature:
  1883. .. rst-class:: classref-method
  1884. :ref:`bool<class_bool>` **get_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature **)** |const|
  1885. Returns ``true``, if the specified :ref:`Feature<enum_BaseMaterial3D_Feature>` is enabled.
  1886. .. rst-class:: classref-item-separator
  1887. ----
  1888. .. _class_BaseMaterial3D_method_get_flag:
  1889. .. rst-class:: classref-method
  1890. :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
  1891. Returns ``true``, if the specified flag is enabled. See :ref:`Flags<enum_BaseMaterial3D_Flags>` enumerator for options.
  1892. .. rst-class:: classref-item-separator
  1893. ----
  1894. .. _class_BaseMaterial3D_method_get_texture:
  1895. .. rst-class:: classref-method
  1896. :ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param **)** |const|
  1897. Returns the :ref:`Texture2D<class_Texture2D>` associated with the specified :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`.
  1898. .. rst-class:: classref-item-separator
  1899. ----
  1900. .. _class_BaseMaterial3D_method_set_feature:
  1901. .. rst-class:: classref-method
  1902. void **set_feature** **(** :ref:`Feature<enum_BaseMaterial3D_Feature>` feature, :ref:`bool<class_bool>` enable **)**
  1903. If ``true``, enables the specified :ref:`Feature<enum_BaseMaterial3D_Feature>`. Many features that are available in **BaseMaterial3D**\ s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to ``true``.
  1904. .. rst-class:: classref-item-separator
  1905. ----
  1906. .. _class_BaseMaterial3D_method_set_flag:
  1907. .. rst-class:: classref-method
  1908. void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  1909. If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. See :ref:`Flags<enum_BaseMaterial3D_Flags>` enumerator for options.
  1910. .. rst-class:: classref-item-separator
  1911. ----
  1912. .. _class_BaseMaterial3D_method_set_texture:
  1913. .. rst-class:: classref-method
  1914. void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` param, :ref:`Texture2D<class_Texture2D>` texture **)**
  1915. Sets the texture for the slot specified by ``param``. See :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` for available slots.
  1916. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1917. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1918. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1919. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1920. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1921. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`