Softimage python script to generate a city: City Builder 3.0

News concerning 3D DCC business
Post Reply
User avatar
bottleofram
Posts: 355
Joined: 17 Aug 2010, 11:21

Softimage python script to generate a city: City Builder 3.0

Post by bottleofram » 29 Jul 2012, 01:33

Found this on the vast internet: http://forums.cgchannel.com/showthread.php?t=15193

Image
Title: Softimage python script to generate a city: City Builder 3.02 is out!
Artist: Pierre Lalancette
Software: Softimage
Description:

City Builder is a python script for Softimage that generates a procedural city. It was started a long time ago and since I am out of job right now, I dedicated all my time on it to get it done. It is now to the version 3.0.

Image

You can get it at my site, under the SCRIPTING link:
http://www.lalancelot.com/

To Run:
-Unzip the file (city_builder_3_02.py)
-Copy this file into your pluging directory (Example: C:\Users\Lancelot\Autodesk\Softimage_2010\Applicat ion\Plugins)
-Restart Softimage
-In MODEL menu, GET -> PRIMITIVE -> POLYGON MESH -> CITY BUILDER
You will get a property page where you will be able to enter all city's properties and then generate it. On my old computer, it took 1H30 to generate a 2km by 3km city. And beware that the vegetation merge at the end takes a while.
Copyright: Use as you wish, at your own risk.
Enjoy!

User avatar
Rork
Posts: 1359
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands
Contact:

Re: Softimage python script to generate a city: City Builder 3.0

Post by Rork » 29 Jul 2012, 14:19

nice find!

Thanks to Pierre for sharing this, will have a test drive soon :)
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ
So long, and thanks for all the Fish!!

angelous4x
Posts: 133
Joined: 06 Nov 2011, 05:24
Location: new York
Contact:

Re: Softimage python script to generate a city: City Builder 3.0

Post by angelous4x » 30 Jul 2012, 04:14

really great find.

pluMmet
Posts: 217
Joined: 18 Jan 2011, 18:37
Skype: bigcuberight

Re: Softimage python script to generate a city: City Builder 3.0

Post by pluMmet » 11 Oct 2012, 21:17

It took 1.5 hours for that city..

I don't know exactly the size I chose but I'm at 49% after almost 4 hours lol

Ahh just hit 50% :)

User avatar
McNistor
Posts: 605
Joined: 06 Aug 2009, 17:26

Re: Softimage python script to generate a city: City Builder 3.0

Post by McNistor » 12 Oct 2012, 14:42

I wonder if an ICE implementation would be faster.
The society that separates its scholars from its warriors will have its thinking done by cowards and its fighting done by fools.
-Thucydides

Lancelot
Posts: 11
Joined: 17 Aug 2009, 17:59
Location: Quebec, Canada
Contact:

Re: Softimage python script to generate a city: City Builder 3.0

Post by Lancelot » 15 Oct 2012, 18:04

Yes, I am quite sure a ICE implémentation would be faster, at least for the modeling. Because I am not using any mutithreading in City Builder, and ICE is using it a lot. But I don't know how the texturing would be done in ICE. I should try it.

Thanks for the nice comment. The city that took 1h30 was 4k by 4k. I forgot to warn people that higher that that, you may experience memory overuse. Also, too much shaders will kill your ram. I recomand to keep it around 25.

If I was to redo City Builder, I would probably use ICE. But it was started a long time ago, before the "Moondust" addition to XSI.
Pierre Lalancette.
Eat well, stay fit, die anyway.

bven
Posts: 8
Joined: 08 Sep 2009, 19:07

Softimage python script to generate a city: City Builder 3.0

Post by bven » 14 Aug 2013, 18:47

I'm getting errors when trying to run City Builder 3_03. Softimage 2010 - 64bit - windows 7

Traceback (most recent call last):. File “ <Script Block>”, line 391, in CityBuilder_Generate_OnClicked.
myCity.ground=mycity.Ground(myCity.cityFront, myCity.citySide). File”<Script Block>”, line 651, in Ground.
oTerrain=Application.CreateShaderFromProgID(“Softimage.txt2d-te….:The parameter is incorrect.

I can see the plugin in Softimage, but get the error when I "generate" the city. The plugin generates a ground grid and lights, but that's it.

I'm guessing this isn't a Python issue, seeing that I can see the plugin in Softimage, but I had to try several different versions of Python and pywin32 to even see the plugin, so it could be an issue.

I've installed:
python-2.6.5.amd64 / pywin32-214.win-amd64-py2.6

Any information would help. Thanks

Lancelot
Posts: 11
Joined: 17 Aug 2009, 17:59
Location: Quebec, Canada
Contact:

Re: Softimage python script to generate a city: City Builder 3.0

Post by Lancelot » 14 Aug 2013, 22:53

The issue seams to be coming from the CreateShaderFromProgID that was introduce in my version 3.01 to correct an issue with Softimage version 2014.

Ok, try this special version (3.001). It is an older version of the plugin that do not use CreateShaderFromProgID. Even though this command was introduce in XSI 7.0, it looks like they change the number of parameters in XSI 2010. So I took an older version 3.0 and corrected a bug with the reflection able/disable that I found later. I tested it on my oldest version of XSI: 2012. I hope it will work on your XSI 2010.

For a first time, I found the history of one of my plugin really, really useful.

Good luck.
Last edited by Lancelot on 15 Aug 2013, 01:58, edited 1 time in total.
Eat well, stay fit, die anyway.

bven
Posts: 8
Joined: 08 Sep 2009, 19:07

Re: Softimage python script to generate a city: City Builder 3.0

Post by bven » 14 Aug 2013, 23:35

Thanks Lancelot, very surprised by the quick response.
I still got the same error though... Any other ideas?
Thanks again,
Bart

Lancelot
Posts: 11
Joined: 17 Aug 2009, 17:59
Location: Quebec, Canada
Contact:

Re: Softimage python script to generate a city: City Builder 3.0

Post by Lancelot » 15 Aug 2013, 02:23

Sorry, my bad.

I have been using CreateShaderFromProgID for quite a long time. I have no idea why it is giving you problem. I can only test on 2012 and 2014 and they work fine for me. I am sorry, I cannot help you out. You're only hope is to upgrade your Softimage.

Pierre.
Eat well, stay fit, die anyway.

bven
Posts: 8
Joined: 08 Sep 2009, 19:07

Re: Softimage python script to generate a city: City Builder 3.0

Post by bven » 15 Aug 2013, 17:00

I appreciate the effort. Looks like a great plug-in... most likely will upgrade soon
Thanks

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Softimage python script to generate a city: City Builder 3.0

Post by myara » 30 Aug 2013, 03:54

Since Softimage 2011, the ProgID started to use version numbers. I also had to change a few scripts that were based on this.
It was something like Softimage.material-lambert became Softimage.material-lambert.1.0, but I don't have 2010 in this PC now.

Look in your 2010 SDK for shaders ProgIDs and give it a try.
Last edited by myara on 30 Aug 2013, 08:52, edited 1 time in total.
M.Yara
Character Modeler | Softimage Generalist (sort of)

Lancelot
Posts: 11
Joined: 17 Aug 2009, 17:59
Location: Quebec, Canada
Contact:

Re: Softimage python script to generate a city: City Builder 3.0

Post by Lancelot » 30 Aug 2013, 08:05

There is many shader in CityBuilder and this might be quite a job to make it backward compatible. I don't say I never will, but since I doubt there is a real need for it, I doubt I will.

I have never seen any pic from someone else using it.
Eat well, stay fit, die anyway.

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests