Texture3D preview for Unity
Texture3D assets in Unity's Inspector window.
This package enables interactive previews ofYou can directly download the Unity package by clicking here or by going in the Release section
Texture3D asset
Previews and thumbnails ofWhen importing the Texture3D asset, Unity will automatically render a preview of the Texture3D to display in the Project window.
When selecting a Texture3D asset in the Project windows, Unity will display an preview of the Texture3D in the Inspector.
Texture3D field on a GameObject's component
Previews of aTo enable Texture3D field preview on a GameObject's component, add
[Texture3DPreview]
in front of the declared field.
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
- 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