![]() |
|
|
|
#1
|
|||
|
|||
|
#Edit - Still get the same problem on a Quadro 6000 with JPG or PNG
Unfortunately, I am still running into the same error, even when I copy and paste in your code. I made a small subset of jpg images to see if there was a problem with the png format, and I still encounter the following error. ** ERROR: 'BodyScans/Test/3.jpg' cannot be loaded into depth 1 of 3D texture. Valid range is 0-0 ** ERROR: 'BodyScans/Test/4.jpg' cannot be loaded into depth 2 of 3D texture. Valid range is 0-0 ** ERROR: 'BodyScans/Test/5.jpg' cannot be loaded into depth 3 of 3D texture. Valid range is 0-0 ** ERROR: 'BodyScans/Test/6.jpg' cannot be loaded into depth 4 of 3D texture. Valid range is 0-0 Do you happen to know what the error is exactly referring to for the 0-0 range? I end up just having the first texture applied to the object. I am developing on a laptop using an NVIDIA GTX 675M. Are 3D Textures not be supported on these cards? Couldn't find any documentation only I'll give it a shot on a Quadro in a few minutes. Thank you, George Last edited by shivanangel; 01-25-2013 at 11:33 AM. Reason: Update |
|
#2
|
|||
|
|||
|
Can you post the copy/pasted code you are running? Your original code sample was not using viz.addBlankTexture to create the 3D texture and specify the depth dimension.
|
|
#3
|
|||
|
|||
|
I am now using your code and I still get the same error.
Only difference is I change the images being used to a different directory. Code:
import viz viz.go() #Create list of 2D images that will make up 3D texture files = [ 'BodyScans/Test/'+ str(i+1) + '.jpg' for i in range(1,6) ] #Create blank 3D texture tex = viz.addBlankTexture([512,512,len(files)],viz.TEX_3D, minFilter=viz.LINEAR_MIPMAP_LINEAR) #Load each image into 3D texture for i,f in enumerate(files): tex.load(f,i) #Apply texture to quad quad = viz.addTexQuad(pos=(0,1.8,2),texture=tex) #Create slider to change z texture coordinate of quad slider = viz.addSlider(pos=(0.5,0.1,0)) def SetDepth(pos): m = viz.Matrix.translate(0,0,pos) quad.texmat(m) vizact.onslider(slider,SetDepth) viz.startlayer(viz.QUADS) #Lower left viz.texcoord(0,0,0) viz.vertex(0.4,0.01,0) #Upper left viz.texcoord(1,0,0) viz.vertex(0.4,0.05,0) #Upper right viz.texcoord(1,0,1) viz.vertex(0.6,0.05,0) #Lower right viz.texcoord(0,0,1) viz.vertex(0.6,0.01,0) otf = viz.endlayer(parent=viz.SCREEN,texture=tex) |
|
#4
|
|||
|
|||
|
What version of Vizard are you using? And to be clear, do you get any errors if you run the original script I posted, without any changes?
|
|
#5
|
|||
|
|||
|
I'm running 4.06.0138
I get no errors with your code. |
|
#6
|
|||
|
|||
|
Can you run the following script and post the entire output?
Code:
import viz viz.go() #Create list of 2D images that will make up 3D texture files = [ 'BodyScans/Test/'+ str(i+1) + '.jpg' for i in range(1,6) ] #Create blank 3D texture tex = viz.addBlankTexture([512,512,len(files)],viz.TEX_3D) print tex.getSize() #Load each image into 3D texture for i,f in enumerate(files): tex.load(f,i) |
![]() |
| 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 |