WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-25-2008, 10:03 AM
aznan aznan is offline
Member
 
Join Date: Apr 2008
Posts: 11
Same texture, but different..

I want to have a model with one texture that can be swapped with another using model.texture("new_tex.jpg"). When swapping back I noticed that the new "first" texture was much darker than the original.

I have attached a scene with two cubes which demonstrates the problem.

What is happening?
Attached Files
File Type: zip die.zip (2.0 KB, 349 views)
Reply With Quote
  #2  
Old 04-28-2008, 10:39 AM
aznan aznan is offline
Member
 
Join Date: Apr 2008
Posts: 11
I tried adding a cube without any textures, thinking maybe the original texture blended with the new original, but then it turned completely black. I also tried playing around with model.appearance() and texblend, but to no avail.

Doesn't anyone have a clue as to what is going on?
Reply With Quote
  #3  
Old 04-28-2008, 10:51 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The cube uses negative values for the texture coordinates. This means you need to enable wrapping on the texture. Try using the following code when adding the texture:
Code:
tex = viz.addTexture("red2.gif",wrap=viz.REPEAT)
Vizards default wrap mode is viz.CLAMP_TO_EDGE, which does not allow for texture coordinates outside the range of [0,1].
Reply With Quote
  #4  
Old 04-29-2008, 02:29 AM
aznan aznan is offline
Member
 
Join Date: Apr 2008
Posts: 11
Yup, that was it. Thanks a bunch!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
3D Texture Mapping in Vizard? stefs Vizard 2 03-25-2008 03:34 AM
missing parts of head texture sjp Vizard 4 10-10-2006 01:10 PM
how I can get my texture to appear exactly as is defined mspusch Vizard 1 04-23-2005 12:12 PM
avatar head texture issues rconrey Vizard 3 11-17-2004 04:05 PM
How to simply texture an avatar's head with a jpeg graphic? vr_boyko Vizard 3 10-26-2004 10:44 AM


All times are GMT -7. The time now is 08:01 AM.


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