Sunday, April 13, 2014

X3DOM - Day 2

X3DOM


%-------------------------------------------------------------------------------

Goal : Multi-channel visualization based on the X3DOM

Todo :

  1. Study
  • How to apply shader for edge blending and warping? 
  • (Added)How to apply render texture?
  • How to manipulate camera projection matrix on X3DOM?
  • How to synchronize variables using js?
    2. Design
  • Web-based system
  • What will be the main difference with multi-channel visualization using Unity3D?
  • Connect-and-play?
    3. Implementation
  • TBA...
%-------------------------------------------------------------------------------

  • (Added)How to apply render texture?

- See THIS EXAMPLE.

- By using <renderedTexture> node(But not described in THIS PAGE. Why?)

- Camera(=<viewpoint>) is referred in the <renderedTexture> node.

- Also, <group> node, which contains contents of the scene, has to be referred.
If not, the rendered texture is mixed up with the background(?) scene like below, as well as the viewpoint setting.



- Next, the <composedShader> from the last posting is used to render the image from the camera.

- We can separate the vertex shader and fragment shader for the independent use.

  1. Vertex Shader --> setting the viewport of the rendering result.
  2. Fragment Shader --> edge blending fct.

- And...HERE is my result.


The scene composed with a red box and a camera.

The left side shows the rendered texture image with edge blending shader.
(you can see the attenuation at both ends like the result in DAY1.)

The right side shows the rendered texture image with default fragment shader.


※ All of my web pages showing results are available only when I'm running my web-server.

%------------------------------------------------------------------------------

Additional Resources

No comments:

Post a Comment