Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

EDIT For now, I'm going to accept Brett's answer. It's a way to get transparency back by having 3D calculations done in software instead of hardware. It addresses the symptoms but not the causes. As I wrote above, my PC and graphics card are provably able to do it, but there's something in the interaction with MMA that disables it after restarts. Anyone who solves this gets the Accept check.


Edit I got conformations from several users with the following hardware:

  • Simon Woods: Windows 7 64 bit, with an NVidia GTX 550 Ti graphics card.
  • texasAUtiger: Windows 7, 64 bit on Intel on Intel iCore i7-2760QM 2.4 ghz, NVidia NVS 4200M graphics card

I have this problem where several of the examples in the doc page of Texture don't work.

data = Table[{1, 0, 0, a}, {u, 0, 1, 1/100}, {a, 0, 1, 1/100}];

vtc = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
coords = {{{0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}}, {{0, 0, 
     0}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}, {{1, 0, 0}, {1, 1, 0}, {1, 
     1, 1}, {1, 0, 1}}, {{1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {1, 1, 
     1}}, {{0, 1, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1}}, {{0, 0, 
     1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}}};

Graphics3D[{Texture[data], 
  Polygon[coords, VertexTextureCoordinates -> Table[vtc, {6}]]}, 
 Lighting -> "Neutral", Boxed -> False]

is supposed to give:

Mathematica graphics

but I get this:

Mathematica graphics

data1 = Table[{1, 2/3, 0, If[u^2 + v^2 < 1/2, 0, 1]}, {u, -1, 1, 
    1/100}, {v, -1, 1, 1/100}];
data2 = Table[{0, 0, 1, If[u^2 + v^2 < 1/2, 0, 1]}, {u, -1, 1, 
    1/100}, {v, -1, 1, 1/100}];

Additionally,

Graphics3D[{FaceForm[Texture[data1], Texture[data2]], 
  Polygon[coords, VertexTextureCoordinates -> Table[vtc, {6}]]}, 
 Lighting -> "Neutral", Boxed -> False]

should yield:

Mathematica graphics

but I get the empty cube again.

Then there's the example in the Scope>Texture styling section of the doc page which is supposed to result in:

enter image description here

In my case I get:

Mathematica graphics.

This is not a general transparency issue as

Plot3D[x^4 + y^4 - 5 x^2*y^2, {x, -3, 3}, {y, -3, 3}, 
 PlotStyle -> Opacity[0.8], Mesh -> None]

gives me this:

Mathematica graphics

I'm using a 1 year old Dell XPS-15 (model L501 X)Running Windows 7-64 with an nVidia GeForce GT 435M graphics card, driver version 8.17.12.6639.

I reported this earlier on Mathgroup and got the advice to update my drivers which I did and it sure helped. However this is not the end of the story as the behavior returned soon afterwards.

I have updated the driver various times using both nVidia's and Dell's newest version and it always was a short-lived solution. Last time I tested it, I installed the same version of the driver over the existing one and the transparent textures showed up as intended in my notebook even without re-executing the code, only to disappear after MMA's next restart.

So, apparently my system is able to handle transparent textures but there is some interaction between MMA and the driver that causes this ability to be switched off.

Update

This issue seems to have been resolved in Mathematica 9. All of the above mentioned problems did not reappear when I tested them in the trial version of V9.

share|improve this question
    
I'm curious to know if this issue has been fixed in version 9? –  Simon Woods Dec 5 '12 at 10:51
    
@SimonWoods It works for me now. And for you? –  Sjoerd C. de Vries Dec 5 '12 at 13:50
    
I had this problem in V8. It is fixed for me in V9. –  david Dec 5 '12 at 14:50
add comment

1 Answer 1

up vote 18 down vote accepted

Go into the option inspector, and try the different settings for Graphics Options > RenderingOptions > "Graphics3DRenderingEngine and see if that has any effect.

Edit This option can be set on a per-graphic basis, say by using Style:

AbsoluteTiming[
   Rasterize[
    Style[Graphics3D[{Opacity[0.1], 
       Sphere[{0, 0, 0}, #] & /@ Range[20]}, ImageSize -> 200], 
     RenderingOptions -> {"Graphics3DRenderingEngine" -> #}]]] & /@
{"BSPTree", "HardwareDepthBuffer"}

Mathematica graphics

share|improve this answer
    
Thanks! The BSPTree option seems to work. Is that a software solution? That is, does it cause software rendering or is this just a setting of the graphics card? The cube with holes is dead slow; so slow even that it apparently causes some kind of time-out. Other mma windows pop-up from behind its window when I drag the cube around a bit. And why would a fresh driver installation work temporarily? –  Sjoerd C. de Vries Jan 18 '12 at 20:45
1  
BSPTree is software, and can be quite slow, but can also be much more accurate about rendering the scene than some of the other methods. I have no idea why installing drivers would have an effect. –  Brett Champion Jan 18 '12 at 20:57
    
Is it possible to Rasterize a graphic with a custom setting for this? Is the proper way copying the graphic to a hidden notebook, setting notebook-level options for the rendering engine, and then using Rasterize on the notebook? –  Szabolcs Jan 19 '12 at 10:40
    
@Szabolcs Yes. See the updated answer. –  Brett Champion Jan 21 '12 at 21:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.