13.08.06 -- Ahra Pahts creation story; part 2

Postby Aloys » Sat Aug 12, 2006 8:19 pm

13.08.06 -- Ahra Pahts creation story; part 2: Shells and Street duplication.

Disclaimer: this is going to be a long entry again; read at your own risks. It covers a broad range of subjects and include some detailed case studies. Also it contains lots of images and isn't really dial-up friendly. Hopefully my future entries will be more concise.

While I wait for the current bugs to magically fix themselves I'll tell the second part of Ahra Pahts's creation..

Duplication of the Shells

So I had this nice duplication process set up for the shells thanks to the 'dupliverts' tool but it wasn't that easy. Moreover it had to work for the shells, but also for the streets, the sideways, the lampposts, the walls, and essentially everything in the city. But before going any further there's one thing I need to talk about that I didn't talked about last time, something all this duplication process revolves around: the 'Centers'.
They're essentially the anchor of an object (and not its actual center) the point around which it rotates; and in our case they determine where an object will be placed when duplicated by a duplivert objects. Let me take an example: in the duplication process (let's call this the DP) we saw earlier the shells are arranged it hexagons like this:

Image

The blue point in the middle is a Center; in fact all the shell have their center in the same spot here. This makes sure that during the DP the shells aren't moved around by the duplivert mesh and stay in ordered hexagons. So, at that point it became obvious to me that those centers were going to be critical for all objects beside the shells if I wanted them to be properly aligned and ordered on the duplivert mesh. But for now let's go back to our good old DP.

Once the basic part of the DP was done for the shells I still needed to do some manual cleanup, there were too many shells. For one thing, in the middle of the city there's this large structure we call the Hub. It is in the middle of a lake and I needed to make room for this, so here goes 12 shells. Then there were all the future courtyards, small and large. And here go 27 shells more. I was now with the definitive number of shells (150) and the almost-definitive shape of the city. I say 'almost' because I later found out I had overlooked something: the district walls. The high walls that separate all the districts. I had to push out the 3 'outside' districts around the central one to leave enough place for those walls.

Image

Once this was done I had the definitive layout for the shells, and I could move to the rest.

* * *

The initial batch I had to work on was the streets and associated sideways (what's a city without a street or two?). Again I won't go in the actual creation of those, (I'll save that for a future entry) but I'll focus on the process of integrating them in the city. Some of the streets would have to be customised to include canals, some would have to be totally removed, but all this would have to be done later; I had to first lay out a basic structure and then work the details.

For partical reasons I started by creating the sideways first (they touch the shells which made them easier to create), and then moving to the streets who in turn touch the sideways. Duplicating the sideways was very easy: there's exactly one sideway for each shell. So they went through the same DP: basic duplication through the dupliverts mesh and then manual cleanup. Streets were a different problem alltogether. After a good deal of thinking and studying of the city I came to realize that it would be easier to have the streets not be straight but to group them by three in a regular 'Y' shape and run them through the DP. Thinking of it again I'm not sure that was the fastest way to do this; but that's what I did. My problem with the street was that they couldn't go through the regular DP because the dupliverts mesh (dMesh for short) used for the shells and the sideways didn't work here. Since the shells and the streets aren't arranged in the same way the DP for the streets created tons of duplicate and was just not practical. In the end I decided to use the dMesh only as a guide and duplicate the streets manually. There was only 15 streets for each district so I could do only one district, and duplicate it.

Now how did I use the dMesh as a guide to duplicate the streets?.. Well it's all about those Centers again. One of the problems of doing urban environments unlike natural landscapes is that you need your objects to be very precisely aligned and angled. You can't really have a lamppost sunken half in the ground or a wall not be straight. So I had to duplicate those streets precisely and those Centers came in handy for that; together with my new Blender friend: the 3d Cursor (the Cursor is that black and white cross that you move with the right click). It is used a lot to rotate or scale objects. In 3D when you need to rotate/scale anything you must do it with a reference point (called the 'Pivot' in Blender). By default (and most of the time) you use the object's Center but you can also use other Pivots, such as the 3D Cursor. In our case the Cursor has the advantage to be able to be moved around at will.. Let's look in details at how the streets were duplicated.

* * *

Duplication of the streets - Step by step.

Here is a street surrounded by three shells (the hole in the middle of the street is for a future lamppost). In the upper left corner you can see the 'Center' of the street; and nearby is the 3D Cursor. Also behind the scene in light blue color you can see the dMesh I used both for the shells and the streets. One important thing to notice is that the street Center is in the same spot as the nearby shells Center. (We'll see bellow why it's important)
Image


Let's say I want to duplicate the street in the spot just above. As I said I'll use the shells dMesh as a guide. The idea is to place the 3D Cursor and then align the street according to that Cursor. It's quite simple in fact: I'll select the dMesh,
Image

go to edit mode, select the vertex that is in the same spot as the shell/street Center, move the Cursor there (Shift-S, 'Cursor->Selection') and exit edit mode.
Image

Now that the Cursor is in place I can duplicate the street (Alt-D),
Image

I have moved the street while duplicating it so I'll align it with the Cursor (Shift-S, 'Selection->Cursor'). In this case this actually just put back the street where the other street is; but at least we know it is now properly aligned with the Cursor.
This is where the Center is important, when you align an object to the Cursor it is aligned according to its Center.. (I'll tell in the next entry how I moved those Centers)
Image

And finally I'll rotate the street, with the Cursor as the Pivot, up to the point where I need it to be (to rotate precisely hold 'Ctrl' while rotating, it snaps the rotations to 10° angles).
Image

To set the Cursor as Pivot you must select it in the Pivot list here:
Image

There is now a new street perfectly aligned with the surrounding shells and the other street; and all in all the process didn't take more than 15 seconds. I did this for all the streets in the district; then took all those streets, duplicated them, moved the Cursor to the center of the scene, and rotated the streets by 30 degrees which put them exactly inside the other district. I did that again for the third district, but the central district however was done by hand (there are less streets in this district than in the others).

At this point in the development of the city I knew pretty much all I needed to know to create and duplicate all the needed objects. I had the city now filled with identical streets and shells, I still needed to make: the canals and rivers out of the streets, the courtyards, the lampposts, and do all those tiny other things that you can't always think of in advance but who always end up taking most of the time.

This will be the part 3 of our epic saga...
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Return to Aloys's Journal

Who is online

Users browsing this forum: No registered users and 0 guests

cron