2,277 reputation
425
bio website fxz.sufx.net
location Bucharest, Romania
age 29
visits member for 2 years, 7 months
seen 2 hours ago

Gameplay programmer. Main interests:


  • physics based animation (deformable objects, kinematics)
  • mathematics of CG applications (simulation, games, etc.)
  • shader programming
  • discrete differential geometry (manifold properties)
  • robotics

While you're here, please stop saying these two things

  • quaternions avoid gimbal lock
  • premature optimization

why?

  • gimbal lock is related to a mechanism, quaternions are just an algebraic/geometric description of an angle-axis rotation. So they do not avoid it since the mechanism itself cannot.
  • if it's an optimization, if it's common sense, just implement it! Better do it now, than to look for it desperately later.

4h
comment Why is Euler integration sometimes preferred over RK4 even if RK4 is more accurate?
I second @OriginalDaemon in seeing this question as a close duplicate of the Pros and cons of different integrators question. The only difference is justifying Catto's choice, which can only be inferred by carefully reading his posted material (one google search away :) ).
4h
comment Why is Euler integration sometimes preferred over RK4 even if RK4 is more accurate?
I updated my answer to include a brief explanation about what the main properties of different integration strategies are (phase space area conservation = symplecticity = energy preserving and *implicit = unconditionally stable due to "cautious" update steps that result in both energy loss or undershooting the exact solution on the phase diagram plot orbit).
Sep
25
comment Ogre PSSM Grass Receiving Shadows
Figures, the community for this engine is less and less active :(.
Sep
24
comment Ogre PSSM Grass Receiving Shadows
A side note: are the Ogre forums still up and running/active? You should post the question there as well.
Sep
19
comment Colision detection of disc (Maximum Material Condition aka “Flatness”)
+1 for @Paraknight . Besides PCA, if the OP is looking for a robust algorithm for fitting planar faces to a point cloud, RANSAC may come in handy -> en.wikipedia.org/wiki/RANSAC
Jul
2
comment How to shade hair (line segments) correctly in GLSL
be sure you set your buffers correctly. For simple chains/hair-like topologies, you need an offset of one vertex for the second buffer. Also, the last vertex should be paired with the first.
Jun
25
comment Self colliding cloth physics
Bridson et al. did something in the lines of your goal physbam.stanford.edu/~fedkiw/papers/stanford2002-01.pdf . Although not an answer per se, you really should read that material..
May
30
comment How to implement soft edge areas with particles
@user46560 yeah, but this way you don't have to compute what pixels are in that inter-polygon band at all.. neither on the GPU, nor on the CPU. Since you're not accustomed to the ways of game development as you say, you deserve a +1 for your idea :).
May
30
comment How to implement soft edge areas with particles
That's post-processing done on the CPU. Hardly optimizable on itself. Your idea could work well if the inner polygon and the outer get connected by a triangle strip. The the OP could add vertex attribute info and tag each vertex as inside or outside. Then, in the vertex shader, the opacity/alpha can be linearly interpolated from a less transparent value to a complete opaque one.
May
16
comment How can I compare two quaternions for logical equality?
+1, pretty elegant and, perhaps even more numerically efficient than my answer (provided SIMD operations are used :) ).
May
15
comment How can I compare two quaternions for logical equality?
@falstro, I think I understand what you mean: the rotation axes are inversed, but the argument angle is also negated between q and -q when represented as an angle-axis rotation operator. So, indeed, technically the effect of these rotations is the same, although the operators are not. And, yes, when SLERPING, one has to make sure q1 and q2 lie on the same hemisphere of the S3 hypersphere in order for the slerp to take the shortest path.
May
15
comment How can I compare two quaternions for logical equality?
@Tholle the user is also concerned with the impact of applying the quaternion to transform/rotate a 3D entity (i.e. pose-wise). Two different quaternions can achieve the same rotation (e.g. q and -q). The naive (computationally-wise) way would be to apply both quaternions to the same vector and see if their vector results are different..
May
9
comment Throwing a ball and estimating its path using a Physics engine
To be more concise, I'm using Havok, so the compartment based simulation might be out of the question :(. Good to know about such a mechanism though!
May
9
comment Throwing a ball and estimating its path using a Physics engine
@concept3d the asynchronous casting sounds nice, although I can't use it (I don't have any other threads for this job at the moment). But if I had, how would you assure the spatial and temporal coherence by doing different casts simultaneously?
May
9
comment Throwing a ball and estimating its path using a Physics engine
Sadly this is a mature optimization attempt, the solution I gave in the answer is good, but the raycasts are a killer. The alternative method you proposed is actually identical to what I'm doing, provided you could somehow propose the most efficient "minimal" set of tangents..
Mar
26
comment How do I lerp between values that loop (such as hue or rotation)?
Well, although the atan2 based idea is straightforward, this one could save some space and a bit of performance (no need to store x and y, nor to compute sin, cos and atan2 too often). I think it's worth expanding a bit on why this solution is correct (i.e. choosing the shortest path on a circle or sphere, just like SLERP does for quaterions). This question and answers should be put in the community wiki as this is a really common issue most gameplay programmers face.
Feb
2
comment RK4, Derivatives, Understanding Game Physics
If games is what you're after, RK4 is an overkill and, due to its cost vs. stability ratio, not the best choice either for those sudden and sharp changes in your acceleration. If you're looking for a discussion on which type of integrators are worth choosing from, as well as how to build a rather simplistic simulator, I can recommend a technical report on exactly these problems: arxiv.org/pdf/1311.5018v1.pdf
Jan
29
comment Is the source code of the Source Engine available?
@BDillan indeed, some people learn that the hard way.. although companies will hire you to work with huge piles of engine code you don't understand and don't have the time to and end up just debugging.
Dec
12
comment How do I check if a surface is sloping?
If your surface is triangulated, you can always compute the normal vector which is pointing upwards, towards the sky. You can then take the magnitude of its z (or whichever axis is up for you) component and use it as a slope measure with 0 being perfectly vertical and 1 being perfectly flat/horizontal.
Dec
10
comment Optimising meshes
There's the probably most mainstream simplification algorithm (you can call it award winning): the Quadric Error Metric simplification heuristic (and its vertex-attribute flavours worth mentioning): google.com/…