Code Monkey home page Code Monkey logo

therlessboy / texture3dpreview-for-unity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raphael-ernaelsten/texture3dpreview-for-unity

0.0 1.0 0.0 2.91 MB

This package enables interactive previews of Texture3D assets in Unity's Inspector window. You can directly download the Unity package in the Release section (https://github.com/raphael-ernaelsten/Texture3DPreview-for-Unity/releases)

License: MIT License

C# 89.76% ShaderLab 10.24%

texture3dpreview-for-unity's Introduction

Texture3D preview for Unity

This package enables interactive previews of Texture3D assets in Unity's Inspector window.

You can directly download the Unity package by clicking here or by going in the Release section


Previews and thumbnails of Texture3D asset

When importing the Texture3D asset, Unity will automatically render a preview of the Texture3D to display in the Project window.

Texture3D asset thumbnail

When selecting a Texture3D asset in the Project windows, Unity will display an preview of the Texture3D in the Inspector.

Texture3D asset preview


Previews of a Texture3D field on a GameObject's component

To enable Texture3D field preview on a GameObject's component, add

[Texture3DPreview]

in front of the declared field.

Texture3D field preview in Inspector


Requirements

  • Shader model 3 capable graphic card
  • Unity 2017.1+

TODO

  • Preview non uniform Texture3D in their respective ratio (currently all previews will be cube)
  • Add alpha blend mode for rendering previews

Know issues / limitations

  • Previews are currently in additive mode
  • Previews of multiples Texture3D assets don't work
  • Sometimes, the preview of a Texture3D field becomes empty

Contact

Feel free to contact me for any comment or suggestion. Twitter : @raphernaelsten


Acknowledgment

The sample Texture3D asset provided with this package was made using MRI scans found on this website.

Here's the process :

  • selected the right-to-left gif
  • rescaled it to 128x128 and extracted all the frames using VirtualDub
  • used Unity's VFX Toolbox Image Sequencer to resample the frames count and lay them on an images sheet Images sheet
  • used a custom tool to build a Texture3D (basically create a Texture3D with the correct size then copy the images from the sheet as slices) from this sheet and save it as an asset

texture3dpreview-for-unity's People

Contributors

raphael-ernaelsten avatar raphael-ernaelsten-heaj avatar

Watchers

James Cloos avatar

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.