Wednesday, February 4, 2009

To Italy and back

Yesterday I got back from a week vacation in Rome.
Meeting parents, meeting friends, lots of food.. very hard time digesting everything !!

I did write some code for RibTools in the meantime, trying to add polys..  the REYES ways: polygons are converted into bilinear patches (basically, quads) and triangles are no-good 8)
This conversion is called "split". A split operation will turn more complex primitives into simpler ones, eligible for "dicing".

I also read more about the this "dice" stage. It's where simpler primitives are converted to a 2D array of vertices (kind of like rasterizing a primitive withing its own 2D bounds). This is called "grid".

Then one is supposed to move from the grid to independent micro-polygons.. each micro polygon is build from adjacent vertices from the grid.

..anyhow, it's 4:28 AM... zzzzzzzzzzzzzzz

11 comments:

  1. hhmm i think a definition of a polygon is that all its vertices are co-planar.

    then whats the advantage of splitting it up?

    ReplyDelete
  2. For one thing, current 3D hardware generally renders one triangle at the time.
    Any API that allows for a polygon internally will split into triangles.. so that's a common concept.

    REYES does this at a more generic level: polygons with holes, bicubic surfaces and quadrics also get split, or simplified into quads and maybe smaller bicubic patches (not sure about alternative base primitives).

    At that point dicing becomes simpler (a splitter may approximate quadrics with curved surfaces, so that no specialized dicing is required for quadrics).

    Dicing produces a grid and a grid produces micro polygons. At this point the original primitives are lost and one ends up with a bunch of micro-polys that can all be displaced, shaded, blurred and sampled into pixels (with anti-aliasing quality depending on how small are micro-polygons in respect to a pixel).

    ReplyDelete
  3. >polygons are converted into bilinear patches (basically, quads) and triangles are no-good 8)


    >Any API that allows for a polygon internally will split into triangles.. so that's a common concept.

    So, are you splitting into triangles or not? =)

    Anyway I understand that if your source data is already in the form of bicubic surfaces then to satisfy the HW you will have to convert it into triangles.

    What I dont understand is if you already have a polygon why do you want to convert it into a bicubic surface? Seems like if something is planar then it wont benefit from bicubic representation?

    ReplyDelete
  4. Aaahh, I see you said bilinear, not bicubic, my mistake!!!!

    ReplyDelete
  5. ..also about triangles, that's only if one wants to minimize the number of divisions when rasterizing.. but I never liked that approach !

    ReplyDelete
  6. Ma che ce frega de li triangoli, facce vede' er cibbo... :)

    (Who gives a shit about triangles, show us the food)

    ReplyDelete
  7. That's actually a rendering made with my new renderer 8)

    ReplyDelete
  8. Cool!!!


    BTW speaking of renderers, I finally found a solution to my PS3 Linux programming project.

    Instead of fighting with Samba to make a Linux share, I mounted a shared Windows drive from Linux. That was very easy.

    gcc doesn't have any issues building from a network share, so I do all my source editing in Visual Studio on the PC, do a 'save all' and then build and debug with Eclipse running on PS3 via a VNC connection.

    One problem is that I get some timestamp related warnings from gcc, probably because the PC clock is not in sync with the PS3 clock, but everything seems to work fine.

    ReplyDelete
  9. Paul.. I guess you cannot simply just do everything on PC like with a prefessional devkit ? 8)

    ReplyDelete
  10. Kaz, I think its possible to cross compile if you are running Linux on the PC.

    http://www.cellperformance.com/articles/2006/11/crosscompiling_for_ps3_linux.html

    ReplyDelete