Skip to main content.
May 17th, 2005

Frequency domain’s dreams and normals’ tidying

Yesterday (Monday) night I dreamed that the World was reconfigured to work in frequency domain as opposed to time domain !!
This brought some changes. It all started with a centered white spot, plus some extra spots. A bit like when one visualizes an image that has been transformed with the FFT (Fast Fourier Transform).
It was mostly like seeing a cheap sci-fi movie. Not really interesting from a purely scientific point of view. Still, it was a clever dream to have in a sense 8)

I did more research about reading 3DS objects with faces being properly ordered.. and found out that I wasn’t doing anything wrong. The problem is that AutoCAD’s exported files have no sense of faces’ orientation. In order to render those objects properly, one has to render them with faces as having two sides.
That requires some extra rendering time, but also prevents from properly creating smooth vertex normals !
So, I wrote some code to fix the faces normals. The code works on the assumption that objects are closed. For each face, there must be a corresponding one that covers it. With that assumption and lots of ray-tracing activity, I can give the proper orientation to the faces. There are however a few exceptions 8(
Instead of trying to analyze the exceptions, I decided to manually fix those last few faces. The next step is to write an exporter to a common 3D object format (AC3D seems good), so that I can import the processed objects in Blender, modify the faces’ orientation by hand and then export the final objects. Hopefully by tomorrow I can finish that (yeah, right !).

More things to do: continue my mother’s website. I’ve been looking around for a simple BBS script, and it seems that only Japanese care to make simple BBS scripts. I’m planning to download one of those and adapt it to English/Italian.

Finally, I’ll also need to complete the first release of the video-chat app. Dind’t do any work in that sense. Although today I read some docs about neural networks applied to image compression. Interesting stuff, but I don’t know enough about neural networks to even start experimenting.. plus, that’s definitely a distraction, something diametrically opposed to the goal of releasing a working program 8)

Posted by Davide Pasca in Programming, 3D Graphics

This entry was posted on Tuesday, May 17th, 2005 at 2:38 am and is filed under Programming, 3D Graphics. You can follow any responses to this entry through the comments RSS 2.0 feed. You can leave a response, or trackback from your own site.

8 Responses to “Frequency domain’s dreams and normals’ tidying”

  1. Rince says:

    Sounds like a lot of effort to create a useful 3d model. What do you need it for anyway?

  2. Davide Pasca says:

    I wanted to have a scene where I can walk around.
    It’s a lot of effort, but I like the idea to work on somethign that was created with AutoCAD. I like the idea to find an interface to the world of architecture, especially considering that both my sister and my father are involved with it.
    Anyhow, lots more efforts were done today.. but that’s for another post 8)

  3. Rince says:

    Hmm how complex is the scene? Does it have a lot of curved surfaces?

  4. Davide Pasca says:

    As you can see here, it’s about 120,000 vertices. They are not evenly distributed. Some parts have incredible detail (so much to create aliasing with geometry), some parts are built with very large polys (see the one selected on the floor).
    Also the vertex count is bound to grow, as I will implement Gouraud shading. There are going to be some dicontinuities created by those faces that shouldn’t share vertices’ normals.
    The green lines are face normals, the red lines are the “anti-normals”.

  5. rince says:

    Aaahhh a picture is worth a thousand words!!!!


    That church looks like it will stress out any triangle stripping algorithm!!!

  6. Davide Pasca says:

    It’s also going to stress me in trying to build smooth surfaces. The simple N^2 (every triangle with every triangle) solution takes too much time !
    I’ll have to build an edge list, etc, etc.

  7. Rince says:

    I just thought of it, but how about ‘brute force’ approach?

    Draw the church from a number of random points, zbuffered.

    Store the front/back facing flag in the alpha channel, and the index of the triangle in rgb, then analyze pixels in the frame buffer and flip the normal of all the backfacing triangles?

  8. Davide Pasca says:

    Ahhhh.. I thought about that !
    In the end, it’s about not having to see the “backfaces”. However it’s a tricky one. Brute force could have to be really brute. It’s not easy to make something reliabe from the concept of placing a camera from every possible location and every possible orientation. To have a reliable result, it may have to be very many locations and orientations.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>