class_basematerial3d.rst 174 KB

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