Recent

Author Topic: 3D cube/phong  (Read 2251 times)

bigeno

  • Sr. Member
  • ****
  • Posts: 266
3D cube/phong
« on: March 19, 2019, 07:51:12 pm »
I know how to paint phong, all good, but can you give me hint how to paint phong cube ? rounded edges like on second image

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: 3D cube/phong
« Reply #1 on: March 19, 2019, 11:39:56 pm »
I would suggest to do it using a 3D scene.
http://wiki.freepascal.org/BGRABitmap_tutorial_15

Though not sure about the exact shape in 3D. It is kind of round rectangle that has a certain height, and at the top there is yet another rounding.

Note that you don't need to have a lot of polygons to have a nice rounded phong lighting. See for example in bgrabitmap/test/bgratutorial3d the cylinder (example 3). By setting scene.DefaultLightingNormal to lnVertex you get a rounded effect even with low polygon count.
https://github.com/bgrabitmap/bgrabitmap/tree/master/test/bgratutorial3d
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018