Guide For Exporter Writers

A forum for exporter development discussion.
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Re:

Post by CTZn » Thu Jul 26, 2012 1:13 pm

galinette wrote:
CTZn wrote:Seriously what are the fourth line and column for ?
Homogeneous coordinates. An application of a math object known as "projective spaces". Hyper-useful for rasterized 3D.

For making it short, it generalizes the transformation matrix to translations, frustum projections, etc... using a 4x4 matrix. You can combine all the transformations (rotaton, scaling, skew, translation, perspective, etc...) just by multiplying 4x4 matrices, and with the resulting 4x4 matrix you have a transformation that will change object-local vertex coordinates into screen space coordinates in one matrix-vector multiplication. Isn't that magic?
I suppose that the column/row defining perspective/frustum is the one not used by translation... matrices have simply an overhelming amount of properties, that's totally flipping. Dark magic I'm out :D

Whatever the word play is about Headroom I abide by. I'm just getting a better notion of the properties of multiplications...

You should know that it took me about one week to get this guy right:

Code: Select all

periodX = fract(
			paramTilesX() * texi() + paramMortarWidth() / 2.0
		) / paramMortarWidth() * 3.14159265
8) :lol:

What it does is to insert half a sin wave between two tiles whatever their spacing is. I should have asked for help much earlier, every day I was certain it would be the day I'd crack it... madness.
obsolete asset

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Guide For Exporter Writers

Post by CTZn » Thu Jul 26, 2012 1:50 pm

Having typed this I'm finding out that

Code: Select all

(b * (2.0 * b) * 50.0) * eva(pos)
is throwing an error while

Code: Select all

eva(pos)*(b * (2.0 * b) * 50.0)
doesn't.

Lol ?
obsolete asset

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: Guide For Exporter Writers

Post by fused » Thu Jul 26, 2012 9:12 pm

CTZn wrote:Having typed this I'm finding out that

Code: Select all

(b * (2.0 * b) * 50.0) * eva(pos)
is throwing an error while

Code: Select all

eva(pos)*(b * (2.0 * b) * 50.0)
doesn't.

Lol ?
The operator is defined as mul(vec3, float) so it expects arguments in that order :)

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Guide For Exporter Writers

Post by CTZn » Fri Jul 27, 2012 1:44 am

fused wrote:
CTZn wrote:Having typed this I'm finding out that

Code: Select all

(b * (2.0 * b) * 50.0) * eva(pos)
is throwing an error while

Code: Select all

eva(pos)*(b * (2.0 * b) * 50.0)
doesn't.

Lol ?
The operator is defined as mul(vec3, float) so it expects arguments in that order :)
Yup I figured that out quickly but I would not tell, I found the fact funny in this context of mathematisches war fog !

What's Headroom's joke really about ?
obsolete asset

Post Reply
64 posts

Who is online

Users browsing this forum: No registered users and 2 guests