class_basematerial3d.rst 172 KB

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