Author: Nako

Weekly Report 01/18

This week, I’ve been spending most of my time working and drawing. But I feel less tired than last week. After sorting out the specifications in my work, I will finally reach the first user test. Thanks to my engineering notes, I can focus on the problem working on, not on other tasks.

I spend about 4 hours a day for drawing. I compare my drawings every day, and it getting closer to the image in my mind. Sometimes it even exceeds. Hyperfocus is a good tendency for me.
I’ll just need some medicine for eye strain.

Right now, my room is full of cardboard boxes.
My mother sent me a package with clothes, blankets, vitamin B pills, food, and cookies. I ate all the cookies in incredible speed, leaving only a crumb. And I got 10 kg of rice with the hometown tax program “Furusato Nozei”, even though it’s not actually my hometown.
I also got a souvenir from Turkey. I’m going to use it for a special purpose.

This week, for some reason, I’ve been thinking about my best friend from time to time. She loves stories like me, and is someone associated with my passion for creative work and creations. What is she interested in now?

Plans for next week

Continue to draw the story. Control hyperfocus correctly to use for work and creation.
I would like to move this daily report to the another blog because here is a technical blog
I need to find a special gift for a friend who is getting married in March. It’s not déjà vu, but I’ve been wondering for the last week.
Have a Hypnosis mic fan-meeting live viewing party with my sister. Along with good food!

Long term goal

  • Improve my engineering skills and be able to commit to projects.
  • Enjoy creativity including development.
  • Gain confidence by creating my own work.
  • Think about what I would like to do in my life.

Weekly Report 01/11

This week was my first job of the new year. It was more tired than expected. The definition of the specifications is complex problem because of the ambiguous requirements from the users. (Of course, it’s natural since the users don’t know how it would be.) The steps need to be interspersed with user testing.

I spend more than 80% of my free time on drawing. I have started a medium-length series of fan art. Sometimes I feel brain fatigue.

When I create something, whether it’s a program or a picture, I get frustrated by the gap between my ideal speed and quality and the reality. I think the way to get out of a slump is to always look only at “now” and “the present situation. Any sentimentality is not necessary in my life.

I couldn’t even read books so much time. It’s not efficient to take a long time off while learning something. I want to suppress my impulses to properly allocate my time in the day.

Cooking and eating are my healing time these days. Nothing complicated. I like to eat while watching my favorite dramas or Youtube.
By the way, I applied for the stage greeting for ”Kodoku no Gourmet, Gourmet of Solitude”. I hope I get it.

Plans for next week

Continue to draw stories, but also set aside time to read books and study for software engineering. Don’t be too stoic for both.
In my work, I will get the small tasks done first and tackle the difficult problems.
And I need to find a special gift for a friend who will have a wedding ceremony in March.
I will receive a courier from my mother filled with candy, fruit and a blanket.

Long term goal

  • Improve my engineering skills and be able to commit to projects.
  • Enjoy creativity including development.
  • Gain confidence by creating my own work.
  • Think about what I would like to do in my life.

Weekly Report 01/04

The biggest news this week is that I went back home and celebrated the New Year with my family. My concerns about a healthy souvenir for my father were addressed by pumpkin bagels. The pumpkin specialty shop is a wonderful store.

The New Year holidays were the same as usual. On New Year’s Eve, my sister and I packed Osechi in tiered boxes (just 2 layer). We are professionals at that. And on New Year’s Day, we went to a shrine and a temple and my grandmother’s house.

I watched “Kodoku no Gourmet, English Title: Solitary Gourmet” many times and it taught me the pleasure of eating what I like, the way I like. I want to draw a story that just tells “how to enjoy something”. I got an idea while I was at a nearby shrine. I think this town is suitable for expressing people who enjoy something at their own pace.

My software engineering studies are going well. I started reading a book called “The Pragmatic Programmer: From Journeyman to Master” and have finished about 50% of it. I’m going to try engineering notes this year. And I need to read it repeatedly, not just once.

The first good news of the year is that I got a Norman Rockwell calendar. The pictures are selected from the Saturday Evening Post. I love his realistic but dramatic drawings. That’s how a drawing of people should be.

Plans for next week

I would like to finish reading the book above. I need to improve my work efficiency. One idea is an engineering notes. I’ll give my coworkers some quail egg cookies from my hometown.

And I’ll start drawing a medium-length comic with 5 or more chapters.

I don’t forget the indie game under development but it’s pending now.

Long term goal

  • Improve my engineering skills and be able to commit to projects.
  • Enjoy creativity including development.
  • Gain confidence by creating my own work.
  • Think about what I would like to do in my life.

Weekly Report 12/28

I’ve completed about 80% of my year-end cleaning. What I didn’t expect was that I dedicated my christmas to getting ranking bonuses for mobile games. This was the biggest reason my plans were derailed.

My software engineering studies are going well. I started from this book, which has many principles, such as the 7 Design Principles and UNIX Culture and Philosophy.

And this year’s work has completed. This week I worked on 2D geometric problems in UI implementation and realized that I like solving mathematical problems in software development. This could be a reason why I’m suited to working as a software engineer in CG animation.
The end-of-year all-hands meeting was a great time! I met people who started working at the same time as me. I would like to talk to more people without feeling nervous. Also, should be more polite and friendly.

I met my sister and watched the Hypnosis Mic fan meeting live show with her. I’m looking forward to seeing the new movie in February. And the MV seems great cell-look animation. I’m interested in how to get rid of the unnatural movements of the clothes, hair, mouth and so on. Is this result due to more time and effort, or some new technique?

Plans for next week

I’m going back to my hometown. I need to get 90% of my end-of-year cleaning done by then. I’ve given up on finishing it completely!
I’ll look for some healthy souvenirs for my father, who is concerned about his fat intake.
All that’s left now is to spend New Year’s with my family.

Weekly Report 12/21

Recently I am interested in software engineering and drawing.

About Software Engineering

We have a weekly meeting where we are expected to give our opinions on improving software design.
Although I majored in computer science in the university, it is very different from software engineering, which is less mathematical and theoretical but more practical. It is finally time for me to study software engineering in depth! (too late!)
So, I started by reading famous books such as:

“Design Patterns: Elements of Reusable Object-Oriented Software”
“The Pragmatic Programmer: From Journeyman to Master”

While I know that reading these books in English will improve my English level, I bought the Japanese version. It is more important to shorten the study time.

About Drawing

Drawing frees me. A breakup gave me more than enough stress and learn in the past month. I needed to think about my future and what I desire for my life. And I realized that looking at paintings in museums and drawing pictures and cartoons reduces stress and comforts me. This is not something that just started recently, it’s been the same since I was a child.

I have a habit of imagining what others want and trying to fit in, and I’m excessively afraid of hurting their feelings, so it’s hard for them to understand me. Art and stories are the only way I can express myself without any restrictions. I I decided to devote myself to this until I felt satisfied and confident in myself.

Other little things: I’m thinking about orthodontics again.

Next week plan

At the top of my to-do list is a year-end cleanup. I even take a day off on Christmas Eve to do it!
My company’s end-of-year all-hands meeting is going to be a great time. I need to send a Christmas cards for my friend and my grandmother. And of course I will read books mentioned above.

How to embed HTML into a web page without using “iframe

While coding my personal website, I ran into a problem: I want to create a modal window with an “iframe” tag, but Google Translate does not support text in the iframe. So I tried to embed another HTML file in index.html with JavaScript or PHP.

GOAL

The goal today is to embed sub.html in index.html without using iframe tags so that Google Translate will work for the embedded text.

Below is how to embed the code in an iframe tag.

<iframe src="sub.html"></iframe>

Environment

PHP8.3.8
Latest Google Chrome (Version 127.0.6533.90)

Method

Method1: Using php include function

<?php include 'sub.html'; ?>
//<?php include('sub.html'); ?> also works

Change index.html into index.php to use PHP function in index file.
Or you can use html as PHP by using “AddType” in .htaccess. Reference: Parse HTML as PHP using HTACCESS File

Method2: JQuery .load() in JavaScript

<div id="frame-content"></div>

<!-- need to read jQuery -->
<script src="jquery.min.js"></script>

<script>
    $("#frame-content").load('sub.html');
</script>

Trouble Shooting

Opening index.html in a local environment causes a CROS policy error as below. For correct results, we must use a web server or a local HTTP server.

Access to XMLHttpRequest at 'file:///C:/.../sub.html' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

Reference: How do you set up a local testing server?

How to Bake Normal Map in Blender

GOAL

Today’s goal is to bake normal, i.e., generate a normal map from an uneven mesh in Blender.

In my case, I baked normal map from high-level model and apply it into the low-level model as below.

Environment

Blender2.83(LTS)
Windows 10

Method

First generate add image to bake normal. You can create an Image from Shader Editor or Image Editor. And select the added image on the Shader Editor.

Open “Bake” tab from Cycles Render Properties and click “Bake” button. You can choose either “Tangent” space or “Object” space you like.

Then save the baked image from Image Editor.

Result

Apply result image as a normal map. For example, we can connect nodes as below in the cycle renderer.

Shader Editor

The following is rendered result. It looks well.

A strange thickness of faces in Blender

This is trouble shooting in Blender. Actually it was a foolish mistake…

Problem

I found a strange thickness in my model in Blender. Though this is only one surface, it looks like a cube with thickness.

Cause and Solution

In my case, I’ve added “Solidify” modifier by mistake before.
So the solution was to check modifiers and remove unused one.

A non-hierarchical procedure for re-synthesis of complex textures

I’ve read “A non-hierarchical procedure for re-synthesis of complex textures“. REFERENCE: Image Texture Tools: Texture Synthesis, Texture Transfer, and Plausible Restoration.

Texture re-synthesis

In this paper, texture re-synthesis means the name of the technique to generate output texture with a similar pattern to the one of input image.

Novelty of the study

This work propose a method for synthesizing an image with the same texture as a given input image. In this method, a plausible value for dot in output image is selected from input image. Important point is the order to select dot to transfers complex features of the input image to the output image.

Method

overview

Select pixels in output image and set a value from pixels in input image. Pixel value estimation depends on entropy, amounts of information, of pixels in the input image. To measure how closely a patch from the input image matched one from the output image, distance function below is used. In other word, the distance function indicates the plausibility of the selected pixel.

s: pixel from the input image
t: pixel from the output image
A, B: random function
Ωk: offset(the range of the patch)
K(u): Weighting given to a particular offset
I(s+u): rgb value of the pixel s+u
O(t+u): rgb value of the pixel t+u
  1. Find empty location in the output image with the highest priority.
  2. Choose a pixel from the input image to place in the location.
  3. Update priorities of empty neighboring location based on the new pixel value

Analysis of pixel interrelationships in the input image

To select important pixel with large amount of information, define the number of bits of information G(s, u). The prioritization weighting and the order of pixel addition can be decided by using this G(s, u). Refer the original paper to derive G(s, u) and weightings from RGB data of the input image.

Result

In this paper seven neighborhood of pixels was used. It takes 4.5 minutes and 6.5MB of memory to produce on a 8000Mhz Pentium2.

from “A non-hierarchical procedure for re-synthesis of complex textures”

You can see more result and application in the original paper.

About Laplacian Mesh Optimization

Today I’ve read the paper “Laplacian Mesh Optimization” by Andrew Nealen, Takeo Igarashi, Olga Sorkine, Marc Alexa.

Mesh optimization and Smoothing

Mesh optimization is the reduction of the number of vertices in an initial mesh of triangles without change in the shape. And smoothing is to smooth surface by averaging or removing vertices that is significantly different from other vertices in mesh. Smoothing is performed by subdivision, but the number of vertices is kept in this study.

Novelty of the study

This study introduce a framework for triangle shape optimization and feature preserving smoothing of triangular meshes that is guided by the vertex Laplacians.

Method

Laplacian matrix and Laplacian of vertex

Mesh Graph(V is vertices, E is edges): $$G =\{V, E\}$$

vertices: $$V =[v_1^T, v_2^T,…, v_n^T]^T$$ $$v_i =[v_{ix}, v_{iy},v_{iz}]$$

x, y, z element of vertices: $$V_d =[v_{1d}, v_{2d},…, v_{nd}]^T$$ $$d \in \{x, y, z\}$$

Laplacian of vertex: $$\delta_i =\sum_{\{i,j\} \in E}w_{ij}(v_i, v_j)$$

Weight w is defined below: $$\sum_{\{i,j\} \in E}w_{ij} = 1$$ $$w_{ij} =\frac{\omega_{ij}}{\sum_{\{i,j\} \in E}\omega_{ij}}$$ example for ω: $$\omega_{ij} = 1…(1) $$ $$\omega_{ij} = \cot \alpha + \cot \beta…(2)$$

(1) is uniform weight and (2) is cotangent weight. the angle α and β are defined as follows.

The element of n×n Laplacian Matrix L is define as follows:

x, y, z element of Laplacian: $$\Delta_d =[\delta_{1d}, \delta_{2d},…, \delta_{2d}]^T = LV_d$$ $$d \in \{x, y, z\}$$

the discrete mean curvature normal: $$\overline{\kappa_i}n_i = \delta_{i, c\overline{\kappa_i}}$$ the discrete mean curvature: $$\overline{\kappa_i}$$ the unit length surface normal $$n_i$$

Optimization algorithm

Displaced vertices: $$V’ =[{v’}_1^T, {v’}_2^T,…, {v’}_n^T]^T$$ $$v’_i =[v’_{ix}, v’_{iy},v’_{iz}]$$

x, y, z element of V’: $$V’_d =[v’_{1d}, v’_{2d},…, v’_{nd}]^T$$ $$d \in \{x, y, z\}$$

energy to minimize:

To solve the above problem, an equations of the form AV’_d = b is introduced.

1, Least squares meshes.

2, Detail preserving triangle shape optimization.

The displaced vertices are calculated by the following formula. $$V’_d =(A^TA)^{−1}A^Tb$$

Global triangle shape optimization

In this work, new general 2n×n system AV’_d = b is defined as follows.

W_p is positional weight that constraints vertex position. Larger weights in
W_p preserve the original geometry.

W_L: Laplacian weight that enforce regular triangle shapes and surface smoothness.

L is Laplacian matrix(uniform, cotangent or laplacian with discrete mean curvature ). And f is the corresponding right-hand side with the diagonal matrix W_L.

Application

Check the original paper to see examples of Shape optimization and Smoothing.