Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Windows Tip - OpenGL ► «««« 03 / 18 »»»»

Spherical projection, with OpenGL and calculations!


In computer graphics you often want to know how big an object looks on the screen, whether under OpenGL, DirectX, ... !



A simple way to obtain an upper bound on pixel coverage is to embed an object in a bounding box, such as a sphere, and then simply rasterize the sphere or box to determine the number of pixels. This leads to increased performance and better rendering in 3D!

This requires complexity in the 3D engine and likely delays processing, as the result is slow. Modern hardware allows for conditional rendering, but the technique can still only be applied in certain cases. For example, it would be useful if a 3D tessellation or geometry were able to spontaneously tessellate or omit tree leaves based on the object's pixel coverage!

Contents:

1.) ... A simple example with 3D spheres!
2.) ... An example with 3D spheres/cubes!
3.) ... WebGL planar and perspective projection mapping!




1.) A simple example with 3D spheres!

Here you will find a simple and elective solution: ►►  https://www.shadertoy.com/view/XdBGzd 

PS:
Of course, this whole thing needs to be thought through further in order to develop its full advantages on the corresponding 3D engine!


(Image-1) Spherical projection, with OpenGL and calculations!
Spherical projection, with OpenGL and calculations!



Info:

Spheres in 3D space become ellipses when projected onto the camera's view plane. In fact, these ellipses can be analytically determined from the camera parameters and sphere geometry, allowing their precise position, orientation, and surface area to be calculated. This means that, given a sphere and a camera and buffer resolution, there is an analytical formula that specifies the number of pixels covered by a sphere in the image. This can be very useful for implementing LOD for objects based on their on-screen size (think of trees, vegetation, characters, or other complex objects).

 

-
▲ Back to the top ▲




2.) An example with 3D balls / cubes!



Here is a second example to understand the projection:

►►►  https://www.shadertoy.com/view/WtfGW2 

(Image-2) Spherical projection, and 3D cube!
Spherical projection and 3D cubes!

-
▲ Back to the top ▲




3.) WebGL planar and perspective projection mapping!


Projection mapping is the process of "projecting" an image in the same sense as pointing a movie projector at a screen and projecting a film onto it. A movie projector projects a perspective plane. The farther the screen is from the projector, the larger the image becomes. If you tilt the screen so that it is not perpendicular to the movie projector, the result would be a trapezoid or any quadrilateral.

You can learn about this in a fun way here:
►►  https://webglfundamentals.org/webgl/lessons/webgl-planar-projection-mapping.html  

(Image-3) Projection, with OpenGL and calculations!
Projection, with OpenGL and calculations!

-
▲ Back to the top ▲





Updated on: 12 April 2025 20:37 Windows
Keywords: opengl, spherical, projection, with, calculations, computer, graphics, often, want, know, object, looks, screen, whether, under, directx, simple, obtain, upper, bound


Similar information on the page

Windows

... Wi-Fi and Wireless display on Windows 11?


The wireless display function under Windows 11 is very convenient and easy to make a presentation on the big TV screen in the living room or in the office
Windows

... Easy Share the folder with everyone on Windows 11?


The easy file sharing in Windows 11 can be deactivated and activated quite easily via the corresponding folder or drive options Content: 1. Share Folder,
Windows

... Clean up TEMP quickly on Windows 11


Its easy to quickly clean up temporary files and temporary folders on Windows 11 or with one button klick 1. Deleting the temporary files via the
Windows

... Multiple windows with multiple monitors behave on Windows 11


The new function to easily influence the behavior of the window with multiple monitors on Windows 11 is practical and can also be adapted Everyone probably
Windows

... Is the new Windows 11 really installed?


It is quite easy to see whether the new Windows 11 has really been installed on your computer Content: 1. Is the new Windows 11 installed? 2.
Windows

... Difference between screen keyboard and touch keyboard, Windows 11, 10, ...?


The difference between screen keyboard and touch keyboard under Windows 11, 10, The ►  classic on-screen keyboard and the touchscreen keyboard  are
Windows

... Uninstall applications on Windows 11


Nothing is easier than uninstalling applications under Windows 11 to free up a little space on your PC 1. Uninstall Windows applications quickly



▲ Back to the top ▲



... OpenGL Tip



3D.Benchmark.OK # AlwaysMouseWheel # AutoHideDesktopIcons # AutoPowerOptionsOK # ClassicDesktopClock # DesktopDigitalClock # DesktopNoteOK # DesktopOK # DontSleep # Edge-Chromium # ExperienceIndexOK # Find.Same.Images.OK # FontViewOK # GetPixelColor # GetWindowText # Internet # IsMyHdOK # KeepMouseSpeedOK # NewFileTime # OpenCloseDriveEject # OpenGL # PhotoResizerOK # Q-Dir # QuickMemoryTestOK # QuickTextPaste # Registry # ShortDoorNote # StressMyPC # System # TheAeroClock # Tools # Version # WinScan2PDF #




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + PhotoResizerOK
  + Office.Files.Images
  + Film.Strip.Explorer
  + WinScan2PDF
  + DontSleep
  + ExperienceIndexOK
  + QuickTextPaste
  + DesktopNoteOK
  + ShortDoorNote
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg ERR2: softwareok.de • softwareok.com • softwareok.com • softwareok.eu
53.051 msec.


>> ☕ Buy SoftwareOK a Coffee ☕ <<



► Easy paste text shortcut key examples! ◄
► Understand and use freely selectable colors, frames and backgrounds! ◄
► Show all windows on multi-desktops on the Windows 11 taskbar? ◄
► Mouse tolerance range, 1-10 pixels in Auto Power Options OK! ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....