Jump to content

  • Log In with Google      Sign In   
  • Create Account

apatriarca

Member Since 03 Jul 2006
Offline Last Active Yesterday, 01:23 PM

#5310895 Icosphere and height map

Posted by on 15 September 2016 - 04:37 AM

In the shader you can do many different things to improve the details:

1. Increase the tessellation dynamically using the tessellation shader,

2. Use displacement mapping to give the impression of details without actually adding more geometry.




#5310723 Icosphere and height map

Posted by 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.




#5308328 Looking for an artist with ideas for a game.

Posted by on 28 August 2016 - 04:05 AM

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.




#5233168 Moving around a sphere with quaternions

Posted by on 06 June 2015 - 11:00 AM

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.




#5227301 Nav mesh determining neighbours efficiently

Posted by on 05 May 2015 - 07:53 AM

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.


#5204711 [Solved] Vector prime notation, what does it mean?

Posted by on 16 January 2015 - 08:25 AM

I haven't read the paper, but I think it is the derivative (with respect of time I guess).


#5202488 inverted GJK --- you're a genius if you can solve this

Posted by 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. 




#5201003 Bezier triangle partial second-order derivatives

Posted by 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:

bezier_2nd_derivatives.gif

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.


#5196265 Matrix right hand to left hand problem

Posted by on 04 December 2014 - 10:03 AM

You also have to flip the order of all multiplications. In fact, (A*B)^T = B^T * A^T != A^T * B^T.


#5185230 Is upper division Linear Algebra a good idea or necessary?

Posted by 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.


#5181038 OIT (Order Independent Transparency)

Posted by 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.




#5180962 Formulas, Math, and theories for RPG combat/leveling systems?

Posted by 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.. 




#5162268 Editing Bezier Splines while maintaining C1 Continuity

Posted by on 23 June 2014 - 01:46 AM

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.




#5148706 Can you quickly visualize how a quaternion would look on top of your head?

Posted by on 22 April 2014 - 06:48 AM

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.




#5145766 Quaternions rotation code

Posted by on 09 April 2014 - 02:49 PM

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.






PARTNERS