SketchUcation Plugin Store

 

 

[CityGen] User Selection of Building type

Moderator: Jim

Re: User Selection of Building type

Postby Jim » Thu Jun 18, 2009 8:09 pm

Chris Fullmer wrote:Is that just overly - complex? I am imagining making it as simple as possible, but perhaps its just too much.


I don't think it is overly complex. The control program would not have to know how the buildings are being added. What matters is that all Building types respond_to? a .build() method.

So the controller just calls the .build() method on any type of Building, and all Buildings must repond_to? the .build() call. But each type of Building will do something completely unique in its build method.
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: User Selection of Building type

Postby thomthom » Thu Jun 18, 2009 8:14 pm

So building class should be based upon a Building class maybe?
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17603
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: User Selection of Building type

Postby thomthom » Tue Jun 23, 2009 9:53 am

Arg!!
You can't modify the material name via the API.
Nor can you delete a material.

With layers you can set the name. But then there's the problem of colour. Guess the user have to manage the colours completely. ...but I'd rather have different materials per street/building type than a layer...

I saw that VfSU uses some hack to work around renaming and deleting materials. They replace the existing with a new material and then apply all unused materials to a dummy group before they purge the materials. ...I don't want to use such a hack...


*grumble*
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17603
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: User Selection of Building type

Postby thomthom » Fri Jan 07, 2011 2:33 pm

With the good quality selection of tiling building textures over at http://www.cgtextures.com/ it would be very cool to have a building generator that let you generate building with different textures.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17603
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: User Selection of Building type

Postby Chris Fullmer » Fri Jan 07, 2011 7:55 pm

Can we package those materials ourselves? Or are you thinking more like just make a generator that will place any specified material onto the walls?

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6691
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: User Selection of Building type

Postby thomthom » Sat Jan 08, 2011 3:06 am

Dunno if we can repackage it... but looking at them just reminded me of this project again and I had some ideas flying past.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17603
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need Authorised SketchUp Training by experts in various disciplines? Check out our Training details.

Ad Machine
Robot
 
Posts: 2012


Return to City Generator

Who is online

Users browsing this forum: No registered users and 1 guest