POST
|
I'm not exactly sure what you want to do, but I think the code below will do what you want. Its essentially splitting the height of the "roof" and removing the top. I've added a couple attributes - for the height of the dirt pile and the angle of the dirt pile to give you a little more control if you need it. Hope this helps. Devin /**
* File: dirtpile.cga
* Created: 26 Jul 2016 06:25:45 GMT
* Author: Devin Lavigne
*/
version "2016.0"
@Range(1,89)
attr dirtAngle=45
@Range(1,89)
attr dirtHeight=1
@StartRule
Start-->
roofHip(dirtAngle)
split(y) {dirtHeight:Dirt | '1:NIL}
... View more
07-25-2016
11:44 PM
|
0
|
2
|
638
|
DOC
|
I don't know about you, but I didn't have the patience or the mental capacity to cycle through and remember all 127 plants in the ESRI.lib, seeing what each species looks like and overall quality of the models. I'm sure some botanists and landscape architects might know what a Conker Tree is, but I don't. So I wrote some CGA that basically queries the Plant_Loader.cga and places and labels each of 127 plants. Simple create a rectangular object and apply the rule. That's it. The CGA file is attached and the code is below. If you have any suggestions or requests please email me dlavigne@hlplanning.com I hope you find this as useful as I do when bringing these assets into other rules. Devin Lavigne, AICP LEED-AP Principal | Cofounder Houseal Lavigne Associates 188 West Randolph Street, Suite 200 | Chicago, IL 60601 http://www.hlplanning.com /**
* File: plantlist.cga
* Created: 25 Jul 2016 15:32:30 GMT
* Author: Devin Lavigne
*/
### Have you ever wondered what plants come in the master ESRI.lib?
### This rule queries the Plant_Loader rule in the ESRI.lib and then places each species at their max height with a label.
### All you need to do is create a rectangular shape and then just apply the rule.
### If you have any suggestions or requests please email me dlavigne@hlplanning.com
version "2016.0"
import Plant:"/ESRI.lib/rules/Plants/Plant_Loader.cga"
import Text:"/ESRI.lib/rules/General/Text.cga"
PlantNumber = Plant.nPlants
@Hidden
attr SubSplit = 0
@Hidden
attr Length = 0
@StartRule
Area-->
alignScopeToGeometry(yUp,1)
s(PlantNumber*20,0,20)
set(Length,scope.sx)
plantpoints(0)
plantpoints(counter)-->
case SubSplit <= PlantNumber:
split(x) {Length/PlantNumber:plantArea(SubSplit) | ~1: set(SubSplit, SubSplit+1) plantpoints(SubSplit)}
else:
NIL
plantArea(plantnum)-->
comp(f) {top=PlacePlant(plantnum)[Ground]}
PlacePlant(plantnum)-->
set(Plant.Name, Plant._commonName(SubSplit))
set(Plant.Height, Plant._heightMax(SubSplit))
set(Plant.Radius, Plant._radius(SubSplit,Plant.Height))
Plant.Generate
set (Text.Text,Plant.Name)
set (Text.Size,2)
rotate(abs, world, 270,180,270)
t(Plant.Height,0,scope.sy/2-Text.Size)
Text.Generate
Ground-->
color("#56a554")
... View more
07-25-2016
12:06 PM
|
1
|
3
|
3130
|
POST
|
The CGA parsing engine is stricter than previous versions. Previous versions of CityEngine would parse through some sloppy CGA and still work. For example, something like this works, even though we've declared it a color (@Color) and its obviously not. Bad CGA @Color @Order(3)
@Range (0.00,1)
attr window_opacity = 0.30 The behavior I noticed was that every attribute before the sloppy CGA would work fine in 2016, even sometimes poorly formed ones. But every attribute after it would not be available. Check your attribute grammar and I'm sure you'll find your issue. Good CGA @Order(3)
@Range (0.00,1)
attr window_opacity = 0.30
... View more
07-25-2016
11:44 AM
|
0
|
1
|
503
|
POST
|
You can import rules in any CGA rule. So in your example you could create a master CGA rule importing your two CGA files.... // import texture & animate rule
import a1 : "animate.cga"
//import water extrusion
import w1 : "water.cga" then you could call rules from each file using something like w1.Lot-->... For more info search CityEngine help for Import But I don't think your CGA is that complicated and using multiple rules seems unnecessary. Can you just do something like this? //Attributes
@Group("Extrusion")
attr ELEVATION = 0
@Group("Texture")
@Range(-180, 180)
attr Rotation = 0
@Group("Texture")
@Range(0.1, 20.1)
attr Scale = 5
@Group("Texture")
@File
attr Texture = "SeaWater.jpg"
@Group("Texture")
attr SizeX = 100
@Group("Texture")
attr SizeZ = 100
@StartRule
Lot--> extrude(ELEVATION)
Water
Water -->
alignScopeToAxes(y)
rotateScope(0,Rotation,0)
setupProjection(0, scope.xz, SizeX * Scale, SizeZ * Scale)
projectUV(0)
texture(Texture)
# This line makes it animate in a web scene.
set(material.name, "watermaterial__waterparams_2_5") If you just need the top to animate you can always split the component and texture the faces individually - i.e. comp(f) {top:Top | side: Sides}
... View more
07-18-2016
05:04 PM
|
0
|
0
|
665
|
POST
|
Understanding that Key Performance Indicators (KPI) are unique to each project, are there any available resources that provide some averages or typical KPIs?
... View more
07-18-2016
04:42 PM
|
0
|
4
|
2279
|
POST
|
Not sure if you mean the path or the image itself. I think the rule change would be fairly simple, and the heavier lift the imagery - converting hundreds of PNGs to JPGs. If that's what you are looking to do use Photoshop's Image Processor (File-->Scripts-->Image Processor). You can run it to scan your folders, open images and save them as JPGs in the same place.
... View more
05-20-2016
04:38 PM
|
0
|
0
|
1030
|
POST
|
Do you mean something like the tot lot in my image? I started out using a rule that would place the model - something like this: Playstructure--> i("Playstructure.dae") But putting in the right spot and then the rotation and scale - just too painful. In this instance it was just plain easier to place the model. So in this scene - which supports a plan recommendation to consider using vacant lots at the end of blocks for tot lots - the model is just placed. I am however working on a some code that will develop a park site based on size and surrounding uses/population and I do plan on using CGA to build soccer fields and basketball courts (right angle type stuff), and just inserting assets like goals, play structures, backstops, etc... Hope this helps.
... View more
05-10-2016
07:59 PM
|
1
|
0
|
858
|
POST
|
Ahhhhh....that's it. I have a Basic for my Mac and Advanced for my PC at work. Thanks Matt
... View more
05-22-2015
10:57 AM
|
0
|
1
|
583
|
POST
|
I noticed the Collada export is gone from CityEngine 2015. I'm looking for the best solution to take detailed 3d models from CityEngine into SketchUp. Any thoughts or suggestions? I'm also looking for some way to create/package repetitive elements as "components" to keep file sizes down. Is this possible?
... View more
05-21-2015
01:47 PM
|
0
|
3
|
4279
|
POST
|
I'm wondering if there is a way to apply a pre-defined style within a CGA rule - from within that rule or when imported. For example, I have a CGA rule file that builds buildings from footprints - and there are a number of pre-defined styles - ApartmentBuilding, MixedUse, Office.... I'm now writing another rule that will be applied to a parcel. I'm writing some zoning to go with it - like setbacks etc... as well as some code to generate parking lots. The remaining area would be the footprint. I know I can reference the imported rule to generate the the shape, but I'm wondering if there is a way to specify a style and not just a start rule. I keep thinking I'm missing something really obvious. Basically what i have is this: Lot--> split(z) {Side_Yard:SideYard | ~1:split(x) {Front_Yard:FrontYard | ~1:Middle | Rear_Yard:RearYard} | Side_Yard:SideYard} Middle--> BuildingCGA.FootprintStartRule and wondering if there is a way to do this: Lot--> split(z) {Side_Yard:SideYard | ~1:split(x) {Front_Yard:FrontYard | ~1:Middle | Rear_Yard:RearYard} | Side_Yard:SideYard} Middle--> BuildingCGA.FootprintStartRule(somePreDefinedStyle)
... View more
01-23-2015
11:10 PM
|
0
|
2
|
3972
|
POST
|
I was having this problem to, but I resolved it yesterday. I have a 4K monitor with two 970GTX SLI NVIDIA cards. My models were constantly timing out. Sometimes it would crash simply previewing a rule file or texture in the preview window. At first I thought it was a memory issue related to the high resolution or the fact that I was running my workspace in a Dropbox folder. I did two things that have helped. First, I updated my video driver with one released yesterday (347.25 WHQL). Second, I now pause Dropbox syncing while working in CityEngine. I noticed CityEngine was constantly uploading changed files. I suspected at times CityEngine may have been waiting for a file to become available or was receiving write errors from files in use. I'm not sure which one, or both were the cause, but I've been crash free for 2 days.
... View more
01-23-2015
07:59 PM
|
0
|
1
|
395
|
POST
|
I had a ton of issues with Java installing minecraft for my kids so maybe I can help. First you can try this: How to Install Java in OS X Yosemite - that should work and I think its what I had to do to get CityEngine up. If it doesn't you can try downgrading to Java 6 - what I had to do for Minecraft - How to downgrade Java 7 to Java 6 on Mac OS X - YouTube Now for the bad news....I've been having some issues with Yosemite, with apparently no known workaround for Yosemite... See my post here - Cannot Browse Computer Directories
... View more
12-06-2014
08:00 AM
|
0
|
0
|
483
|
POST
|
Simon - do you have any news or updates you could share?
... View more
12-05-2014
08:31 PM
|
0
|
1
|
703
|
POST
|
Wow! Obviously not the answer I was hoping to hear. Information I guess I knew before I upgraded to Yosemite. Rolling back an OS is a significant task. Any idea when 2015 is set to roll out? Will there be a beta?
... View more
11-14-2014
09:44 AM
|
0
|
0
|
703
|
Title | Kudos | Posted |
---|---|---|
2 | 11-28-2023 09:44 PM | |
1 | 08-22-2023 04:40 PM | |
1 | 07-19-2023 12:02 AM | |
1 | 03-15-2021 12:28 PM | |
1 | 04-08-2020 01:36 PM |
Online Status |
Offline
|
Date Last Visited |
05-20-2024
08:22 PM
|