Sam's Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
notes:volume-rendering [2026/11/30 06:38] – Add volume rendering samnotes:volume-rendering [2026/11/30 07:28] (current) – title sam
Line 1: Line 1:
-====== An Interactive Volume Renderer ======+====== Interactive Volume Rendering ======
  
-{{volume-renderer-images:screenshot.jpg}}+{{notes:volume-rendering:screenshot.jpg?500}}
  
 <WRAP lo> <WRAP lo>
Line 19: Line 19:
 The implementation contains a function called ''%%volFromNRRD%%'' which performs the upload: The implementation contains a function called ''%%volFromNRRD%%'' which performs the upload:
  
-<code typesecript-ts>+<code javascript>
 export function volFromNRRD(gl: WebGL2RenderingContext, nrrd: nrrd.DecodedNRRD): Texture { export function volFromNRRD(gl: WebGL2RenderingContext, nrrd: nrrd.DecodedNRRD): Texture {
   ... Some checks on the nrrd file ...   ... Some checks on the nrrd file ...
Line 104: Line 104:
 Including this alpha component is important because it allows us to "hide" certain densities from the rendered output, allowing us to visualize surfaces that would otherwise be obscured. The below video demonstrates adding a new control point to the transfer function in order to visualize and color the more dense //dentin// of the tooth. Including this alpha component is important because it allows us to "hide" certain densities from the rendered output, allowing us to visualize surfaces that would otherwise be obscured. The below video demonstrates adding a new control point to the transfer function in order to visualize and color the more dense //dentin// of the tooth.
  
-{{volume-renderer-images:txf.mov?400}}+{{notes:volume-rendering:txf.mp4?400}}
  
 <WRAP lo> <WRAP lo>
Line 116: Line 116:
 When the user presses shift and drags, the drag vector (a vector pointing from the beginning of the drag to the end in screen-space) is projected into world-space, and the camera's origin is offset by this vector. This ensures that the object's origin moves "under" the cursor, irrespective of the camera's distance from the origin or its field of view. When the user presses shift and drags, the drag vector (a vector pointing from the beginning of the drag to the end in screen-space) is projected into world-space, and the camera's origin is offset by this vector. This ensures that the object's origin moves "under" the cursor, irrespective of the camera's distance from the origin or its field of view.
  
-{{volume-renderer-images:viewport.mov?400}}+{{notes:volume-rendering:viewport.mp4?400}}
  
 <WRAP lo> <WRAP lo>
notes/volume-rendering.1796020694.txt.gz · Last modified: by sam