box modeling

Ideas, enhancements, feature requests and development related discussion.

box modeling

Postby sascha » Fri Feb 08, 2008 3:11 pm

Extrude seems to work fine now (including full undo/redo support - I've un- and re-done every step to create the model shown below, and it worked, more or less) - it's just still not as user friendly as I'd like it to be though.
Nevertheless I gave it a try and box modeled a human hand (click on the images for a larger version):
sds_hand_1.png
This shows the base (level-0) mesh and the limit surface (at level-3). I've extruded the entire mesh, starting with a single cube - first extruding it to 4 cubes, then extruding the wrist and hand, and finally extruding fingers and thumb.
After that I've edited the mesh at level-1 to add some details (knuckles and wrist).

sds_hand_2.png
This image shows the mesh at level-1. You can spot the areas where the level-1 mesh has been edited (e.g. the knuckles).

It doesn't look very pretty, but on the other hand took only 5 or 10 minutes to create, and I think that once the tools work in the way I envision, it could be done in well less than that. And hey, it's the very first model done with the SDS version ;-)
It also shows that hierarchical editing is an extremely powerful tool. You could easily add finer details (e.g. the nails) at level 2 or 3 - and the nice thing about it is that if you have to apply changes to the level-0 mesh, the higher-level details will "inherit" them and follow accordingly (e.g. you could make the fingers thicker, or longer on level-0, and all high-level edits would automatically adapt). It's also a kind of "level-of-detail" knob when working with animations. To pose the entire character, just display it at level-0 or 1, to keep the interface responsive. If you work on the hands, you could hide everything else and set the display-level to 3 or 4 to see all the finer details.

I also think that this type of modeling is by far superior to the spline based approach of JPatch 0.(x<=5). I remember modeling the hand for the clerk - although the tools in JPatch 0.4 worked fine, it was a real pain to attach the fingers to the hand (which involved the manual creation of a number of 5-point-patches). Adding detail also required to split curves, add hooks, etc. Now it's just a matter of moving the edit-level slider to 1 or 2 and modify some vertices, edges or faces on that level. I'm pretty happy with that.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: box modeling

Postby dcuny » Fri Feb 08, 2008 6:20 pm

sascha wrote:Extrude seems to work fine now (including full undo/redo support - I've un- and re-done every step to create the model shown below, and it worked, more or less) - it's just still not as user friendly as I'd like it to be though.

Don't refine it too much, or there won't be anything for us to complain about! ;)

I'm going to update the Wiki to mark Extrude and Edit Multi-Level Mesh as completed tasks.

I've extruded the entire mesh, starting with a single cube - first extruding it to 4 cubes, then extruding the wrist and hand, and finally extruding fingers and thumb.

So what's the process of splitting a face? Is it part of the Extrude process, or is there a Split Face option as well?

It doesn't look very pretty, but on the other hand took only 5 or 10 minutes to create, and I think that once the tools work in the way I envision, it could be done in well less than that.

What are the features that you're envisioning?

And hey, it's the very first model done with the SDS version ;-)

Yeah, you'll want to store than on a gold-plated CD and mount it on your wall. ;)

It's also a kind of "level-of-detail" knob when working with animations.

That's cool. :)

I also think that this type of modeling is by far superior to the spline based approach of JPatch 0.(x<=5).

Anything to get away from the horror of 5 point patches!

...it was a real pain to attach the fingers to the hand (which involved the manual creation of a number of 5-point-patches).

Will you eventually be able to do something similar in SDS? That is,if you modeled the fingers as a separate bit, could you weld them onto the hand later?
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: box modeling

Postby sascha » Fri Feb 08, 2008 7:36 pm

Don't refine it too much, or there won't be anything for us to complain about!

Don't be so modest, I'm highly confident you'll find something to complain about ;-)
I'm going to update the Wiki to mark Extrude and Edit Multi-Level Mesh as completed tasks.

Multi-level editing is complete in a sense that all modifications that can be performed on the base mesh (except topology changes) can be performed on any subdiv-level too. So whenever a new tool is added or an existing tool improved, it will be applicable to multilevel-editing as well.
Extrude is finished in a sense that the extrude operation (i.e. the topology change involved) works and is undoable. What I'd like to further work on is the extrude tool (i.e. the GUI interface for the extrude operation).
So what's the process of splitting a face?

There's no split face operation (yet). When you extrude a face of a cube, you'll end up with to (connected) cubes. This involves removing one face from the cube and adding five new faces. When more than a single face was selected, things are a bit more complicated, but it still can be broken down to removing some faces and adding new ones.
In fact, every topology change can be broken down to removing and adding faces - that's also reflected in the code: to keep things simple, faces are immutable, and once created can't be modified. They can only be created or destroyed. The same is true for edges, although existing edges can be combined to faces. This greatly reduces the number of permitted operations, helps to keep the model in a sane state and makes undo/redo manageable.
What are the features that you're envisioning?

Currently extrude works like the extrude tool of JPatch 0.4. You click the extrude button and it immediately updates the topology. The newly created vertices are placed at the very positions of the original vertices, so to see the effect you'll have to move the newly created, extruded geometry. This is problematic, since if you forget to move it (or, more common, undo the translation, but forget to undo the extrude-operation), you'll end up with some coplanar faces, which won't behave as you might expect and could cause rendering artifacts. So here's how I'd like extrude to behave:
You first have to select a set of faces or edges. Then you switch to the extrude tool, which upon activation does nothing at all. You then have to move your mouse over a selected face or edge (if none was selected, it will select the face/edge under the pointer). By clicking and dragging, it will perform the extrude operation, select the newly created, extruded faces. Further dragging the mouse will move the extruded faces (which could be constrained to an axis or to the face/vertex normals). Releasing the pointer will end the operation and add it as a single, atomic edit to the undo-manager. This kills two birds with one stone (now that's a violent phrase, the German counterpart involves just flies): it does the extrude and the translate operation in one step, so there is no problem with undoing it, and it avoids the chewing gum effect some other packages have - you select some tool and suddenly some lines or parts of the geometry stick to your mousepointer until you perform some voodoo ritual to get rid of it.
Yeah, you'll want to store than on a gold-plated CD and mount it on your wall.

Yes, it must be preserved - it deserves a place next to Lena, the Utah Teapot and Buzz Lightyear at the very least! ;-)
It's also a kind of "level-of-detail" knob when working with animations.

To a lesser extent it could also serve as a replacement for the Mesh Deform Modifier you've been talking about in this thread.
That is,if you modeled the fingers as a separate bit, could you weld them onto the hand later?

Yes, I think this feature is a must (but it's not implemented yet). It should work by selecting two unrelated sets of interconnected edges and choosing a "combine" operation. It would then add faces to connect the two sets of edges, using some heuristic that determines which edges are pairs and are thus to be connected with a face (taking distance and orientation into account). Normally it would create quadrilaterals, but in case that the two sets are of different size, it could create 5-, 6- or more sided faces as well.

There are some more tools I think are needed:

* A knife tool that splits faces and adds edges.
* An insert tool that inserts a new face into an existing one (topologically similar to extrude, so it might be an option of the extrude tool).
* A tool that creates a new face for every selected edge (so it inserts faces at the positions of the edges).
* and (perhaps) a tool that creates a new face for every selected vertex (and inserts that face into the surface).
* corner/crease tools
* Some intelligent selection tools that allow to quickly select edge loops and the like.
* A symmetry tool
* Last not least: save and load models

This should sum up to a fairly decent modeler :D
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: box modeling

Postby dcuny » Fri Feb 08, 2008 8:14 pm

sascha wrote:Extrude is finished in a sense that the extrude operation (i.e. the topology change involved) works and is undoable. What I'd like to further work on is the extrude tool (i.e. the GUI interface for the extrude operation).

OK. I'll still mark it as "done", because for the "minimal" toolkit, it works well enough.

This involves removing one face from the cube and adding five new faces.

This is the bit that I'm a bit fuzzy on. How to you "add" these five new faces if there's no Weld option?

Releasing the pointer will end the operation and add it as a single, atomic edit to the undo-manager.

Let me think about this a bit... What you're describing makes sense, but... :?

It should work by selecting two unrelated sets of interconnected edges and choosing a "combine" operation.

I think it's called Bridge in other modelers. It's a very handy tool.

I still like the idea of being able to create a mesh in a spiderweb-like fashion.

There are some more tools I think are needed...

Ooops, I asked this badly: What features are needed in the minimal list that I've forgotten?

I should warn you: the next question will be some sort of guess when the "Minimal SDS" version might be released. :P

This should sum up to a fairly decent modeler :D

Yes, the symmetry tool is high on my "I need it" list.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: box modeling

Postby sascha » Fri Feb 08, 2008 9:20 pm

This is the bit that I'm a bit fuzzy on. How to you "add" these five new faces if there's no Weld option?

The basic building block are vertices. So if you extrude a single face (say a 4-sided one), JPatch will first remove this face from the SDS and then add 4 new vertices.
Edges are managed automatically behind the scenes, so we don't need to care for them. The SDS class now offers two methods for adding and removing new faces (which can also add undo/redo edits to an edit-list). New faces are defined by an array of vertices. So all the extrude operation does is creating these new, extruded vertices, and tell the SDS object which new faces to add (after removing the old ones) - where the new faces are simply defined by there vertices.
So yes, programmatically it is possible to create a new face that connects two existing edges, but there's no GUI operation that does just that. Splitting faces is similar, but different. It also involves deleting faces, adding new vertices and adding new faces. Again, the methods needed to perform the atomic operations of removing and adding faces are there, what's needed is some logic that figures out which faces to delete and which to add (this isn't too complicated), and of course a nice GUI (which isn't complicated, but still a lot of work).
Let me think about this a bit... What you're describing makes sense, but...

The trick is to not start the extrude action when the mouse was pressed, but to start it when the mouse was first dragged. You then finish it by releasing the mousebutton.
I still like the idea of being able to create a mesh in a spiderweb-like fashion.

I tend to disagree. One limitation of the SDS (and to a lesser extent any polygon mesh) representation is that it's made for solids (i.e. manifold surfaces). This has a number of advantages: Each vertex has a well-defined surface normal, and the mesh can be represented by a nice half-wing datastructure. So one thing to avoid is to allow the user to build non-manifold surfaces (which was quite easy in older versions of JPatch, and almost always caused troubles). So I can't allow to just draw arbitrary edges and then later create faces with these edges. Acceptable tools are:

* Draw new edges on the surface - e.g. using something like a knife tool.
* Draw a freeform spline and use it as the basis of a lathe operation.
* (perhaps) draw a freeform spline and use it as the basis of an extrude operation.
* Add vertices to existing faces (thus splitting one edge into two).
* Extrude new faces out of existing boundary edges (a boundary edge is an edge which has exactly one adjacent face. Edges with two adjacent faces are regular edges, and once an edge doesn't have any adjacent face it's illegal and automatically removed from the model - so you can't have any stray edges like in previous versions).

Yes, the symmetry tool is high on my "I need it" list.

I think it's actually two tools. The first one would mirror the model and then connect the two halfs, just like in previous versions.
The other tool would "remember" the symmetry - and modifying one side would automatically modify the other side as well.
Instead of doing this naively, I think of some advanced symmetry concepts: A vertex could either be "original" or a clone. Original vertices can be modified (i.e. moved), and automatically update their clones' positions. Each clone is connected to its original by a "symmetry rule" (a transformation matrix). This could be a simple mirror transformation (as needed for most animals or humanoid characters), but it could also be something else. For example, it could be a rotation around the y-axis by 45 degrees to model the 8 arms of an octopus. The clones themselves can't be moved directly (that'll either be prohibited or would move the original). To break symmetry, you'd have to create a morph (or layer) and move the clone on that layer. Moving the original on the default layer would still update the clones as well (but the morph would be unaffected, so the symmetry-break would remain intact).
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: box modeling

Postby dcuny » Fri Feb 08, 2008 10:28 pm

sascha wrote:The basic building block are vertices.

Sorry, I've again said this badly, so you get to suffer through another badly done illustration:
split.png
split.png (5.43 KiB) Viewed 7020 times

I've extruded the arm to get the image on top. I'm assuming you start off with the end of the hand looking something like the top. You need to replace the end face with 5 faces, so you can extrude fingers from the hand, like the image below it. How does JPatch know to replace that 1 face with 5 little faces? Or am I asking the question wrong (i.e.: you just split the face once to get two fingers, and then split each of those faces until you've got enough)?

You then finish it by releasing the mousebutton.

Yes, people expect releasing the mouse will end the operation. Anything else is strange.

I tend to disagree.

I didn't say it matched well with SDS, I just said I liked the idea. ;)

I think it's actually two tools. The first one would mirror the model and then connect the two halfs, just like in previous versions.

Yep. :)
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: box modeling

Postby sascha » Sat Feb 09, 2008 9:53 am

You're right, a split face tool would be handy in this case, but it's not implemented yet. What is implemented is extruding multiple faces at once. So I basically followed this tutorial (the images below are taken from that tutorial, but it's worth talking a look at it).
Note that right now there is no 'Polygons->tool option->keep faces together' option (it keeps the faces together per default). So to simulate this behavior, I had to extrude the first segment of each finger separately. After that I could extrude all the fingers at once again (since the faces are unconnected at this point):
ImageImage
It's also notable how they extrude the thumb from the palm:
ImageImage
The tutorial also shows how you could add details using hierarchical edits:
ImageImage
Once corners and creases are implemented (they are, but there's no GUI yet, so I couldn't really test it), this should be applicable to JPatch one to one.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: box modeling

Postby dcuny » Sat Feb 09, 2008 7:48 pm

OK, that clears things up.

Thanks! :D
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron