Code Monkey home page Code Monkey logo

bonvision's Introduction

MIT License

Copyright (c) 2019 Aman Saleem

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bonvision's People

Contributors

amansaleem avatar glopesdev avatar znamensk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bonvision's Issues

Syncing a TTL with grating series

¡Hola BonVision crew!

I followed these instructions to make a series of flashing gratings. Here's the Bonsai Rx code for it: gratings.zip. Here's a screenshot of the workflow as well.
image
I would like for an Arduino to send a TTL pulse as the grating is showed, to sync it with an ephys rig.

I cannot figure out where to insert the digital output module to have it flag every single time a grating is showed (once every second for 5 minutes).

I will also cross post this issue on the Bonsai Rx github, in case its more of a general issue that can be solved over there.

Many thanks,
Kelvin

Use degree units to configure ViewWindow rotation

Currently most angle properties can be configured using degree units, but this is not true for specifying ViewWindow rotation, which uses radians rather than degrees. Given this node is often configured directly for manual screen calibration, it would be very useful to have it work with degrees.

Generalize mesh mapping to allow for pixel space view mapping

When using non-linear display surfaces such as spherical projection domes, each pixel in the projector output will be independently mapped to a viewing direction in the world. Currently the mesh mapping solution allows correcting this distortion using a grid of vertices that warp the final image texture.

However, given that we have a cubemap handy, the precision of this mapping can be improved by mapping each pixel fragment independently to a direction in the cubemap, essentially doing the distortion of the view directions in the fragment shader instead of the pixel shader.

DrawText not showing using the default parameters

The DrawText operator is failing to show with default parameters on the latest BonVision release. This seems to be related to the new layer order, since there was a fixed offset of -2 on the Z-axis.

Optimize normal matrix calculation

Normal matrix calculation is currently repeated on a per-vertex basis, but this could be optimized away into the CPU and uploaded to the shader on a per-draw basis.

Add operator to convert 2D projection matrix into 3D view point

Currently drawing 3D objects requires a specialized structure containing the view matrix, projection matrix and light source for rendering the scene. It would be useful to include a node for converting 2D (or 3D) projection matrices straight into a fixed 3D view point e.g. (Eye at (0,0,0) looking into -Z) and fixed or configurable light source.

This would allow easily drawing 3D objects into the eye-centric coordinate frame which is very useful in certain situations.

Multi-marker auto calibration for non-flat displays

Currently the automatic display calibration is limited to rectangular fiducial markers which require presentation on a flat display.

The goal of this feature request is to be able to use multiple smaller markers (or circular non-rectangular targets) to approximate auto-calibration of non-flat projection surfaces.

Add ShiftX and ShiftY parameters to DrawCheckerboard

Similar to DrawImage, it can be useful to generate a wrap-around animation using DrawCheckerboard directly by simply shifting the texture coordinates. You can do this currently by RenderTexture > DrawImage, but it is both less performant and risks aliasing if texture resolution is not high enough.

Transformation order for Quad, Image and Checkerboard primitives

The current default composition order for DrawQuad, DrawImage and DrawCheckerboard seems to be Translation > Scale > Rotation, rather than the most conventional Translation > Rotation > Scale.

This deforms quad vertex alignment so right angles are not preserved anymore for excessively elongated quads.

Expose InternalFormat in GammaCorrection

The GammaCorrection node expects 8-bit image as inputs. This can be an issue and make the post-gamma luminance of the screen step-like. Exposing the InternalFormat would solve the issue.
Maybe adding a small hint to say which pixel type are the most likely to be usefull in the description would be nice if you expose the property.

Use case examples where we cannot use the whole range and would want to use more than 256 values:
1- We have a projector with very bad dark. The first 50 gray values have exactly the same luminance. To do gamma correction we stretch the 205 other values, which means some steps
2- When using multiple monitors, we normalise the brightness of all screens by cropping the top and bottom of the curve (so that they have the same absolute luminance).

Externalized Rotation property type breaking change from Point3d to Point3f

The support for specifying ViewWindow calibration in degrees (#11) has broken type compatibility by exposing the Rotation property as a Point3f instead of a Point3d.

It is important to restore this compatibility as the output from automatic calibration routines is specified using 64-bit rather than 32-bit precision, which breaks several legacy workflows.

Examples/Demos down?

Hi,

It seems the examples and demos on the BonVision website are down. Moreover, I cant seem to find them in the repo nor in Bonsai gallery either.
Any chance they can be reuploaded?

Thanks,
Bruno

Add support for 3D spherical segment primitive to avoid pole-distortion

Although the mercator projection is extremely convenient for sphere mapping 2D primitives, it suffers from the drawback of exhibiting large distortions for stimuli presented near the poles.

One straightforward solution to this would be to allow rendering stimuli onto spherical segments which are placed around the unit sphere.

Add missing dependencies

Some BonVision operators (e.g.: DrawText) depend on Bonsai.Vision or Bonsai.Vision.Design. However, these do not seem to be part of the dependencies of the package.

Add support for perspective mapping

Similar to SphereMapping and MeshMapping, perspective mapping is a generally useful operator to warp the final render output, for example when mapping the output of a projector onto the surface of a planar screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.