Shave me the math: plane projection
category: code [glöplog]
Let's say I have a uniformly tessellated grid, and I want to project it like this:
My idea is to render an ocean or something like that.
How do I do something like this?
My idea is to render an ocean or something like that.
How do I do something like this?
Assuming the middle plane will be a height field, do you want the normals from which each height is measured along to be from the top plane or the middle plane? Or will the heights be along the lines formed from going from the 2D parameterization (with each corner being going from [0,0] to [1,1]) of the top plane to the middle plane?
I don't really need the normals as long as I have the position, for what I want.
I've found the origin of the image here: http://habib.wikidot.com/projected-grid-ocean-shader-full-html-version
And proper math, and some code.
I've found the origin of the image here: http://habib.wikidot.com/projected-grid-ocean-shader-full-html-version
And proper math, and some code.
xernobyl, simply take every vertex of your camera-aligned regular grid, create a ray that passes through it, and intersect that ray with the horizontal plane of the ocean. you'll see that it all reduces to a few multiplications and one division.
wow nice article/wiki
Frustum is such a dirty word, like 'parallel epiped'. It discerns not mathematicians from anglophiles; it fucks both in the ass.
Xernobyl: the article looks pretty complete...
Xernobyl: the article looks pretty complete...
Photon: it is. But I've found the image before the article.
Math Teacher shaves head bald in front of class:
[img]http://i.ytimg.com/vi/cEa3oYQbcaI/0.jpg[/url]
[img]http://i.ytimg.com/vi/cEa3oYQbcaI/0.jpg[/url]
Bleh
so we will have shaved heads and realtime ocean at REVISION?!?! :D