Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale #2

Closed
2 tasks done
thejmazz opened this issue Dec 8, 2015 · 1 comment
Closed
2 tasks done

Scale #2

thejmazz opened this issue Dec 8, 2015 · 1 comment

Comments

@thejmazz
Copy link
Owner

thejmazz commented Dec 8, 2015

Scale

  • check if normal buffer is "good enough"
  • experiment with Z buffer on Intel 6100

A central problem with understanding the cell is the scale of its components. How big is the nucleus? How small is an ATP molecule? Or ATP Synthase?

Can that scale be visualized within a graphical application served through the browser on everyday devices with only integrated graphics? This is one of the central challenges - and goals - of BioRender.

The goal is to achieve 60fps on Intel Iris Graphics 6100 1536 MB - the integrated graphics that come with a modern i5 processor. If 60fps (16ms/frame) is simply too far reaching - 30fps should be the baseline.

Units

The standard units we will use throughout will be angstroms (Å) and nanometers (nm). Angstroms when discussing proteins, molecules, and complexes. Nanometers when discussing the distribution and size of cellular components. However, nanometers will be used most of the time, even when dealing with proteins. Angstroms will probably only be used for positioning proteins into complexes and protein mesh deformations.

We will start by using 1 in world coordinates as 1nm.

Objects

ATP Synthase

F1 Unit - 10nm

Mitochondrion

1500nm by 1000nm

Nucleus

5000nm

Cell

20 000nm

Implementation

Going from 1nm to 20 000nm is 4 jumps in magnitude. That is, 2 * 10^4 = 20 000.

Computer graphics represent depth using what is known as a "depth buffer" or (perhaps more commonly) "z buffer". It is important to note which objects should be placed in front of or behind one another. Normally, the z buffer is linear. Three.js has an example demonstrating a logarithmic depth buffer allowing you to "zoom through scene with objects ranging in size from 1µm to 100,000,000 light years". Unfortunately, this gets ~15fps on Iris. (Keep in mind my Radeon 6950 - a modest GPU - holds a solid 60fps without breaking a sweat). The normal z-buffer seems to break at 1m. This suggests that a linear buffer can handle 1µm to 1m is 9 jumps in magnitude. Perhaps performance will improve sufficiently with the logarithmic buffer when there is not a as big a gap (1µm to 100 000 000 light years is quite a gap).

@thejmazz thejmazz self-assigned this Dec 8, 2015
@thejmazz thejmazz changed the title Scale Graphics: Scale Dec 8, 2015
@thejmazz
Copy link
Owner Author

thejmazz commented Dec 9, 2015

  • Linear Z-buffer
  • Camera far clipping set to 100 000
  • Mitochondrion "plane" 1500x500
  • Nucleus 5000 diameter
  • Cell 10 000 diameter

60FPS! (but keep in mind scene is basically empty)

screen shot 2015-12-09 at 1 57 24 pm

With good LOD, it looks like linear z-buffer is suitable.

@thejmazz thejmazz changed the title Graphics: Scale Scale Feb 4, 2016
@thejmazz thejmazz added this to the Engine milestone Feb 9, 2016
@thejmazz thejmazz added the 2D label Feb 9, 2016
@thejmazz thejmazz modified the milestones: Graphics/Modellng Backbone, Engine Feb 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant