Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by metervara · Jul 08, 2010 at 08:55 AM · texture3d

3d textures possible? (cg sampler3D type)

Is it possible to create 3d textures in unity somehow? Or just import them as assets and use them in cg?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image metervara · Jul 08, 2010 at 10:53 AM 0
Share

Looks like shaderLab accepts 3D type in it properties, so this '_VolumeTexture ("3d tex", 3D) = "white" {}' compiles and shows type as Volume in the inspector. I should be able to pass a 3d texture to my shader, but I still have the problem of creating it...

avatar image femi · Sep 22, 2011 at 11:26 AM 0
Share

I tried to declare a property _VolumeTexture ("3d tex", 3D) = "white" {} but unity (3.4.0) reports Null pointer exception whenever material with this property is to be shown by the inspector. Is this (undocumented) feature broken these days?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Noise crime · Jul 09, 2010 at 12:49 AM

Guess you could try exporting your 3D texture to dds format, though there appears to be some confusion as to what Unity supports with regard to dds.

As to how, nVidia have a number of tools, one of which is dds file support for Photoshop, which although supports volume textures, the documentation doesn't actually tell you how to make them. Maybe its as simple as using multiple layers?

If that fails then there are many other tools from nVidia, so might be worth checking them out.

However my first step would be to source a 3d dds from someone online and test that in Unity to check that it can be used.

edit: according to old forum threads the expected format is

The plugin used to want a horizontal image containing each slice side-by-side, arranged left to right, top slice to bottom slice.

Edit2: I'm also wondering whether

a. You could provide a 2D texture in Unity, but let it be treated as 3D? I'm assuming here that you can layout the 2D texture to match the expected format that 3D texture would follow, though you'll be restricted to non-compressed formats. Depends if a 3d texture in memory is simply one slice after another, then perhaps a vertical 2d texture say 32x1024 would be 32x32x32 3d texture. Thought this is a long shot

b. Doesn't Unity have some linkage to opengl? Perhaps you could lever that to create the 3d texture?

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image metervara · Jul 09, 2010 at 12:38 PM 0
Share

Thanks. 3D texture dds files are not recognized by the unity asset importer ($$anonymous$$ dds pixel format) so no luck there. The GL class has a limited API, no texture creation. I'll look at 'tricking' unity with a 2D texture with 3D layout, and hope that it somehow can work.

avatar image Julien-Lynge · Nov 13, 2011 at 03:47 AM 0
Share

FYI, there's now a request on the Unity wishlist to support 3D textures: http://feedback.unity3d.com/forums/15792-unity/suggestions/2385588-support-for-volumetric-shaders

avatar image
0

Answer by Alex Hogan · Oct 25, 2010 at 08:08 PM

I'm not sure how to load them in Unity, but the Photoshop plugin from NVidia does not seem to create volume textures - at least not correctly - at least not as far as I've been able to tell.

Try using the DirectX texture tool - it is part of the DirectX SDK. Google can show you the download link.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Making Unity textures/materials look as good as they did in Blender 2 Answers

Everything is invisible!,Everything turned invisible! 1 Answer

Editor Can't Able to Import 3D Model Textures 1 Answer

Imported model textures are solid colour 0 Answers

how to make gameobjects look clearer and less blurry when looking at them from farther away? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges