PDA

View Full Version : City Generator Ver 1.00



WingedOne
02-01-06, 04:14 AM
A Random City Generator.

As I mentioned in this thread, http://www.zbrushcentral.com/zbc/showthread.php?t=32297, this was a ZScript that I'd been working on for a while now. This doesn't work in the demo version of ZBrush, as of yet.

I think I have it so it finally does something worthwhile.

With this script you can generate a city using buildings that were saved to a file, (Building01.ztl, Building02.ztl, Building03.ztl, and so on, up to Building07.ztl). If you want to use your own custom buildings, make sure to use the same filenames as that is what the ZScript is looking for.

Also, you can generate a futurstic style city as well as a no-frills low-polygon count city made up only of scaled cubes.

Here are a few samples of what it can do:

Futurstic City:

City.JPG

A City Built From File Objects:

City2.JPG

A No-Frills Low-Poly City

City3.JPG

When making your own custom buildings make sure the base of the building is sitting on the origin, like so:

BuildingBase.JPG

Also, make sure the top of the building is facing toward the negative Z axis, (toward you, in terms of ZBrush coordinates), like this:

BuildingTop.JPG

The widest area of any buildings should also be the same size as shown here:

BuildingSize.JPG

All of this is just so any custom made-buildings don't intersect with each other in the final model.

I also ssigned groups to different sections, so if alignment is off, you can hide the other groups and tweak size and offset amounts in the deformation pallette. I had to jump through some hoops since ZBrush only allows 255 markers at any one time and it doesn't allow markers on top of one another, so I had to deal with some trial and error in setting up the final polymeshes, so some alignment will probably be necessary.

BuildingAlign.JPG

Just unzip everything into your ZScript directory and load it from the ZScripts menu. Any ideas/suggestions are welcome.

I hope somebody finds this useful, because I exhausted myself working on this. :D I'll try to do something more relaxing next.

sirquadalot
02-01-06, 05:18 AM
:D This looks really cool. Thanks a ton!

Sebcesoir
02-01-06, 05:59 AM
Looks really nice!

Cant wait to try it!

Tartan
02-01-06, 06:43 AM
sweet script WngedOne :):tu: I threw it in Bryce to see what a standard procedural looked like on it. Nice work and time well spent.

city1.jpg

Tartan
02-01-06, 06:47 AM
hmmmm how the heck do I keep image from showing in second row and still put in post? o well html genius I aint:confused:

Frenchy Pilou
02-01-06, 07:34 AM
Pilou

WingedOne
02-01-06, 07:39 AM
hmmmm how the heck do I keep image from showing in second row and still put in post? o well html genius I aint:confused:
Use the "ATN" tag instead of the "ATT" tag.

smileman
02-01-06, 08:16 AM
Hey great plug (Rendering C4d)
Bob :D :D :D :D :D :lol: :lol: Chess.jpg

Thank you!

rookie-z
02-01-06, 10:20 AM
great job, WingedOne!

this script looks handy :)

rookie-z

honiley
02-01-06, 11:47 AM
You've just put greeble out of business ;) Thanks for sharing

lemonnado
02-01-06, 11:58 AM
Great script! WOHOOOOOOO! Together with the PeoplePoker Script the possibilities are endless...

THANKS!


city.jpg (http://javascript%3Cb%3E%3C/b%3E:zb_insimg%28%2725921%27,%27city.jpg%27,1,0%29 )
:tu::tu::tu::tu::tu:
Lemo

SpaceMan
02-01-06, 07:14 PM
WingedOne thanks:tu: for the zplugin. I used the city from file button and added some fog.

cityscape1.jpg

SpaceMan
02-01-06, 09:26 PM
Used a zbrush default texture on this one and fog - Untitled-4 copy

loaded Jason's sketch shader material for this - Untitled-3 copy.jpg

added a second layer a filled - Untitled-2 copy.jpg

changed the fill texture on layer 2 on this one - Untitled-1 copya.jpg

cameyo
02-02-06, 03:42 AM
Hi WingedOne,
cool script !!!

How about your palm 3D application ?

Have a nice day.

cameyo
p.s. thanks for source

scaramouche
02-02-06, 07:50 AM
Thanks for saving me from pulling out what's left of the fringe on my head! :D

Frenchy Pilou
02-02-06, 08:06 AM
...function Rezise don't work for the Demo users (640*480 max) ;)
Pilou

WingedOne
02-02-06, 08:39 AM
...function Rezise don't work for the Demo users (640*480 max) ;)
Pilou
I'll see what I can do to accomodate the demo users. :)

Blaine91555
02-02-06, 10:27 PM
A cubist's dream. Thank you oh WingedOne :tu:

cube2.jpg

bicc39
02-03-06, 08:40 AM
Having a lot of fun with this, thank you.
Always thought computer graphics were like this
push a button, instant city.

The city in the first scene, when is garbage pick up day?

yoogy
02-04-06, 05:31 PM
Playerd withz this little sweet City-script.

THX a lot for sharing @Winged One


Temple-Island.jpg (http://javascript%3Cb%3E%3C/b%3E:zb_insimg%28%2726153%27,%27Temple-Island.jpg%27,1,0%29)

SpaceMan
02-05-06, 01:58 PM
WingedOne a few questions, etc

I changed all the building models in the file with some ztools I have and the polygcount when going to make polymesh was 800,000,000+:lol: - I then replaced the org buldings and exchanged one of them with one of my ztools and the make polymesh count was 80,000,000+ ------- what is the polycount of the models in your files? How in ZBrush can I get a polycount of a ztool?

A note on the lightpost - you use one model can you have four instead of one?

What does the seed do in the plugin?

When making the plugin did you make a city block (just one city block) plugin?

A note on the block shape can that be changed to have shapes like circles, etc?



yoogy
cool image :) how did you do it?




:b2:

WingedOne
02-06-06, 12:01 PM
I changed all the building models in the file with some ztools I have and the polygcount when going to make polymesh was 800,000,000+:lol: - I then replaced the org buldings and exchanged one of them with one of my ztools and the make polymesh count was 80,000,000+ ------- what is the polycount of the models in your files? How in ZBrush can I get a polycount of a ztool?
You can get a polycount of a ztool by hovering your cursor over the picture of your tool in the tool pallette.

I wouldn't recommend using a building with a polycount of more than 2,500 polygons. That would give you a city with a little over 1,210,000 polygons. I made sure the custom buildings I made were pretty low-poly.



What does the seed do in the plugin?
If you change the number, it causes the random number generator to generate different numbers, so, in the case of the city using the custom objects, different buildings would be placed in different locations and at different rotations. That's so if you need to generate more than 1 file, they don't all look exactly alike.



When making the plugin did you make a city block (just one city block) plugin?

A note on the block shape can that be changed to have shapes like circles, etc?

The ZScript generates a low-res cube for the sidewalks, if that's what your asking.

I suppose I could make it so the ZScript loads in a custom object for the sidewalk, so that way you can make your own style of object for the sidewalk.

sirquadalot
02-07-06, 05:43 AM
That would be cool! I'm running through your script wright now. Pretty sweet.:cool:

SpaceMan
01-18-10, 06:25 PM
This would be a cool zscript for ZBrush 3.5r2

kilik128
01-19-10, 08:32 AM
nice works !!!

spaceboy412
01-19-10, 06:37 PM
hi, hopefully WingedOne will update this, but for the time being i fixed the few errors that i could with my limited knowledge.
Note: it will only build the models and/or load the files, the "futuristic city" was removed cause it caused a crash(part of the button still remains though).
i really didn't want to fix the texture or material issues so i just removed them.

This is for 3.5r3.
WARNING! sometimes it would lock up zbrush so be careful to save whatever else you were doing first.