Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Graphics
»
BGRABitmap and LazPaint
»
3D cube/phong
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Most primitive way for do...
by
Roland57
[April 20, 2021, 11:36:29 pm]
Find hex string in hex ed...
by
JCDes
[April 20, 2021, 11:30:06 pm]
Odd way of calculating th...
by
Bart
[April 20, 2021, 11:28:12 pm]
Getting basic state-depen...
by
Gustavo 'Gus' Carreno
[April 20, 2021, 11:26:46 pm]
Analogue of MessageDlg
by
jmpessoa
[April 20, 2021, 11:24:05 pm]
A poll about FPC +/ Lazar...
by
garlar27
[April 20, 2021, 10:50:44 pm]
Unfolding bug after searc...
by
Martin_fr
[April 20, 2021, 09:13:48 pm]
Compiling Linux project t...
by
pascal111
[April 20, 2021, 08:34:10 pm]
[fixed] problem with Char...
by
Muso
[April 20, 2021, 08:22:22 pm]
TResampleFilter rfBestQua...
by
circular
[April 20, 2021, 08:01:02 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: 3D cube/phong (Read 1387 times)
bigeno
Sr. Member
Posts: 250
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
Logged
circular
Hero Member
Posts: 3694
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
Logged
Conscience is the debugger of the mind
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Graphics
»
BGRABitmap and LazPaint
»
3D cube/phong
TinyPortal
© 2005-2018