PDA

View Full Version : image manipulation


marlboroman1
2009-04-28, 16:48
I have been trying to learn some coding the wiki and the skining manual have are very good and can be easy followed even by me. The only thing thus far that I am having a hard time getting to grips with with is the diffuse tag. In the documentation there is mention of be able to adjust gain transparency as well as other effects that can be achieved but no direct example code.

below is an example of the kind thing I am trying to do


<control type="image">
<posx>740</posx>
<posy>53</posy>
<width>300</width>
<height>350</height>
<texture>black.png</texture>
<visible>Control.HasFocus(6000)</visible>
<animation effect="fade" start="0" end="60" time="200" condition="Control.HasFocus(6000)">Conditional</animation>
</control>


http://i482.photobucket.com/albums/rr184/marlboromanuk/screenshot004-1.jpg

I have been able to adjust the transparency original image using an animation but want to be able to feather the edges of the image so slowly blend or fade into the background. Is this currently possible with the diffuse tag? If it is would some mind giving me some real world examples of how it works

Jeroen
2009-04-28, 19:31
You need to apply the diffuse to the texture tag. So something like:


<control type="image">
<posx>740</posx>
<posy>53</posy>
<width>300</width>
<height>350</height>
<texture diffuse="diffusetexture.png">black.png</texture>
<visible>Control.HasFocus(6000)</visible>
<animation effect="fade" start="0" end="60" time="200" condition="Control.HasFocus(6000)">Conditional</animation>
</control>

marlboroman1
2009-04-30, 00:43
thanks for the tip after a little play about and I think I get at last. My thinking on this was all wrong I had assumed diffuse was a standalone a tag instead of an attribute of the <texture> tag. I think I can probably active what i want to do with with a combination of the <texture> and <bordertexture> once I find the correct combination of images to use. In essence direct image (texture) manipulation is currently confined to image blending using diffuse, flipx, align, animations and the <height> and <width> tags.

I was hoping that you would be able to control transparency particularly along the edges of a texture more directly. so you could have dissipate like smoke type effects using any standed black texture which most skins already contain. Is there any chance of a transparency tag being added with some relevant attributes and controls: increase, decrease, top bottom, left, right, centre and edge and maybe some effects like grain, pixelation, smoke and precipitation. You guys would have better idea of what's workable and usefully just some uneducated suggestions.

now im off read the skining manual again for hopefully I wont get so easily baffled next time I'm think reading without skimming is key thing

jmarshall
2009-04-30, 01:25
The diffuse is a texture, so you put whatever effects you want in that. It's a simple multiplicative diffuse.