WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-24-2013, 06:38 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Question Loading a 3D Texture

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)
Thanks,
George
Reply With Quote
 

Tags
viz.tex_3d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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 03:15 PM
Avatar texture swaping sleiN13 Vizard 5 06-24-2011 12:48 AM
How to apply shader and render texture to an object whj Vizard 0 04-23-2010 12:23 PM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 12:14 PM
how I can get my texture to appear exactly as is defined mspusch Vizard 1 04-23-2005 12:12 PM


All times are GMT -7. The time now is 12:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC