Same texture, but different..
1 Attachment(s)
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? |
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? |
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) |
Yup, that was it. Thanks a bunch!
|
All times are GMT -7. The time now is 08:27 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC