top of page

[June 26th - July 2nd] Week 2 Report

This is a long ... week, 5 week days plus 2 weekends..So, it's supposed to be productive~

I will display my work in this pace (Also, this should be the uniform order for later report)

1. Solve tails in week 1

2. Complete plans made in week 1 report

3. Extra work or changes.

-----------------------------------

1. Solve tails in week 1:

1) Let nodeshapeFactory supports a list of textures for different nodes:

Given a NodeList, specify each node's shader program (use texture or not) and source of texture. Then we can flush a bunch of nodes in the same time using drawNodeList

2) Fix viewportDemo

Run viewportDemo.java, the 10 nodes will automatically draw on the inner frame. The frame is also scaleable and you can add more inner frames(windows)

-------------------------------------------------------

2. Complete plans made in week 1 report

According to next week plans on week 1 reports:

1.) Enhance nodes to support depth culling

I add z coordinate to these 2d components and use opengl depth culling to implement face culling. The default z order is 0, therefore, when culling take place, the order of nodes depends on the drawing order(Node list order). We inverse the overlapping relationship by manually changing z order of nodes.

2) Move nodes samples into viewport, which supports camera

Instead of supporting camera in viewport, I ....remove it! All camera may actually do is control view of viewport. For example, there are 7 basic operations for camera but for 2d things become easier: pan, rotate, zoom(Can propose more? ) and all of this could be controlled by viewMatrix of the canvas.

So once viewport settled, a region can be stored to a offline texture and be manipulated as canvas.

3). Figure out relationship between nodes and icons, also , how labels work for nodes.

I didn't work with icon this week.. but as pace of NODE + EDGE , looked for solutions for labels(see last blog).

Now, we can add label to nodes and by default, the z order for label is higher than nodes.So it will appear on the top of node.

-------------------------------------------------------------

3. Extra work or changes.

1) RenderToTexture and Anti Aliasing RenderToTexture.

RenderToTexture is a technique of offline rendering. For example, we create a network with thousands of nodes and it takes a long time to draw on screen.

Then offline rendering should be applied, in the first pass, we draw nodes on a texture. The texture will not change until the contends change. This will save lots of resource.

Anti-aliasing render to texture is a multi-sampling scheme to get much clear view of texture.

I applied this scheme in the following-

1. debugDraw nodes

2.viewport manipulation ,view change

3. label

4.(Potential)

2) Start to work on Arrow components

Arrow is a part of edge. Like node shapes, previous version use awt draw while we want it compatible with gl4.

Now I built the basic framework and more kinds of shapes could be defined easily in this way.

An interesting fact is that, it easy to draw contour of shape without specifying the triangle order(without elements), but to draw a filled shape, then tessellation must be applied.

This gives an idea of customized shape, I will work on it later.

------------------------------------

Next week:

1. Decide label solution, maybe work on it.

2. Finish arrow factory and line. Wrap them to edge component.

3. Customize node

bottom of page