CityEngine rail rule???... please help me :)

8530
21
Jump to solution
01-22-2016 08:06 AM
AndréLevesque
New Contributor III

Hi folks,

I downloaded the following rule this morning and cant seem to get it to work for me... it appears as though the rule cannot find the texture files associated to it...

Is there somewhere in the code of the cga file that I have to add a path or something?

Link to the rule: Rail rule for streets?

Matthias Buehler​... can you give me advice?

0 Kudos
1 Solution

Accepted Solutions
CherylLau
Esri Regular Contributor

I'm able to get it to work with the following project layout.  The obj files are in the assets folder, the cga file is in the rules folder, and the cej file is in the scenes folder.  Then I open the cej file and apply the changes described in my first post (https://community.esri.com/message/582552 ).  I did not have to change the cga file.

rails_project_layout.png

View solution in original post

21 Replies
CherylLau
Esri Regular Contributor

If you try to open the scene file (tracksScene.cej) in CE 2015.2, then the railroad tracks do not look curved.  Is this what you're talking about when you say it's not working?  This might be because this code was written for an earlier version of CityEngine, and things have changed since then.  To fix this, you can select all shapes (right click in viewport -> Select -> Select All) and then make the graph segments curved by going to Graph -> Set Curves Smooth.

For the missing texture files, I'm guessing you are referring to the warnings generated about not being able to find the .mtl files.  This is ok because it doesn't affect the generation of models in the scene, and you don't need to do anything.  There are no texture files (mtl files) associated with these obj files.  If you want to make these warnings go away, you can edit the obj files and remove all the lines that contain anything to do with "mtl".

0 Kudos
AndréLevesque
New Contributor III

Unknown Asset…

André Lévesque, BA CTech

GIS Tech 4 / Technicien de SIG 4

City of Moncton/Ville de Moncton

Information Systems Dept. des systèmes informatiques

email: andre.levesque@moncton.ca<mailto:andre.levesque@moncton.ca>

Phone #: (506) 383-6274

0 Kudos
CherylLau
Esri Regular Contributor

Does the scene file (tracksScene.cej) in the zip file work for you?  Do you still have unknown asset problems with the included scene file?

0 Kudos
AndréLevesque
New Contributor III

When I load it, and try to generate the models, nothing happens.

André Lévesque, BA CTech

GIS Tech 4 / Technicien de SIG 4

City of Moncton/Ville de Moncton

Information Systems Dept. des systèmes informatiques

email: andre.levesque@moncton.ca<mailto:andre.levesque@moncton.ca>

Phone #: (506) 383-6274

0 Kudos
CherylLau
Esri Regular Contributor

I'm able to get it to work with the following project layout.  The obj files are in the assets folder, the cga file is in the rules folder, and the cej file is in the scenes folder.  Then I open the cej file and apply the changes described in my first post (https://community.esri.com/message/582552 ).  I did not have to change the cga file.

rails_project_layout.png

AndréLevesque
New Contributor III

I'll give this a shot and elt you know how it goes, thanks.

AndréLevesque
New Contributor III

the rule works now, many thanks

0 Kudos
SheylaSantana
New Contributor III

Where do you download this rule? Can you send it to me? shesantana@hotmail.com

When I click in the link you post, I brings me to the welcome page.

Many, Many thanks.

0 Kudos
CherylLau
Esri Regular Contributor

Here is Matt's code, but it was written a while ago for a much older version of CityEngine, so it comes with a warning that it might not work anymore.