Open main menu

CDOT Wiki β

Changes

XB PointStream

3,341 bytes added, 15:43, 27 January 2014
m
Added warning about out of date information.
===Releases===A cross<!-browser JavaScript tool which will emulate Arius3D's PointStream viewer. It will be able to quickly render a large amount of point cloud data to the &lt;canvas&gt; tag using WebGL.<br />[http://scotland.proximity.on.ca/asalga/releases/0.1.zip XBPS 0.1]<br />[http://scotland.proximity.on.ca/asalga/releases/0.2.zip XBPS 0.2]<br />[http://scotland.proximity.on.ca/asalga/releases/0.3.zip XBPS 0.3]<br />[http://scotland.proximity.on.ca/asalga/releases/0.4.zip XBPS 0.4]<br />XBPS 0.4.5 '''[[http://scotland.proximity.on.ca/asalga/releases/0.4.5.zip Only Lib] | [http://github.com/asalga/XB-PointStream/archives/0.4.5 Full]]'''<br />#########
===XB PointStream Dev Links===
[http://scotland.proximity.on.ca/asalga/ 3D Image Gallery]<br />
[http://en.wordpress.com/tag/xb-pointstream/ Blogs]<br />
[http://zenit.senecac.on.ca/wiki/index.php/XB_PointStream/specs Specifications]<br />
[http://cdot.lighthouseapp.com/projects/52886-xb-pointstream LightHouse]<br />
[http://github.com/asalga/XB-PointStream Github]<br />
[http://twitter.com/XBPointStream Twitter]<br />
[http://www.youtube.com/results?search_query=xb+pointstream&aq=f YouTube Videos]<br />
===Development Resources=== NOTE: To edit current events, go to the page: [http[Template://developer.nvidia.com/object/gpu_gems_home.html GPU GemsCDOT Current Events]<br />[http://http.developer.nvidia.com/GPUGems2/gpugems2_frontmatter.html GPU Gems 2]<br />
[http://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html WebGL Specification]<br />
[http://www.nihilogic.dk/labs/webgl_cheat_sheet/WebGL_Cheat_Sheet.pdf WebGL Cheat Sheet]<br />
[http://www.khronos.org/opengles/sdk/docs/man/ OpenGLES 2.0 man pages]<br />
[http######### --><!-- Style borrowed from Wikipedia's front page --><!-- Main title is suppressed by a CSS entry in the page: MediaWiki://wwwMonobook.gamasutra.comcss --><!-- BANNER ACROSS TOP OF PAGE -->{| id="mp-topbanner" style="width:100%; background:#fcfcfc; border:none;"| style="width:88%; color:#000;" |{| style="width: 100%; border:1px solid #ccc; background:none;"| style="text-align:center; color:#000;" |<span style="font-size:262%; border:none; margin:0; color:#000; line-height: 100%">'''<span style="color: #b51418">XB PointStream</viewspan>'''<br /feature/3394/occlusion_culling_algorithms>[[File:Multishells.php Occlusion Culling Algorithmspng|center|250px]]<br /span>
<!---'''Sample Files'''<br {{Admon/>obsolete}}[http://www.fastscan3d.com/download/samples/ OBJ Sample Files]<br />|}-->|}
<!-- LEFT-HAND COLUMN -->{| id="mp-upper" style="margin:0 0 0 0; background:none;"<!-- |colspan=Parser Interface"3"|<div style="background: #ffff00">'''Important!''' - The [[CDOT Development Systems]] have been re-arranged .</div>|- -->| class="MainPageBG" style="width:60%; border:1px solid #ccc; background:#f8f8f8; vertical-align:top; color:#000;"|{| id="mp-left" cellpadding="2" cellspacing="5" style="width:100%; vertical-align:top; background:#f8f8f8;"! <h2 id="mp-tfa-h2" style="margin:0; background:#b51418; font-size:120%; font-weight:bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.2em 0.4em;">About XB PointStream</h2>|-| style="color:#000;" | [[File:Shell.png|right|150px]]<div id="mp-tfa">The typical method used to represent 3D graphics for applications such as video games is that of a textured meshed. Essentially the object is made up of a mesh of flat triangles and a 2D texture graphic that is applied over the mesh to give it its colour and depth. However, this is not the only way to represent 3D graphics. Another method for representing 3D graphics is that of a point cloud which is a set of coloured points in 3D space. While a point cloud is usually larger than a textured mesh in terms of amount of data, it provides a level of realism not found in a mesh. Furthermore, some 3D scanning equipment such as 3D scanners, LiDAR equipment, medical scanners, and MicroSoft's Kinect all deliver their data as point clouds.
There will XB PointStream provides a framework to simplify the streaming and rendering of point clouds allowing them to be cases rendered in a web page without any plug-ins. WebGL, a JavaScript API based on Open GL ES 2.0 enables the creation of 3D content in which users the web browser without any plugins. It is currently implemented in release version of Firefox and Chrome and development versions of Safari and Opera. To support the creation of 3D content many web libraries have their own file formatwhich they want to render with been written. However, most of these libraries are based on textured meshes. XB PointStream (for example,is different from these other libraries in that it focuses on point clouds.ARA or .XML). We need It is highly customizable to give users the ability adapt to write theirown parser different file formats and hook it into the libraryprovides support for addition of customizable shaders.</div>
Users would write their JavaScript code which would implement|-! <h2 id="mp-tfa-h2" style="margin:0; background:#b51418; font-size:120%; font-weight:bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.2em 0.4em;">Demos</h2>|-| style="color:#000;" | <div id="mp-tfa">XB PointStream uses WebGL and thus you will need to use a WebGL enabled browser to see the methods belowdemos running live. Once they do Current browsers thatsupport WebGL are Firefox 4.0+ and current release of Chrome. Development versions of Safari and Opera also support WebGL. If your video card is really old or does not meet standards, they would register theiryour browser may also have problems supporting WebGL. [http://www.doesmybrowsersupportwebgl.com/ Click here to test your browser]. If your browser does not support WebGL, please check out the videos of the demos instead.</div><br>{| class="wikitable" border="1"|+!Demo !! Run it! ([http://www.doesmybrowsersupportwebgl.com/ needs webGL enabled browser]) !! Watch it!|-| Ply Point Cloud || http://scotland.proximity.on.ca/asalga/demos/andor/|||-| Drag and Drop Viewer |||| http://www.youtube.com/watch?v=y3AGz-8X-aI|-parser | Vitual Museum || http://scotland.proximity.on.ca/asalga/demos/museum/|||-| SMS Demo (requires a device with the library by passing in an extension motion scensors and their parserFF4 || http://scotland.proximity.on.ca/asalga/demos/sms/||http://www.youtube.com/watch?v=U37owvJj3Ws|-| User Defined Shaders || http://scotland.proximity.on.ca/asalga/demos/0.5/demo/user_shader/ |||-| Multiple Point clouds || http://scotland.proximity.on.ca/asalga/demos/0.5/demo/many_clouds/ ||
The library would then take care of the rest by creating an instanceof their parser, call its methods and return a point cloud object.|}
<pre>
/*
Add an event listener to the parser. Once the event occurs, the parser
will call the associated function and pass in a reference to itself.
The parser needs to pass itself back to the library since the library could
be working with many parsers simultaneously.
@param {String|} eventName | style="border:1px solid transparent;" |<!-- Right-hand column -- can be one of the following>| class="MainPageBG" style="width:40%; border:1px solid #ccc; background:#f8f8f8; vertical-align:top;"| {| id="onstartmp-right" cellpadding="2" cellspacing="5" style="width:100%; vertical- must occur exactly once - func(parser)align:top; background:#f8f8f8;" "onparse! <h2 id=" mp- must occur one or many times itn- func(parser, {h2"VERTEXstyle="margin:0; background:#b51418; font-size:120%; font-weight:[bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.2em 0..], 4em;">Current Blog Posts</h2>|-| style="color:#000;" | <div id="COLORmp-itn"><!-- {{Planet Current Posts}} --><rss>http:[//asalga.wordpress.com/category/point-cloud/feed/|short|max=10</rss>|-! <h2 id="mp-tfa-h2" style="margin:0; background:#b51418; font-size:120%; font-weight:bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.], etc2em 0.4em;">Downloads - Release 0..}8</h2> "onfinish" |- must occur exactly once - func(parser) | style="hookcolor:#000;" - ?|
@param {Function} func * '''[http://scotland.proximity.on.ca/asalga/releases/0.8/xbps-min-0.8.js minified] | [http://scotland.proximity.on.ca/asalga/releases/0.8/xbps-min-0.8.zip src + example] | [http://github.com/asalga/XB- the function to call when the event occursPointStream/archives/0.8 full]'''|-*! <h2 id="mp-tfa-h2" style="margin:0; background:#b51418; font-size:120%; font-weight:bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.2em 0.4em;">Development Links</h2>|-addEventListener(eventName, func)| style="color:#000;" |
* [http://cdot.lighthouseapp.com/projects/52886-xb-pointstream Bug Tracker]* [http://github.com/asalga/XB-PointStream Github]* [http://en.wordpress.com/tag/xb-pointstream/ Blogs]* [http://zenit.senecac.on.ca/wiki/index.php/XB_PointStream/specs Specifications]* [http://twitter.com/XBPointStream Twitter]* [http://www.youtube.com/results?search_query=xb+pointstream&aq=f YouTube Videos]* [http://zenit.senecac.on.ca/wiki/index.php/XB_PointStream/extending_xbps Extending XBPointStream]* [http://zenit.senecac.on.ca/wiki/index.php/XB_PointStream/custom_parsers Custom Parsers]|-! <h2 id="mp-tfa-h2" style="margin:0; background:#b51418; font-size:120%; font-weight:bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.2em 0.4em;">Projects using XB PointStream</h2>|-| style="color:#000;" |*[http://www.visual-experiments.com/2011/04/13/google-chrome-photosynth-webgl-viewer-extension/ Google Chrome Photosynth WebGL Viewer Extension] Removes an event listener from being called* [http://3dtubeme.com/ 3D TubeMe]
@param {String} eventName |-! <h2 id="mp-tfa-h2" style="margin:0; background:#b51418; font-size:120%; font-weight:bold; border:1px solid #ccc; text-align:left; color:#fff; padding:0.2em 0.4em;">Old Releases</h2>|-| style="color:#000;" |* Release 0.75 ['''[http://scotland.proximity.on.ca/asalga/releases/0.75/xbps-min-0.75.zip src + example]''' | '''[http://scotland.proximity.on.ca/asalga/releases/0.75/xbps-min-0.75.js minified]''' | '''[http://github.com/asalga/XB-PointStream/archives/0.75 full]''']* Release 0.7 ['''[http://scotland.proximity.on.ca/asalga/releases/0.7/xbps-min-0.7.zip src + example]''' | '''[http://scotland.proximity.on.ca/asalga/releases/0.7/xbps-min-0.7.js minified]''' | '''[http://github.com/asalga/XB-PointStream/archives/0.7 full]''']* Release 0.6 ['''[http://scotland.proximity.on.ca/asalga/releases/0.6/xbps-min-0.6.zip src + example]''' | '''[http://scotland.proximity.on.ca/asalga/releases/0.6/xbps-min-0.6.js minified]''' | '''[http://github.com/asalga/XB-PointStream/archives/0.6 full]''']* [http://scotland.proximity.on.ca/asalga/releases/0.5/xbps-0.5.js Release 0.5 Minified] * [http://scotland.proximity.on.ca/asalga/releases/0.5/xbps-min-0.5.zip Release 0.5 source + example]* [http://scotland.proximity.on.ca/asalga/releases/0.4.5.zip Release 0.4.5 library only]* [http://github.com/asalga/XB- Name of the eventPointStream/archives/0.4.5 Release 0.4.5 Full]*[http://scotland.proximity.on.ca/asalga/releases/0.4.zip Release 0.4]removeEventListener(eventName)* [http://scotland.proximity.on.ca/asalga/releases/0.3.zip Release 0.3]* [http://scotland.proximity.on.ca/asalga/releases/0.2.zip Release 0.2]* [http://scotland.proximity.on.ca/asalga/releases/0.1.zip Release 0.1]|}|}
/*
Begins to load the resource.
@param {String} path - path to resource*/load(path)  ////// Getters /* Get the version of this parser. @returns {String} parser version*/version /* Get the number of points which have been parsed.  @returns {Number} the number of points parsed so far by the parser.*/numParsedPoints /* Get the total number of points in the point cloud, including points which have not yet been parsed.  @returns {Number} the total number of points in the resource or -1 if unknown.*/numTotalPoints /* Get the progress of the parser, how much it has parsed so far.  @returns {Number} value between 0 to 1 or -1 if unknown.*/progress /* The size of the resource in bytes.  @returns {Number} the number of bytes in the resource or -1 if unknown.*/fileSize</pre> <pre>/* The following example demonstrates how XB PointStream might use a particular parser.*/ var parser; function startCallback(parser){ // started} function parseCallback(parser){ parser.version; parser.numParsedPoints; parser.numTotalPoints; parser.progress; parser.fileSize;} function finishCallback(){ // finished} // create a hypothetical parser and set the callbacksparser = new XYZParser({ start: startCallback, parse: parseCallback, end: loadedCallback});// load some resourceparser.load("pointcloud.xyz"); </pre> ===Performance Issue Ideas===* Spatially partition point cloud into Bounding volume hierarchy and do bounding volume frustum culling* Do static rendering* Render low LOD when rotating point cloud* Push as much as we can to CPU and GPU* Use progressive "mesh" optimization to render objects if they are far from the camera* Allow user to control LOD* Stream point cloud, dynamically create and merge bounding volumes* Pre-create Bounding volume hierarchy__NOTOC__ __NOEDITSECTION__
932
edits