Next revision | Previous revision |
dragengine:modules:dragonscript:behavior_renderablecustomcolor [2020/12/20 22:59] – created dragonlord | dragengine:modules:dragonscript:behavior_renderablecustomcolor [2024/03/14 16:56] (current) – dragonlord |
---|
| |
====== ECBehaviorRenderableCustomColor ====== | ====== ECBehaviorRenderableCustomColor ====== |
| |
| <WRAP center 100%> |
| <WRAP center box 450px> |
| {{youtube>Gte74Jte8A0?medium}} |
| <WRAP centeralign>Behavior in action</WRAP> |
| </WRAP> |
| </WRAP> |
| |
Behavior element behavior using [[behavior_customcolor|ECBehaviorCustomColor]] on [[behavior_dynamicskin|ECBehaviorDynamicSkin]]. This behavior applies the chosen color of an [[behavior_customcolor|ECBehaviorCustomColor]] either directly to a color type [[gamedev:renderables|renderable]] or indirectly to a canvas type [[gamedev:renderables|renderable]]. | Behavior element behavior using [[behavior_customcolor|ECBehaviorCustomColor]] on [[behavior_dynamicskin|ECBehaviorDynamicSkin]]. This behavior applies the chosen color of an [[behavior_customcolor|ECBehaviorCustomColor]] either directly to a color type [[gamedev:renderables|renderable]] or indirectly to a canvas type [[gamedev:renderables|renderable]]. |
| |
| This behavior differs from using [[gamedev:textureproperties:color_tint|color.tint]] texture property. The [[gamedev:textureproperties:color_tint|color.tint]] texture property colorizes one texture of an object and thus requires models to be split up into individual parts assigned to individual textures. The Single Texture Mode outlined below works similar to this texture property. This behavior though allows to colorize individual pixels of a single texture. Think of adding a tribal tattoo to an actor you would like to colorize independent of the skin tone. |
| |
====== Multi Texture Mode (Using Color Type Renderable ====== | ====== Multi Texture Mode (Using Color Type Renderable ====== |
====== API Documentation ====== | ====== API Documentation ====== |
| |
[[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Scenery_1_1ECBehaviorRenderablePanel.html|ECBehaviorRenderablePanel]]. | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorRenderablePanel.html,ECBehaviorRenderablePanel~@#. |
| |
Since DragonScript Module Version **1.3** | Since DragonScript Module Version **1.3** |
end | end |
</code> | </code> |
| |
| ====== Live Examples ====== |
| |
| * [[https://github.com/LordOfDragons/deexamples|DEExamples Repository]]: Element class adding 5 custom color slots to a box model. Player can interact with box to bring up a dialog to change the colors. |
| * [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/CustomColorExampleClass.ds|CustomColorExampleClass.ds]]. Element class using 5 color slots |
| * [[https://github.com/LordOfDragons/deexamples/blob/master/exampleApp/data/scripts/PlayerActionCustomColor.ds|PlayerActionCustomColor.ds]]. Player action showing dialog to select color. |
| * [[https://github.com/LordOfDragons/deexamples/tree/master/exampleApp/data/content/models/customColor|customColor]]. Directory containing images to define the locations on the skin where each individual color applies to. |
| |