class_basematerial3d.rst 208 KB

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