Code Monkey home page Code Monkey logo

unity-volume-rendering's Introduction

unity-volume-rendering

Volume rendering by object space raymarching for Unity.

VolumeRendering.shader cut a volume each axes by _SliceMin, _SliceMax properties.

Object space raymarching

VolumeRendering component generates a Cube geometry which has 1.0 length edges. By object space raymarching techniques, rendering a volume with a MeshRenderer. (See references)

Slice axes rotation

By setting an axis quaternion in VolumeRendering component, you can cut a volume from arbitrary angles.

VolumeAssetBuilder

Menu : Window -> VolumeAssetBuilder

VolumeAssetBuilder builds a 3D texture asset from a pvm raw file. (volume raw data)

Compatibility

tested on Unity 2017.2.8f1, windows10 (GTX 1060).

Sources

unity-volume-rendering's People

Contributors

mattatz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unity-volume-rendering's Issues

What if the AABB use float3(0,0,0) and float3(1,1,1)?

In the code,AABB box use texcoord of float3(0,0,0) and float3(1,1,1).Why this?
As I know, NDC in unity is float3(0,0,0) and float3(1,1,1). Why didn't you use this?
If use this, what will change to the code?
I tryed to do this, but failed. Would you like make another script for this ?

rendering volumes with non-equal dimensions?

Hey do you know how to properly set up the 3d texture for a volume with non-equal dimensions, ie, a volume that is 200x200x100, instead of 200x200x200?

when i use your code, it stretches the z-axis in the above sample, so the volume looks stretched. however, when i change the vertices here

var vertices = new Vector3[] { new Vector3 (-0.5f, -0.5f, -0.5f), new Vector3 ( 0.5f, -0.5f, -0.5f), new Vector3 ( 0.5f, 0.5f, -0.5f), new Vector3 (-0.5f, 0.5f, -0.5f), new Vector3 (-0.5f, 0.5f, 0.5f), new Vector3 ( 0.5f, 0.5f, 0.5f), new Vector3 ( 0.5f, -0.5f, 0.5f), new Vector3 (-0.5f, -0.5f, 0.5f), };

it just cuts out part of the volume (ie, for the above example i would change all the z vertices to -.25 or 0.25, so that the mesh would take only half the space in the z (fitting the proportions of the 200x200x100 volume).

i am unable to set up a mesh with a texture of differently sized dimensions

here is the issue i posted on unity answers ,with a pic:

https://answers.unity.com/questions/1546255/3dtexture-does-not-scale-to-matrix-dimensions.html

VolumeAssetBuilder

Where is the VolumeAssetBuilder? I can't find it. I need to use it, or instructions on how to create the 3D Volume

release

please put untypackage into release package

WEBGL Issue

doesn't work on webgl pltform , anybody got a solution ?

Creation of raw files (or better yet, the raw assets files)

If I create a 3d "model" - basically, a series of planes (or short cubes) which have textures on them, how do I get this in the .raw file? Or better yet, how do I get this into the .raw asset format needed for the 3d volume rendering app to work?

I have my own scans and would like to insert this as a model (instead of the head in your example).

What is the process for this? Thanks much!

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.