![]() |
|
#1
|
|||
|
|||
|
I couldn't find a ton of documentation in the help files on loading 3D textures.
I am interested in loading a series of 2D images into a 3D texture. From what I read, the <multimedia:image>.load method should allow me to build a 3d texture. I am trying to use a series of 2d pngs and turn them into a 3d texture for my shader to access. I have everything setup, the problem is when I try and use 'load' I get the following error: ** ERROR: 'BodyScans\FullBodyThresholded\002.png' cannot be loaded into depth 1 of 3D texture. Valid range is 0-0 I get this error for every image I load. How do I setup the valid range for a texture? I tried making a 'blanktexture' and manually state I wanted a set number of depth images, but I still got the same error. Here is my load method: Code:
def loadImages(self, dir): files = os.listdir(dir) for num, f in enumerate(files): if f[-3:] == 'png': print f if self.texture3D == None: self.texture3D = viz.addTexture(dir + f, type = viz.TEX_3D) self.texture3D.load(dir + f, face = num) self.texture3D.compression(viz.COMPRESSION_ARB) self.texture3D.hint(viz.PRELOAD_HINT) George |
| Tags |
| viz.tex_3d |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to render a texture of the transparent object and then blur it | whj | Vizard | 1 | 09-25-2012 04:15 PM |
| Avatar texture swaping | sleiN13 | Vizard | 5 | 06-24-2011 01:48 AM |
| How to apply shader and render texture to an object | whj | Vizard | 0 | 04-23-2010 01:23 PM |
| Randomly and Continuously Change Avatar's Face Texture | Karla | Vizard | 4 | 08-22-2008 01:14 PM |
| how I can get my texture to appear exactly as is defined | mspusch | Vizard | 1 | 04-23-2005 01:12 PM |