Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Apr 2010
Offline Last Active May 22 2016 01:59 AM

Posts I've Made

In Topic: Custom editor undo/redo system

08 May 2016 - 02:45 PM

i tried two version on two different projects:


- a particle editor which was using the command approach (3), I've ended up with list of following commands (new, delete, copy, deep copy, deep delete and modify property). A few quirks along the way, but it worked. wasn't too hard to make but the editor was quite specific. also, the undo/redo was not persistent and a crash meant that all unsaved data was gone (save early, save often)


- the second project was a generic editor (scene/prefab,etc..) which worked with json data. there I took a more generic way of saving json diff (2). the editor system was basically a local/remote server hosting a mongo database, to which a number of editor front ends could be connected, ie: you could write an editor as a webpage or as full standalone application -using websockets for communication. making the logic to handle json diff took some time, but in the end it magically worked. I managed to write two editor prototypes to try out the system and it was very promising. sadly, due to company changes the projects was halted...

the most pretty part is that you can have a clumsy written editor, which leaks and crashes, but you don't care. the data is always safe, as each change is treated as json delta and inserted into a database automatically. the changes are persistent, logged and tracked. it does require some handling on the editor side, but once the system is up and running adding "new commands" is automatic.


credits to:




In Topic: 3D Engine to analysis

29 April 2014 - 08:10 AM

you can check godot engine

In Topic: Evaluators (polynomial & graph)

07 January 2014 - 05:48 PM

Optimizing polynomial evaluator seems possible only in a way to solve multiple evaluators at once, as mentioned before. Second "downer"  is that lookup value x has to be same for all evaluators. So, something as:

class QuadPolynomEvaluator {
   vec4 PolyConst[4]; // vec4 for polynomial of degree 4, array of 4 for 4 evaluators (e0, e1, e2, e3)
   // @ either build time or load time
   void SetEvalData(uint idx, float c0, float c1, float c2, float c3)
      // quick and dirty way of filling components; or use "proper" store/splat/swizzle
      float* data= (float*)&PolyConst;
      data[ 0*4 + idx ] = c0;
      data[ 1*4 + idx ] = c1;
      data[ 2*4 + idx ] = c2;
      data[ 3*4 + idx ] = c3;
      // PolyConst[0] = e0.c0, e1.c0, e2.c0, e3.c0
      // PolyConst[1] = e0.c1, e1.c1, e2.c1, e3.c1
      // PolyConst[2] = e0.c2, e1.c2, e2.c2, e3.c2
      // PolyConst[3] = e0.c3, e1.c3, e2.c3, e3.c3
   vec4 Evaluate(float x)
      vec4 vx = vec4(x);
      // result.x = (e0.c0) + (e0.c1 * x) + (e0.c2 * pow(x, 2.0f)) + (e0.c2 * pow(x, 3.0f));
      vec4 result = PolyConst[0];
      result = vec4add( result, vec4mul( PolyConst[1], vx ) );
      result = vec4add( result, vec4mul( PolyConst[2], vec4pow( vx, vec4(2.0f) ) ) );
      result = vec4add( result, vec4mul( PolyConst[3], vec4pow( vx, vec4(3.0f) ) ) );
      return result;

Makes sense?

In Topic: redesigning the sse

06 January 2014 - 03:55 AM

for example there is no as far as i know command for horizontal multiply
that would just mul a1*a2*a3*a4


Sometimes you just need to rearrange the data. The benefits of simd ops do no come from a1*a2*a3*a4 but rather from:


v5 = vec4mul( v1, vec4mul( v2, vec4mul( v3, v4 ) ) );
// v5( a1*a2*a3*a4, b1*b2*b3*b4, c1*c2*c3*c4, d1*d2*d3*d4 )

In Topic: Simulation RTS Resource chains

25 November 2013 - 02:43 AM

I'd just use real world materials for starting point and expand them with sci-fi/fantasy ones later on.