## Guide For Exporter Writers

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

### Re: Re:

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

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``````

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

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

### Re: Guide For Exporter Writers

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

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

### Re: Guide For Exporter Writers

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

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

### Re: Guide For Exporter Writers

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 !