Select to view content in your preferred language

"Venise like" Project

757
2
06-12-2012 11:46 AM
olivierjeannel
New Contributor
Hello there, my name is Olivier, I'm a kind of CG director and this is my first post here. Please, forgive the noob questions 🙂
Let me introduce in a few lines why I'm here,

For a small advert I should start soon, I'm currently evaluating Cityengine (Trial).
I think I will end buying Cityengine Basic version (for money reasons, my budget beeing pretty tight on that advert).

The sequence I have to do is a wide top-shot view of a french-like city. The camera will be high up, covering 3-4km lenght of a city. The shot will be a timelapse from mid-day to night (with night city lights in the end). The 3D datas of Cityengine will be exported to Softimage, and finaly composited in After Effect.

I've been playing with some of the scenes exemples downloadable on the site. I've been really impressed with the "Venice" example, and I wish to use similar technique for generating my city.
So far, the final city isn't decided yet, I'm still practicing (with trial version).

At the moment, I've been able to "reproduce" the process on the city of Bayonne (France).
This is wat I did :

I grabbed a large satellite texture of Bayonne with precise Latitude and Longitude using Microsoft VirtualEarth Satellite Downloader http://www.allallsoft.com/mvsd/

I applied the same longitude an latitude coodinates in OpenStreetMap and exported.

I imported everything in Cityengine, just as explained in the Venise tutorial.
I generated the Street and the Buildings using the Venice Street.cga rules.

Everything worked perfect. The only thing that is not correct is the texture that should be mixed with the streets and buildings textures.
I placed the texture manually "below" the city model, not really precise. But I don't know how to input the X and Z offset of the Texture in the rule.

I know that is not the decent way to do this. I don't know what is ArcMap. Do I have a possibility to properly place the texture with Latitude and Longitude ?
How do I input the correct scale and offset of the texture in the cga rule ? 

Here's a pic :
[ATTACH=CONFIG]15145[/ATTACH]

Thank's a lot for any help, suggestion, advice 🙂
Tags (2)
0 Kudos
2 Replies
MatthiasBuehler1
Deactivated User
hi !

interesting project.



if you have placed your terrain manually ( which I usually think IS precise enough ! ) and then want to use the same terrain 'extent' ( size and offset ) for use in CGA for texturing purpose, use the following code and enter your specific terrain values :

you can use it of course for texturing roofs or e.g. Streets, ..


a note on the code : An other user of this forum found that using a projection with world.xz produces OpenGL texture flickering with geolocated scenes because of the high UV-coordinates. this version here keeps the UVs in the 'zero-to-one-space', thus without flickering.

satellitePic = "data/basemap/Philly_basemap3.tif"

xS = 1519.035
zS = 1411.032
xO  = 819715.793
zO  = -73249.384


xWorld = convert(x, scope, world, pos, 0, 0, 0)
zWorld = convert(z, scope, world, pos, 0, 0, 0)

Lot -->
 alignScopeToAxes()
 setupProjection(0, scope.xz, xS, -zS, -(xWorld - xO) , -( zWorld - zO) )
 projectUV(0)
 texture(satellitePic)
 Shape.



a tip would also be to use the 'dirtMap' channel ( UV set 2 ) and an adapted satellite picture (photoshopped to a brighter version), which then is multiplied over the standard color channel of e.g. the standard roof texturing. that way, you can add some 'realworld details' onto otherwise (too) simply textured models.

please note that using multiple UV networks in your materials, you need to be able to port that information to softimage. the standard export formats such as 3ds or obj do NOT support this ( BASIC version ! ). thus, you may need to set this up in softimage afterwards, if you need this behavior. but if you use just an altered version of your satellite picture to texture (just using UV set 0) e.g. the roofs, you will be fine of course.


btw : cool demo reels you have on your site ! nice work !
0 Kudos
olivierjeannel
New Contributor
Hey Matthias 🙂
Thank's a ton for the sample code !
The order for the basic version is on the way, spoke to the guys at Esri France this evening. Should get my official license in a few days 🙂

I will get my hands dirty during the weekend, or monday, since I know better what wants the client. We should go with the city of Avignon.

Maybe it is possible to simply export the texture as a ground object (obj). Then in Softimage,  I could regenerate the texture projection (UV). I'll have to test this.

Ok, will let you know.

Thanks again for that first speak,

Take care,

Olivier
0 Kudos