Blog

Page / - last modified by Victor Zhang on 16:38, 07/04/2020

Blog

last modified by Victor Zhang

on 16:38, 07/04/2020

Table of Contents

Blog - posts for May 2020

https://wiki.melissakronenberger.com:443/bin/view/Blog/Development%20log%20-%20GDice%20-%20Number">

May 21 2020

May 21, 2020

https://wiki.melissakronenberger.com:443/bin/view/Blog/Development%20log%20-%20GDice%20-%20Number">Development log - GDice - Number

Developed Nixie Tube's appearance as spritesheet

Test use here: Nixie Spritesheet

Has all source files

Uploaded to: https://opengameart.org/content/nixie-digits-spritesheet as CC-BY-4.0

Might not be used in final project as the numbers are too small

Maybe it's just better to photoshoot the tube running using Arduino

Posted by Victor Zhang · Permalink

https://wiki.melissakronenberger.com:443/bin/view/Blog/Raycast%20on%20Phaser%20Camera3D%20Plugin">

May 18 2020

May 18, 2020

https://wiki.melissakronenberger.com:443/bin/view/Blog/Raycast%20on%20Phaser%20Camera3D%20Plugin">Raycast on Phaser Camera3D Plugin

The problem is actually discovered by a student when trying to implement a forward running game (They need to click the enemy)

The camera3d class provides a ray function: https://photonstorm.github.io/phaser3-docs/Phaser.Cameras.Sprite3D.PerspectiveCamera.html#getPickRay__anchor

In that way, calculating the x,y on the target plane and then do some hit-test manually would do the job

Used example: http://labs.phaser.io/edit.html?src=src\camera\3D%20camera\floor.js

Modify line 33 to : var balls = camera.createRect({ x: 8, y: 1, z: 8 }, 32, 'ball');

Add following block to create():
balls.forEach( function(ball){
ball.setData('tag', 'ball'+ball.x+':'+ball.y+':'+ball.z);
} )
this.input.on('pointerdown', function (pointer) {
ray = camera.getPickRay(pointer.x, pointer.y);
balls.forEach( function(ball){
// r is hardcoded here
let r = 4;
// calculate x y @ z of the object
let tx, ty;
let tz = ball.z;
tx = ray.origin.x + ray.direction.x * (tz - ray.origin.z ) / ray.direction.z;
ty = ray.origin.y + ray.direction.y * (ray.origin.z - tz) / ray.direction.z;
let tl = Math.sqrt( Math.pow(tx - ball.x, 2) + Math.pow(ty - ball.y, 2) );
if( tl < r ){
console.log(ball.getData('tag')+' isHit');
ball.gameObject.alpha = 0;
}
} );
}, this);

Explanation:

the radius is hard coded here (5)

more complex hit testing will need to be implemented for complex shapes

manually enumerated through all object, inefficient (may need to implement some obvious exclusion for optimization)

Extra problem

Why is y axis reversed here?

To study:

Math of https://codepen.io/samme/pen/PBMaLJ ray blocking ,will be useful for next project

Posted by Victor Zhang · Permalink

https://wiki.melissakronenberger.com:443/bin/view/Blog/Air%20particle%20separator">

May 08 2020

May 8, 2020

https://wiki.melissakronenberger.com:443/bin/view/Blog/Air%20particle%20separator">Air particle separator

https://engineering.csuohio.edu/mce/3d-printing-lab

https://www.researchgate.net/publication/222782238_Turboshaft_engine_air_particle_separation

Posted by Victor Zhang · Permalink

https://wiki.melissakronenberger.com:443/bin/view/Blog/Imaging%20Device%20%20and%20Webcam">

May 06 2020

May 6, 2020

https://wiki.melissakronenberger.com:443/bin/view/Blog/Imaging%20Device%20%20and%20Webcam">Imaging Device and Webcam

As the recent need for remote learning, trying to setup stream hardware

ITS has Doc Cam hardware however the driver they provide here: https://www.elmoeurope.com/index.php/en/download-service/software installs the device as "Imaging devices" which is somehow different from "Cameras" ( from device manager)

TWAIN is also used by scanner so understand why it does make sense for Chat apps not supporting it

But why do real-time doc cam register as TWAIN instead of Cameras

It doesn't provide better quality

Speculations:

YUV format?

FPS?

Irregular resolution?

PS Eye driver written by this company https://codelaboratories.com/products/eye/driver/

Archive (link : https://archive.org/download/CLEyeDriver5.3.0.0341Emuline/CL-Eye-Driver-5.3.0.0341-Emuline.exe)[download alt]

Also registers as "Imaging devices" thus meaning can't be used by most of the windows apps

Making a TWAIN to Camera bridge

Does it worth the effort?

As newer devices(even doc cams) supports UVC driver

If as a hobby project, what's the effort

Device driver

Bridging service

Posted by Victor Zhang · Permalink