Posted by apatriarca
on 14 September 2016 - 04:32 AM

A few observations:

1. Do you really need to compute the radius each time? Isn't it a known quantity?

2. Why are you converting every angle to degrees? That's useless and you then have to convert them back to radians (or other range) to be able to use them.

3. The normal of each vertex is the vertex itself normalized. You can thus simply multiply the vector by some value to get the displaced one. If the vector has lenght R and you want its height to be H, you simply have to multiply by H/R.

4. This is probably all best done in a shader. The base displacement can be done in a vertex shader and you can probably also use a tessellation shader to increase details when needed. Finally lighting can do a great work in adding details.

5. I still have to check the correctness of your formulas.

Why an artist should choose you instead of other people? You are mostly listing your skills, but there is no way to actually understand your level in each skill. Moreover, you are not showing any project you have done and you said you have problems completing your projects. If I were someone looking for a patner for making a project that skill would actually be quite important. Even projects you are not particularly proud of can be important to find someone.

Quaternion multiplication is not a rotation. Quaternions rotate a vector through conjugation qvq^{-1}. Your function multiplyQuat is thus either named wrong or it has been used in the wrong way.

If the two polygons share their vertices, you simply have to search if the two polygons have two adjacent vertices in common. If this is not the case, you should probably first merge the vertices and then use the method above. The better way to solve T-junction IMHO is to cut the edges at the T-junction. You increase the number of edge/vertices of the polygons but it makes everything much simpler.

Posted by apatriarca
on 06 January 2015 - 10:31 PM

I would simply subdivide the mothership's concave shape in the union of a set of (not necessarily disjoint) convex shapes. If the small ship intersect any of them, it intersects the mothership. This is simpler to implement than trying to add additional steps to handle each hole or inset separately.

Posted by apatriarca
on 31 December 2014 - 10:52 AM

It is difficult to write the entire derivation here in the forum, but AFAIK the second order derivatives should be the following ones:

EDIT: To arrive at this result you have to use the observation at the end of Shnoutz post in the discussion you have linked. You first derivate the Bernestein polynomials and then change the indices. EDIT2: The derivatives in the gamasutra article are clearly wrong since partial derivatives are vectors while that formula defines a point. In the formulas above each "control point" is a vector since it is a linear combination of point whose coefficients sum to zero. In computer graphics we usually use vectors and points interchangeably, but they are different mathematical objects and it is sometimes useful to consider their differences when verifying an equation.

Posted by apatriarca
on 06 October 2014 - 01:49 AM

In Opengl, the operation is component wise multiply, though it has no sence to be used in manner of geomteric need, it ields a vector space where column and row vectors are the same, implying certain inpropriatness of talking about transposing a matrix, since it transposes by its order with multiply operation (that is impossible in linear algebra becouse of NxM demand in mutipling matricies/vectors, implying also vectors to be nx1x1xm, but that algebra has its definition of operation, that opengl does differ in (it will multiply vectors without their dimension introduced), thus opengl has a vector space of different properties- where multiplication is not associative- but it is a vector space).

OpenGL uses the same data type for several different things, not just geometric vectors. In particular, it uses them for colors. The component-wise multiplication is in fact very useful in this case. Code implementations of mathematical concepts are rarely completely equivalent to their theoretical version.

Posted by apatriarca
on 17 September 2014 - 10:10 AM

The Intel solution is based on a quite recent and, as far as I know, Intel-only extension. The Weighted Blended OIT is more general, but it is an approximation. There are also other methods (A-buffers for example). I don't think this is a solved problem and in many cases sorting is still probably the way to go. The best method depends on what you are trying to do and the scene you are trying to display.

Posted by apatriarca
on 17 September 2014 - 04:09 AM

IMHO If you want low level players/monsters to have a chance against higher level ones, then you should rely less on stats and add more depth and strategy to your combat system. This is in fact the only way a weaker individual can beat a stronger one in real life too. If you have to fight with a boxer, you try to stay at the distance. If you are fighting with someone with a gun, you hide and try to disarm or use surprise or..

To maintain C1 continuity between consecutive (cubic) Bézier splines you have to maintain the following equations:

P3(i-1) - P2(-1) = P1(i) - P0(i)

P3(i-1) = P0(i)

where the index in the parenthesis represents the index of the curve in the spline. The derivative/tangent at the beginning (end) of Bézier curve is in fact parallel to the edge between the first two (last two) control points. If the two curves have different degree you have to multiply each part of the equation with the degree of the corresponding curve.

If you take a general quaternion like 0.6 + 0.3*i + 0.2*j - 0.71*k you may first look at the real part and observe this should be equal to cos(alpha/2) for some angle alpha. 0.6 is greater than 0.5 which is the cosine of 60 degrees, but less then sqrt(2)/2 ~= 0.71 which is the cosine of 45 degrees. It should then be something in between, let's say 52.5 which is in the middle (the correct angle is 53.13 degrees) and thus we have a rotation of approximately 105 degrees around the axis defined by its imaginary part. This is basically how you can get a rough idea of what a quaternion does.

I do not know the Unity API, but I think it is the rotation around the axis cross((0, 1, 0), mFrontWheelNormal) with angle equal to the angle between the two vectors. The effect of the rotation should be to move something aligned with (0,1,0) to something aligned with mFrontWheelNormal.