Reputation: 372
I am building a set of 3D figures for online display (as supplementary material for a physics paper), and I am having some issues getting the transparency features to work.
Specifically, I have a set of surfaces built using the <IndexedFaceSet>
primitive, prefaced with a <Material>
element inside an <Appearance>
tag, which contains the transparency element:
<Shape>
<Appearance>
<Material diffuseColor='1. 0.5 0.'
specularColor='1. 1. 1.'
shininess='0.9'
transparency='0.5' />
</Appearance>
<IndexedFaceSet colorPerVertex='false'
normalPerVertex='true'
solid='false'
coordIndex='0 1 2 -1 3 4 5 -1 ...'
/>
However, when displayed within x3dom, the figure shows a jagged appearance with patchy behaviour:
From what I can tell, only some of the polygons in the <IndexedFaceSet>
are getting rendered in a way that accounts for the polygons behind them, but I can't be sure.
The plot is available to view here, and the x3d file was produced in Mathematica as described in this Mathematica Stack Exchange Q&A, with the transparency added in by hand. I don't know whether the issue is intrinsic to x3dom or to the x3d format -- I get the same in freeWRL and in view3dscene but the renderers there don't fill me with confidence either.
So:
I'm kinda lost as to how to approach this (I'm just a humble physicist trying to innovate in graphics formatting) and would be grateful for any pointers about how to approach this.
Upvotes: 2
Views: 133