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
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
[SOLVED] Heaptrc reports ...
by
jamie
[
Today
at 12:48:49 am]
New book on Object Pascal
by
TBMan
[
Today
at 12:39:00 am]
This worries me about our...
by
Curt Carpenter
[
Today
at 12:37:39 am]
Postgres, ZEOS and Visual...
by
wp
[November 13, 2025, 11:37:12 pm]
Programmatic filtering in...
by
jamie
[November 13, 2025, 11:30:59 pm]
In fpcsrc, many places ca...
by
avk
[November 13, 2025, 11:02:44 pm]
Variable "xyz" doesn't no...
by
Bitbeisser
[November 13, 2025, 11:01:46 pm]
Fpcupdeluxe
by
Cascade
[November 13, 2025, 10:46:00 pm]
line number when error ha...
by
Martin_fr
[November 13, 2025, 10:37:19 pm]
Access Violation
by
1HuntnMan
[November 13, 2025, 10:27:57 pm]
Unit Masks, matches funct...
by
Martin_fr
[November 13, 2025, 07:31:00 pm]
Minimum and maximum value...
by
ASerge
[November 13, 2025, 07:30:38 pm]
Help with search and repa...
by
avk
[November 13, 2025, 06:26:23 pm]
Problem Installing CHM He...
by
Curt Carpenter
[November 13, 2025, 05:50:37 pm]
Not visible soAllDirector...
by
LemonParty
[November 13, 2025, 05:44:26 pm]
What is your current pet ...
by
TBMan
[November 13, 2025, 05:07:28 pm]
How to detect if macOS ch...
by
Hansaplast
[November 13, 2025, 04:37:22 pm]
[SOLVED] Box-and-whisker ...
by
apeoperaio
[November 13, 2025, 03:40:35 pm]
updated pc but.. worse [S...
by
rnervi
[November 13, 2025, 12:34:48 pm]
Box-and-whisker plot with...
by
apeoperaio
[November 13, 2025, 12:14:39 pm]
synedit
by
scasparz
[November 13, 2025, 11:30:38 am]
Valgrind stops showing li...
by
Martin_fr
[November 13, 2025, 11:13:07 am]
[SOLVED] Feature request:...
by
Hansaplast
[November 13, 2025, 10:31:19 am]
Advanced Records Initiali...
by
Thaddy
[November 13, 2025, 08:06:10 am]
AArch64. Slow program sta...
by
dbannon
[November 13, 2025, 12:14:29 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: 3D cube/phong (Read 2660 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
Logged
circular
Hero Member
Posts: 4450
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