This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
gamedev:skinproperties [2014/03/30 17:04] – dragonlord | gamedev:skinproperties [2017/07/29 00:05] – [Examples] dragonlord | ||
---|---|---|---|
Line 3: | Line 3: | ||
</ | </ | ||
- | The Drag[en]gine game engine uses a very open and flexible way to handle skins for models. Instead of defining hard coded material properties that can not be changed | + | The Drag[en]gine game engine uses a very open and flexible way to handle skins for models. Instead of defining hard coded material properties that can not be changed |
+ | |||
+ | The default skin texture format is XML based and can be edited by hand or generated. It is easier though to use the **[[gamedev: | ||
Properties can define a material property in various ways. | Properties can define a material property in various ways. | ||
Line 18: | Line 20: | ||
Defines the property using an video. The UV coordinates stored in a mesh are used to index into the video images. The range of UV coordinates is matched to the size of the video with uv=(0,0) being the upper left corner and uv=(1,1) the lower right corner. The format of the video can be 8-bit gray scale, 24-bit RGB or 32-bit RGBA. A video is automatically played back using a play speed relative to the update calls done to the world object containing a component with a video texture property. In contrary to videos used over renderables the control over static videos is limited. Specifying a static color for an video is allowed but not the other way around. | Defines the property using an video. The UV coordinates stored in a mesh are used to index into the video images. The range of UV coordinates is matched to the size of the video with uv=(0,0) being the upper left corner and uv=(1,1) the lower right corner. The format of the video can be 8-bit gray scale, 24-bit RGB or 32-bit RGBA. A video is automatically played back using a play speed relative to the update calls done to the world object containing a component with a video texture property. In contrary to videos used over renderables the control over static videos is limited. Specifying a static color for an video is allowed but not the other way around. | ||
- | ====== | + | ====== |
- | All types mentioned above produce | + | Constructed type allows to build images for properties using a CAD like interface. The graphic module creates |
- | + | ||
- | A source can be either a producer or a combiner. A producer omits a value or an image and resides in the leafs of the tree. Combiners reside at the nodes and take one or more sources combining them into a new value or image. Furthermore | + | |
======= Renderables ======= | ======= Renderables ======= | ||
In addition each texture property can be assigned a renderable name. Using static colors or images a texture is static and has the same look all the time. Using renderables though you can change individual texture properties on the fly during a game. The renderable name is not required to be unique and allows therefore to use a renderable content for more than one texture property simultaneously. Once specified the user can add a renderable to a component and fill it with appropriate values. A renderable overrules the static property as soon as the renderable name is not empty and a component contains a dynamic skin with a renderable of the same name. You can thus use a renderable to dynamically alter a texture property or let it be static if not used. This gives a lot of flexibility even if you don't know if a component is actually going to provide dynamic content or not. | In addition each texture property can be assigned a renderable name. Using static colors or images a texture is static and has the same look all the time. Using renderables though you can change individual texture properties on the fly during a game. The renderable name is not required to be unique and allows therefore to use a renderable content for more than one texture property simultaneously. Once specified the user can add a renderable to a component and fill it with appropriate values. A renderable overrules the static property as soon as the renderable name is not empty and a component contains a dynamic skin with a renderable of the same name. You can thus use a renderable to dynamically alter a texture property or let it be static if not used. This gives a lot of flexibility even if you don't know if a component is actually going to provide dynamic content or not. | ||
Line 29: | Line 28: | ||
======= Transforms ======= | ======= Transforms ======= | ||
Each property can have a transfrom assigned. Transform are used to manipulate the incoming texture coordinates before they are used for texturing. Transforms are similar to sources in that they are also organized in a tree shape. The advantage of transforms is that they are very fast and produce textures looking dynamic although they are not. Whenever possible use first a transform to animate a texture and resort to renderables or even sources only if there is no other way. | Each property can have a transfrom assigned. Transform are used to manipulate the incoming texture coordinates before they are used for texturing. Transforms are similar to sources in that they are also organized in a tree shape. The advantage of transforms is that they are very fast and produce textures looking dynamic although they are not. Whenever possible use first a transform to animate a texture and resort to renderables or even sources only if there is no other way. | ||
+ | |||
+ | ====== Examples ====== | ||
+ | <WRAP group> | ||
+ | <WRAP half column box centeralign> | ||
+ | {{ youtube> | ||
+ | Using a Video Source to create a Special Effects texture. | ||
+ | </ | ||
+ | |||
+ | <WRAP half column box centeralign> | ||
+ | {{ youtube> | ||
+ | Using a Constructed Source to create a texture on the fly. | ||
+ | </ | ||
+ | </ | ||