Sunday, February 15, 2009

Custom Deformation

hi, quick update about new feature i'v added into material system called custom deform.
this feature allow you to create specific deformation on a geometry batch.
by saying specific i mean that you define 3 functions/expressions (anything you want), to define the deformation on x,y,z component of each vertex in the batch.
for example:
here is a material definition for sin wave deformation:
deform custom 0, sin(time+VertexIndex), 0
ok, what this simple material does to any geometry using it, is applying a sin wave deformation on each vertex on the y component. (the x,z component doesn't do anything as its 0)
time - internal keyword returning game time in ms
VertexIndex - internal keyword returning current vertex index of the vertex we are going to deform.
i could also use it to do some old scholl water deformation (using height map) by doing something like this:
deform custom 0, heightMapTexture[256*VertexPos.y+256*VertexPos.x], 0
heightMapTexture - is the dynamic 256x256 height map texture
VertexPos.x/y/z - internal keyword returning current vertex component of the vertex we are going to deform.
this is just a few examples of using this new feature (you probably wont apply this water deformation as its not fast enough and could be done faster using the gpu)
because this deformation is based on the functions you define (its not constant), this could not be done in the gpu so its take some cpu time.
thats all for now.
if you have any question feel free to ask

Wednesday, February 4, 2009

Forum For All

i decided to open a forum to discus my engine programming and game development in general.
the main idea of the forum is to be the place to ask questions and hopefully get answers :)
it also contain game design area which allow you to share you work and show what you got, the main idea of this section is to get in contact with some talented users who would like to help with new models, animations, level design etc.
i still post news here but if you have any questions about something (new or old), i would like you to ask it in the forum, so enjoy and cya in the forum :)
forum address: