Downhill: how do I find the downhill direction of a plane from a normal?

Click For Summary
SUMMARY

The discussion focuses on determining the downhill direction of a plane in a mesh using Blender for a snowboard/ski simulation. The key method involves calculating the normal vector of each triangle in the mesh and utilizing vector mathematics, specifically the cross product, to find the downhill direction. By defining a constant vector pointing "down" and performing vector projections, users can derive a vector that indicates the downhill direction on the surface. This approach effectively combines computer graphics principles with mathematical concepts to achieve realistic simulation behavior.

PREREQUISITES
  • Understanding of Blender's mesh structure and normal vectors
  • Familiarity with vector mathematics, specifically cross products
  • Knowledge of vector projections and their applications in 3D space
  • Basic principles of computer graphics and physics simulations
NEXT STEPS
  • Explore Blender's Python API for automating normal vector calculations
  • Learn about vector projection techniques in 3D graphics
  • Study the physics of rolling objects on inclined surfaces
  • Investigate advanced mesh manipulation techniques in Blender for realistic terrain
USEFUL FOR

This discussion is beneficial for game developers, computer graphics artists, and anyone interested in creating realistic physics simulations in Blender, particularly in the context of terrain and slope analysis.

kballing
Messages
3
Reaction score
0
I'm dabbling in computer graphics and a game engine (Blender). I want to create a snowboard/ski simulation that is fairly realistic. Starting with a mesh of triangles, I want to know what direction is downhill at any given spot on the mesh. In other words, if I drop a ball on any part of the mesh, which way will it start to roll?

If anyone is familiar with Blender and knows an easy solution to this, please let me know, otherwise, let's delve into the math. In Blender, I pretty sure I can get the normal of each plane of the mesh.
 
Mathematics news on Phys.org
Well, of course, you will have to define "down" for the figure yourself. The simplest way to do that would be to have a constant vector, d, pointing "down".. At each point on the surface then, you will need another vector, v, perpendicular to the surface- perhaps by taking the cross product of two vectors formed by edges of the triangle forming the mesh.

Let u be the projection of v on d. Then w= d- u will be a vector parallel to the surface pointing in the direction closest to "downward".
 
well, that make total sense. Boy am I rusty.

So the cross product of down and the normal vector of the plane in question would return a vector perpendicular to both the down and normal. Perpendicular to down would be in a plane level with the horizon or flat ground. Perpendicular to the normal of the sloped plane would be on that plane. So the cross product of the two would give me a vector that intersects the plane and is level (not pointing downhill).

If I take the cross product of the normal and the resultant vector above, this will give me a vector included in the plane and perpendicular to the horizon pointing downhill (or uphill?). Anyway, I can figure it out now.
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
794
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
3
Views
2K
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 35 ·
2
Replies
35
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
5
Views
2K