How Can I Create a Scene with .OBJ Texture?

3866
2
10-31-2011 06:36 AM
WilliamLin
New Contributor
Hello everybody,

Sorry for my english, I'm french and I speak english not fluently.

I need to try CityEngine with Maya.
I can import .OBJ in CE, but the texture aren't.
Is there a way to attach the texture with the .obj in CE ?
Is there another format (.mb .ma) that CE can read ?
Is this due to the limitation of the tryout.
I would like also Import a OSM map and OBJ.
I can see both in the scene editor but I can't display the OBJ and the OSM at the same time in the Viewport.
The idea is to create city parts in Maya and populate city in CE.

Thank you for your reading, and I wait for your answers, thank you very much.
0 Kudos
2 Replies
MatthiasBuehler1
Frequent Contributor
hi Tingli04 !


to be able to port the texture, make sure that you also use the '.mtl' file which stores the actual texture. [let me know if this is unclear] try and open a mtl file in a text editor !

as assets, you can use .obj and .dae (collada) files. maya ascii and binary can not be used.


----------------------

a very easy start in a few steps :


1]
copy one asset you want to use into the /assets/ folder

2]
import an osm into your scene, press the 'f' key to see the shapes and street graphs.

3]
create a new rule file and assign it to 1 Lot shape

4]
write the following code into the rule file :

Lot -->
    alignScopeToAxes(y)
    extrude(10)
    i("assets/####.obj") # use your obj name here !
    AssetShape.


like this, you have used an asset and inserted it directly at the Lot level.

of course, this is a very simple example, you'll find more things in the docs and tutorials.

-------------------

it is very important to understand that the CityEngine is a procedural modeling application. so the majority of the models you create will be created entirely with CityEngine's rule based modeling. FOR THIS, the CityEngine can use assets to fill in e.g. windows, roof bricks, trees etc. as instances. basically, assets are the fill-ins where you do not want to create the geometry procedurally or you can't. e.g. with deco elements or statues, ...

BUT you can also place assets as finished models or buildings in your scene. for this, you can simply import them in a scene as a 'static model' (ce 2011 !).

check the docs on this, ok ?

lemme know if you have more questions !
0 Kudos
WilliamLin
New Contributor
Thank you very much for your help.

It helps me a lot. It works fine now.

Have a nice day. Thank you again
0 Kudos