Reply To: Projection code

Home Forums Problems and solutions in GDL 3D modelling Projection code Reply To: Projection code

#2592
Péter Baksa
Keymaster

Hi Jeroen,

Yes, this is possible with some sort of hacking.
You can pass parameters to the 3D script with PROJECT2{3}. Set up a parameter to signal that you want a special 3D model that is rotated to the same position as the top view. That way you can get equivalent shadings.
Note those shadings won’t be the actual rgb of the surface, I don’t know of a way of achieving to display that.

2D:
PROJECT2{3} 3, 90, 3, 15, parameters side = 0
PROJECT2{3} 3, 90, 3, 15, parameters side = 1
PROJECT2{3} 3, 90, 3, 15, parameters side = 2

3D:
if side = 1 then rotx 90
if side = 2 then roty -90

MATERIAL Surfaceblock
BLOCK 1,1,1
ADDZ 1
ADDX .4
ADDY .4
BLOCK .2,.2,.2

Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE