Projection code

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

Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #2536
      Jeroen de Bruin
      Participant

      Dear GDL Aficionados,

      I am using the Projection code with mask 3 (shaded). This produces a colored projection. However it also includes some shadow effects. Is there a combination where I can see the original Surface Color (RGB) in 2D?

      new Parameter: Surfaceblock

      2D Script:
      PROJECT2{3} 4,270,3+1024, 15
      ADD2 1,0
      PROJECT2{3} 3,90,3+1024, 15
      ADD2 0,.5
      PROJECT2{3} 5,90,3+1024, 15

      3D Script:
      MATERIAL Surfaceblock
      BLOCK 1,1,1
      ADDZ 1
      ADDX .4
      ADDY .4
      BLOCK .2,.2,.2

      Jeroen de Bruin

    • #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

    • #2602
      Jeroen de Bruin
      Participant

      Thank, Péter,
      I was already using that work around, but that does not give the proper RGB of the Surface. Can you place this on the wishlist to have a projection without shadows?

      regards,
      Jeroen

      Jeroen de Bruin

Viewing 2 reply threads
  • The forum ‘3D modelling’ is closed to new topics and replies.