Consolidate a group of 3D primitives

mfreakz's picture

We need a good way to import 3D object. Patchs are on the road... We need more 3D primitives in QC, but i think Patchs are on the road too...

My question is: Is there a way to "Consolidate" a group of 3D primitives in a new independent macro-Form, that fonction in QC like a new primitive ? I know about 3D Transform Patch or Macro Patch, but i would like to have new autonomous form, that works in GLSL Shader as a single object, that don't look so buggy ! When i build a form with QC's 3D primitives, the result is very dirty. There is artifacts between the primitives, even if they match correctly, and GLSL Shaders doesn't render all texture as a single object but map every primitive (and sometimes not all primitives !)... Do we need a new 3D Group Patch ? Is there a tricks ? When the new GL/GLSL tools will be release ?

PS: There is an exemple of my GLSL Scratchy rendering there:

PreviewAttachmentSize
Test 3D Group.qtz8.1 KB

cwright's picture
Let Z-Fighting Begin!

The pixel-wide artifacts where things join up are called "Z-fighting" -- it happens because the z-buffer (depth buffer) suffers from rounding, and polygons that occupy the same plane in space can get slightly different depth orders depending on the math used to place the points.

See attached composition for a simpler example.

This has been a problem for as long as finite-precision mathematics has been used to render computer graphics (forever, except for maybe in some slower-than-all-get-out college settings).

The solution to this is to make sure your surfaces aren't co-planar at all -- vary them a tiny tiny bit (1/100000th), and they'll usually render in a definite depth order.

Once that's taken care of, GLSL + texturing is your next problem. And that's not solvable either -- there isn't a way to automatically generate texture coordinates for arbitrary shapes (kineme3d alpha testers complain about this a lot, but there's really nothing that I can do). You can use the pixel's x/y/z coords and do procedural texturing based on those values, but that's about as good as it gets.

PreviewAttachmentSize
Z-fighting.qtz3.44 KB

mfreakz's picture
3D importer for all

Thanx for the tricks. I will try this settings. Do you plan to add more primitives to your GL tools ? Like an real adjustable parallelogram to replace the Cube patch, or an adjustable oval option in sphere patch ? I'm really new in 3D, i use to work in 2D compositing and film making, the list of "basic" 3D primitives is not so important isn't it ? For shure, people here would prefer, that you create a 3D importer patch, and i'm agree with this more open and rich option, but if you solve the question of: the best 3D formats, there is the matter of how can we use animated 3D object, with bones, etc... QC is for real time an interactive project, The QC's 3D primitives are poor and limited but they still interact each other, and build interactive and real time project. Well i was thinking to a kind of Macro patch importer like the 3D transformation patch, that could consolidate his content as a singular incorparated form. The set of primitives could be saved as like QC clip, and for those who import 3D objects with this new feature, they could import different parts of a model in different "Importer" and then keep the ability to make "bones", logical animated system, interactive and real time project. Could you explain me what are you planning to do in the future 3D features. May be i'm totaly out of idea, sorry for that, i'm a newbie, and my english is very laborious..

cwright's picture
pro-disclosure agreement

We're planning on releasing Kineme3D sometime around Christmas/New Years. We're doing some major cleanup for a release candidate to the more vocal/influential alpha testers, and we'll slowly open that up as we get close to having it finished up.

It allows importing and deforming arbitrary meshes in several different formats. Check out the obj-loader thread somewhere one this site for some sample images and videos made with it. keyframe animation is supported, but skeletal animation isn't in the schedule for the initial release.

gtoledo3's picture
sweeeeet

cwright wrote:
We're planning on releasing Kineme3D sometime around Christmas/New Years. We're doing some major cleanup for a release candidate to the more vocal/influential alpha testers, and we'll slowly open that up as we get close to having it finished up.

It allows importing and deforming arbitrary meshes in several different formats. Check out the obj-loader thread somewhere one this site for some sample images and videos made with it. keyframe animation is supported, but skeletal animation isn't in the schedule for the initial release.

Sweeeeet. Ima gonna get nitpicky as a mofo... for your benefit of course ;o)

My feeling is that this is going to be a mind blowing thing. I'm all ready in awe.

My gut is that Kineme is really at the leading edge of what is basically an entirely new multi-media format when you look at the impact of Kineme on the functionality of Quartz Composer... I think as more artists of all types see what you really can do with this, they will be naturally drawn to it... at least I was!