I am willing to do the workflow that you described above, please provide me with an example script for .cga textured labeling for features like streets.
I was asked to label just the prominent downtown streets in my 3D model I made for my company, so there maybe a query involved for only certain streets.
I feel that importing 3D model labels from sketchup will add too much file size to the .3ws
Here is a rule I made to do 3D text, with font roughly matching Ariel:
CGA Rule: 3D_Text
Thanks Chris, that rule is wonderfully useful! I managed to add options for vertical and horizontal alignment and it's working great.
Thanks a bunch for this rule Chris ! Very handy indeed.
I have a hypothetical question ... would it be possible dynamically generate the text based on some attribute values / text etc ? As in link this to say building height and have it change as the height changes ?
I had a peek at the code but alas it's a little beyond me at this stage.
PS: I appreciate the note about the weird push / pop notation ... made me have a look and try to figure it out seems rather handy.
The original file on my blog is updated for the path change.
Regarding building heights in your question: Yes that is possible. Import the 3D text rule into your building rule, and use below notation to set the attributes from your importing rule, then call its start rule which is Generate.
Your code is spot on and works like a treat, thanks a bunch for your help .... except that my question was not clearly phrased for what I intended, sorry. What I want to do is put "Height" into the text field then tack another text string to it which is dynamically derived from some attribute, not typed in. Height in this case.
So if I have a building that ends up generated to 50m I want the line to read "Height 50" ... is that possible ?
set(Text.Text, "Height " + yourHeightValueHere)
(any of the text rule's attributes can be set in this manner, by the importing rule)
let me know if this helps,
Awesome ... thanks a lot Chris!
Hi Chris - I'm having a similar issue. We are publishing City Engine Web Scenes to be shared online using ArcScene desktop (not using City Engine), and would like a few simple labels. Is there a way to create textual labels in ArcScene and have them published to the City Engine Web Scene?
See ESRI white paper reference to our current workflow: http://support.esri.com/white-paper/2018
Hi, I tested out the rule for 3D text. Want to know if I used it correctly and I have one question.
What I did was draw a polygon over a street and applied the 3D text rule, edited some parameters, and lowered the polygon slightly below the street surface.
My question is, when I export an entire scene should I merge all the 3D text layers as one and export them as the backdrop state? This way the layer doesn't appear in the Web scene table of contents.
Thanks again Chris,
I'm not sure. That doesn't sound like something that would work. Could you try it and share your experiences with us?
I was about to try it on a project, but I discovered the 3D text rule didn't generate. The same 3D text rule works on my laptop which has CE 2014.0, but on my pc, I have CE 2014.1 and 3D text doesn't generate. There is an error that appears in the problems log "Error: geometry asset not found in ResolveMap"
And the warning looks like this in the log: [Method: 'Default$sx'] assetInfo(): assetInfo(): could not load file 'rules/3D_Text/For_3D_Text/Arial/3.obj' - returning 0.
I think something might have changed in between the two 2014 versions. I remember having a problem with this recently. I don't think CGA likes how I stored my assets in the rules folder. I'm not sure why I did that originally.
Try moving the "For_3D_Text" folder to your assets folder, and changing the "assetsDirectory" constant (1st line of code I think) to this:
const assetsDirectory = "assets/For_3D_Text/" + Font + "/"
Let me know if it works, and I'll update the download on my blog post.
Now it works...thank you for the quick fix
Awesome. I'll update the original asap!
Hey another awesome thing....if you export a scene with a 3D labels layer set as "backdrop", it will appear in the webscene and will not be present in layer table of contents.
Retrieving data ...