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
IBX 2.4.0 for Lazarus is ...
by
tonyw
[
Today
at 05:23:02 pm]
HTTP/2+1.1 server on Laza...
by
ASBzone
[
Today
at 05:12:34 pm]
Lazarus Release 2.0.12
by
geraldholdsworth
[
Today
at 04:58:37 pm]
TLazSerial : serial port ...
by
Joek
[
Today
at 04:38:15 pm]
Brook Security (https)
by
RedOctober
[
Today
at 04:31:57 pm]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 04:00:52 pm]
2.0.12 still a problem wi...
by
wmeyer
[
Today
at 03:35:35 pm]
problem executting tproce...
by
bonmario
[
Today
at 03:27:47 pm]
Best practice for using h...
by
MarkMLl
[
Today
at 03:18:51 pm]
TFPHttpClient with SSL cl...
by
PascalDragon
[
Today
at 03:09:25 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: 3D cube/phong (Read 1305 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: 3665
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