Datastructures to represent a polygon mesh (and/or) SDS

This forum is used to discuss the architecture and design of the next JPatch development version (Jpatch 0.7).

Postby pndragon » Fri Mar 09, 2007 5:50 pm

only the inherent limitations remain (surfaces must be manifold and orientable)

These are not limitations, as such. They enforce good modeling practices.

The teapot looks good.

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby dcuny » Fri Mar 09, 2007 6:45 pm

sascha wrote:I think the SDS dicer is working now.
The hedge I use is "It appears as if <broken_element> is working better.", since invariably, I find that there are a host of other bugs I've overlooked. ;)

Here's a rendering of the SDS teapot:
Cool! All those missing patches are back! :)

I have three ideas to improve it... I'll keep you up to date and post a new version to play once I've implemented the first two things.
If importing of objects isn't working yet, could you set the teapot as the default object?
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Fri Mar 09, 2007 6:59 pm

The hedge I use is "It appears as if <broken_element> is working better

:)
If importing of objects isn't working yet, could you set the teapot as the default object?

There's an error in the teapot.obj file I'm using (on the backside, where the handle is mounted), so it isn't the optimal file for testing. Since all other teapot.obj's I've found are triangulated, and the Catmull-Clark algorithm does an awful job subdividing triangle mesges (no, I will not implement Loop subdivision), I'll have to see if I can create a better teapot.obj using the original dataset (made of bicubic patches). Of course the teapot is the ultimate reference object ;-)

JPatch can load objects in .off format right now, but adding an .obj importer is trivial. If all else fails, there are several obj2off and off2obj converters available (I've found two short perl-scripts that do the job quite nicely).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Fri Mar 09, 2007 7:00 pm

pndragon wrote:These are not limitations, as such. They enforce good modeling practices.
To continue flogging a dead horse, my issue is making sure the user understands why JPatch won't create a patch.

The 5-point patches have a similar "limitation" of enforcing "good modeling practices". In practice, it meant I'd spend time pulling my hair out, because JPatch refused to create a 5 point patch, and I couldn't figure out why. A number of these experiences, and people will stop using the tool.

My hope is that JPatch will appeal to people who want to do computer animation, but are put off by the complexity of other animation programs. (Read: "me" ;)). The less expertise the user is required to figure out what's likely to be a common beginning modeling problem, the more likely they're going to stick with the program.

So I'm not disagreeing, just trying to make sure that some poor user isn't pulling their hair out at 3:00 in the morning wondering why they can't "get JPatch to work."
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Fri Mar 09, 2007 7:05 pm

I tend to agree with Pndragon. If you model an object with JPatch, JPatch will take care that the object is a two-manifold, and is orientable. The limitations on the topology are much less evil than those enforced by the patch-modeler.
The only thing where I see problems is when importing polygon models from other formats. If the model is non-manifold, JPatch will refuse to load it, but there's nothing I can do about it. I could (later) add vanilla polygon-object support (with an option to convert the poly-mesh into a SDS) - in this case you could load and use just any polygon object, but only the "good" ones can be converted into an SDS.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Fri Mar 09, 2007 7:12 pm

sascha wrote:Since all other teapot.obj's I've found are triangulated, and the Catmull-Clark algorithm does an awful job subdividing triangle mesges (no, I will not implement Loop subdivision), I'll have to see if I can create a better teapot.obj using the original dataset (made of bicubic patches).
Sunflow has the teapot implemented as a mesh. You can find it under sunflow\src\org/sunflow\core\tesselatable.

Of course, I have to ask why you aren't implementing Loop subdivision. Not that I care, but JPatch is going to support .obj files, right? And people are going to try importing in triangle mesh, and they'll look like crap. So inevitably, they'll ask about this, too.

Or will converting to .off take care of that? Since the triangulation is the issue, I'm not sure how it can. :?

Of course the teapot is the ultimate reference object ;-)
It's good to have some built-in objects. Blender has Suzanne, and Sunflow has the teapot and Gumbo, the elephant (actually a RenderMan object - you can find the mesh for that, too).
Last edited by dcuny on Fri Mar 09, 2007 10:14 pm, edited 1 time in total.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Fri Mar 09, 2007 9:44 pm

Sunflow has the teapot implemented as a mesh.

Looks like the original dataset (it's using bezier patches), It is still available here, together with some interesting background stories. As I said, I'd have to convert it into a quad-mesh before I can use it.

Of course, I have to ask why you aren't implementing Loop subdivision.

Because I don't think that you can model well with triangels - so supporting Loop SDS in a modeler doesn't make much sense to me. Of coure, when I decide to support general polygon models, I could add an option the export the mesh as Loop SDS. But that's not got top-priority right now.

And people are going to try importing in triangle mesh

Here we are at the root of all evil :-)
I don't think that some .obj model downloaded from some internet site is a good starting point for an animation. Characters have to be carefully designed to work well in animations, and rigging is at least as time consuming as modeling, so there isn't much point in using foreing objects - you're better off modeling from scratch.
The main reason for supporting arbitrary polygon meshes would be using them as props or background objects - JPatch would more or less pass them directly to the renderer, but of course it would be fine if they were visible in the animator preview window too.

Or will converting to .off take care of that?

No, it's nothing but an even simpler format than .obj.

Blender has Suzanne, and Sunflow has the teapot and Gumbo

I don't know about Suzanne (I only know Lena ;-)), but I'd love to add Gumbo (IIRC it's been modeled by Ed Catmull, btw.)
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Fri Mar 09, 2007 10:36 pm

sascha wrote:Looks like the original dataset (it's using bezier patches), It is still available here, together with some interesting background stories. As I said, I'd have to convert it into a quad-mesh before I can use it.
OK, I removed it from my prior post.

Because I don't think that you can model well with triangles - so supporting Loop SDS in a modeler doesn't make much sense to me. Of course, when I decide to support general polygon models, I could add an option the export the mesh as Loop SDS. But that's not got top-priority right now.
OK, you're taking about animateable models. As long as you can import a prop, I don't think anyone's going to care.

I don't know about Suzanne (I only know Lena ;-)), but I'd love to add Gumbo (IIRC it's been modeled by Ed Catmull, btw.)
I remember reading the full Lena story a number of years back - it's a real crackup. :)

Suzanne is the monkey head "primitive" in Blender. When you add it, you get an "Eeep! Eeep!" confirmation dialog:
Image
You're right about Gumbo, apparently you can find the data for it in the Advanced Renderman book. Here's a link to the .rib file from someone's final project (an embedded Java web app!). It looks like he lost the ear in the conversion, but it's probably there in the original dataset.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Sat Mar 10, 2007 11:03 am

Suzanne is the monkey head "primitive" in Blender.

I see. Did you know that since the Teapot had an appearence in the famous image "The six platonic solids"
Image
it's also called the "Teapotahedron"? :)
I could add it under a "Add Primitive: -> Cube, Tetahedron, etc..., Teapotahedron" menu, what do you think?
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby pndragon » Sat Mar 10, 2007 2:50 pm

I think it would be better to add one of the moai as a primitive.

The teapot and Gumbo should be available as a solids.

--- Jim
"We're so sorry, Uncle Albert,
But we haven't done a bloody thing all day."
--- Paul McCartney
pndragon
 
Posts: 591
Joined: Sun Dec 05, 2004 1:27 am
Location: North Carolina

Postby sascha » Sat Mar 10, 2007 4:20 pm

:)
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Sat Mar 10, 2007 5:56 pm

sascha wrote:Did you know that since the Teapot had an appearence in the famous image "The six platonic solids"... what do you think?
Heh. I remember seeing that cover - I'm older than I'd care to admit - I spend a huge chunk of my time in high school in basement of the local college library, poring over the bound ACM magazines, oogling over pictures like "The Road to Point Reyes"
Image
This image was cutting edge for it's time: fractal scenery, texture mapping, bump mapping, particle-based plants, reflections. By the way, Point Reyes is a scenic location in California near San Francisco. That's where the REYES renderer gets it's name. More cool pictures here and here... I should post some of these images into the JPatch wiki.

Back on topic, I agree - it would be nice to have some default objects built into JPatch. You've already got the camera and such, so adding Gumbo and the Teapotahedron would be cool. :)
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Sun Mar 11, 2007 11:20 am

I thought it's "Renders Everything You Ever Saw".
I should post some of these images into the JPatch wiki

I'm up for it!
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby dcuny » Sun Mar 11, 2007 7:01 pm

sascha wrote:I thought it's "Renders Everything You Ever Saw".
Yeah, people never come up with the acronym first. ;)

Wikipedia agrees with me. Keep in mind that Point Reyes is a well known spot in Northern California, and Pixar is located nearby.

I'm going to make another attempt to install a new OS on my machine today, and then see about updating the Wiki. Are there any good tools that convert Wikis to stand-alone HTML or PDF? AoI has an outstanding HTML user manual, and it would be nice to be able to distribute something like that with JPatch.

Edit: OK, I started a page here.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Postby sascha » Sun Mar 11, 2007 9:39 pm

It should be possible to hack doku-wiki to batch convert all wiki pages to standalone html - I'm quite sure that somebody did that already, I'll have a look.
Docbook seems to be the standard for documentations, it can be rendered to html, pdf or any other format.
I started a page here.

Cool! I only miss the motion-blurred bownling pins (the image has also been used as cover photo on the "Renderman Companion"):
Image
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

PreviousNext

Return to JPatch 0.7 development

Who is online

Users browsing this forum: No registered users and 0 guests

cron