Text or Labels in City Engine

7885
24
04-08-2013 08:12 AM
JimJohnson2
New Contributor II
Is there any way to use text or labels to identify the streets, buildings, etc...? Can someone point me to a tutorial or help menu for this.

Thanks
Tags (2)
0 Kudos
24 Replies
MatthiasBuehler1
Frequent Contributor II
Hi,


I'm not perfectly sure what you mean..

You want to find and select objects which match ?

Let me know a bit more details..

m.
0 Kudos
MatthiasBuehler1
Frequent Contributor II
hi ..
in what 3d environment ?

in CityEngine ?

lemme know ..

m.
0 Kudos
AndreasUlmer
Occasional Contributor
Currently only geometry objects (3D models) can be displayed in CityEngine Web Scenes, so no labels or symbols.
The only option now would be to prepare textures with the street labels, assign them to the features with cga and object attributes, and export as geometry objects along with the real geometry. This however will be displayed as every other geometry (e.g. will not have a constant screen size). By putting the "label geometries" on a separate layer you could mimick a labels on/off behaviour. So this is clearly a makeshift solution.

You might be able to automatize the label-texture-generation process using an image library (e.g. imagemagick)  together with the CityEngine Python api. e.g.

a possible workflow:
1. run a CE py script to collect street name attributes from or features, and prepare an imagemagick bat script
2. running the bat script generates per-feature label textures
3. adapt the cga script so that each feature references its label texture.

Let me know if this scenario is of interest, I think I can find some scripts along these lines in the attic.


FYI: We are working on a follow-up application to the CE Web Scene viewer that will support point/line/polygon geometries along with symbolisation and labels. So improvements are on the way.

best
Andreas
MichaelWalton
New Contributor III

Hi,

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

0 Kudos
StevenBoyington
New Contributor
I am looking for a way or a work around to label objects in the scene's viewport  (manually or otherwise) as well. It's been a couple months since the last post on this thread. Has anyone had success doing so?

Best,

Matt Lukens
0 Kudos
MatthiasBuehler1
Frequent Contributor II
Hi,

There's still no 'labels' in CityEngine and there won't be for the near future.

What you can do is use CGA to create a rule that creates some labels as 3d models. But of course it depends a bit on what you need on those labels .. Do you have some more info ?

Let me know ..

matt
0 Kudos
StevenBoyington
New Contributor
At the moment I would want to make basic mapping labels such for Street Names, labeling buildings, etc. So a viewer would know what they are looking at.

I understand, in concept, what you are saying about writing a CGA, to generate 3d Labels, however I am a novice at CityEngine and code writing.

Matt L
0 Kudos
by Anonymous User
Not applicable

Steven,

Here is a rule I made to do 3D text, with font roughly matching Ariel:

CGA Rule: 3D_Text

Have fun!

Chris

NathanStocker
New Contributor III

Thanks Chris, that rule is wonderfully useful! I managed to add options for vertical and horizontal alignment and it's working great.

0 Kudos