Draw Edges in X3DOM

297 views Asked by At

In my project, I load x3d files in an inline tag to render them in a web browser with X3DOM.

The x3d files are made via Catia, in which we can see the edges between vertices.

After the export, the edges are not drawn anymore and I would like them to be.

Is there any option, or a way to draw them ? aesthetics matter...

1

There are 1 answers

1
Daly Realism On

X3D/X3DOM by default uses assumes that vertex edges are part of the approximation of the digital model to the physical object. This is done through the 'creaseAngle' parameter on some nodes (e.g., IndexFaceSet) and the lighting equations (defined at http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#Lightingequations).

Initially, I would make sure that creaseAngle is set to 0 for any nodes where you want to see the edge. This will not highlight the edges, but they will be more visible. If that level of visibility is insufficient, then you will need to write a shader (OpenGL code) to produce the desired effect.

There is an example of shader code at http://examples.x3dom.org/example/x3dom_composedShader.xhtml; through this is probably not the shader you are looking for.