Question about heightmap interpolation

4171
7
01-07-2014 05:05 AM
KimPossible
New Contributor
Hi there,

I'm using the cityengine trial and trying to figure the software out and whether or not it's something we can use.

We want to use the program to create streets and fill out the city with procedural buildings with a custom landmass.

What I did was map the landmass with a gradient and render out an orthographic top-view to create a heightmap, then used the heightmap to create terrain in cityengine. However, the terrain is very stepped and not smooth. The image below shows that.

[ATTACH=CONFIG]30313[/ATTACH]

3ds Max on the left, Cityengine on the right.

I've tried using a TIF, a png, jpeg, targa, everything with different bit depths for the heightmap. I've read that 16-bit tiff is the best for this application, but it's yielding the same results no matter what image format I use.

The terrain is rather tall and this sort of thing doesn't seem to happen, or at least not be so pronounced, when the terrain is shorter but that's not a possibility for our project.

I'd like to know if there's some way to fix the stepping problem or if it's a trial thing or what, because I'm totally stumped.

Thanks in advance for the help!
Tags (2)
0 Kudos
7 Replies
MatthiasBuehler1
Frequent Contributor
Hi !

Try a standard 32 bit RGB as displacement map ( heighmap ).

Also, when you have the terrain selected, check the Subdivision U and V settings in the Inspector.

Btw. What's the polycount of the original MAX terrain and what's the final rendered displacement map ?

Lemme know ..

matt
0 Kudos
KimPossible
New Contributor
Hi !

Try a standard 32 bit RGB as displacement map ( heighmap ).

Also, when you have the terrain selected, check the Subdivision U and V settings in the Inspector.

Btw. What's the polycount of the original MAX terrain and what's the final rendered displacement map ?

Lemme know ..

matt


Thank you for replying, Matt!

I went ahead and tried a 32-bit png, but Max only offers options for 24 and 48 in RGB. Neither work for me. I tried a 32-bit tiff, but that for some reason produced a flat terrain with no curves at all. I thought that may be a problem with the resolution of the terrain, but it was at 1024x1024, so that wasn't the issue. To clarify, that's the u and v of the terrain. The images I'm using for heightmaps are all 4096 squared, with the exception of one 2048 squared I tried to see if it made a difference. No dice 😕 Any particular image format suggestion?

I generally test the terrain with a u and v of 2048x2048. Going down to a lower resolution like 128x128 seems to help with the shape of things, but then deformation when placing streets is wonky. Huge chunks of land inflate for just one street, and that's not what we need, unfortunately.

To answer your last question, the landmass in max has just shy of 300,000 polys and the exported heightmap images are all 4096x4096.

Thank you for helping me troubleshoot, I really appreciate it. If we can get cityengine working for us, it would save hundreds of hours!

EDIT: Here's the 48-bit png in case you might have time to test it? Maybe it's just my configuration.

EDIT 2: Nevermind, for some reason I can't edit that image in. It uploads, then does nothing.
0 Kudos
KimPossible
New Contributor
https://www.mediafire.com/?m5cpe81pxfbwa8d

there's the heightmap for download.
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hey Kim,

Please read this ..
http://forums.arcgis.com/threads/54072-textures-raster-files-concepts-in-CityEngine-ArcGIS

--> CityEngine does not handle textures larger than 4000x4000px ( not 4K ). That was decided quite some time ago, since usually people use many ( sometimes hundreds ) of textures, and they all must fit in the GPU memory. Exchanging lower res textures with the final resolution can easily be done, so I'd not recommend to use anything bigger than 2K in general.

Now, the terrain is obviously a special case, since you want to have a certain resolution which drives the resulting geometry. But also here, I'd recommend to rather use an approximated terrain and replace this before render time with the full resolution.

--> Sadly, CityEngine is a bit limited still 'on the terrain side of things'.

Does that help to understand the situation ?

Maybe if you describe a bit what you guys and girls are planning to do, I can give some more pointers.

Let me know ..

Matt
0 Kudos
KimPossible
New Contributor
Hey Kim,

Please read this ..
http://forums.arcgis.com/threads/54072-textures-raster-files-concepts-in-CityEngine-ArcGIS

--> CityEngine does not handle textures larger than 4000x4000px ( not 4K ). That was decided quite some time ago, since usually people use many ( sometimes hundreds ) of textures, and they all must fit in the GPU memory. Exchanging lower res textures with the final resolution can easily be done, so I'd not recommend to use anything bigger than 2K in general.

Now, the terrain is obviously a special case, since you want to have a certain resolution which drives the resulting geometry. But also here, I'd recommend to rather use an approximated terrain and replace this before render time with the full resolution.

--> Sadly, CityEngine is a bit limited still 'on the terrain side of things'.

Does that help to understand the situation ?

Maybe if you describe a bit what you guys and girls are planning to do, I can give some more pointers.

Let me know ..

Matt


Hello again Matt, and thanks for the insight. I didn't know such restrictions existed, but it's easy enough to work within them. So I tried downconverting an 8k, 48-bit tiff down to 2k, 32-bit in Photoshop. I also tried exporting from 3ds Max directly a tiff at 2k, 32-bit. Unfortunately, this made no difference. The terrain is still stepped. If this is something that's going to happen with cityengine, it might not be for us right now. But we're really into the idea, and hopefully this will be advanced by the time we absolutely need the world geometry. If not, then next project perhaps.

But in the event knowing more about our project might help, I'll expand. We're creating a game in which the player will visit key areas of an island landmass. The island is inhabited and has cities similar in density to Los Angeles. We want to put streets with sidewalks in the parts of the city the player can visit in full detail and handcraft the buildings in those areas. We also need low-poly streets, trees, and buildings to fill out the surrounding areas the player will be able to see from high areas. That's what we need cityengine for, to cut streets in the terrain and fill out the city with procedural buildings so it doesn't appear so bland. We can't get the terrain to deform under the streets without cityengine, but we can't get a good handle on a smooth terrain with it. Rock and a hard place. Our only other option is to cut out streets with spline shapes in Max and hand-smooth them, then hand-paint textures. That's the biggest thing. We can come up with a procedural solution for low-poly distance buildings and place them ourselves, but cityengine would save a lot of time for that as well.

Thanks for reading! Looking forward to see what you've got for us!
0 Kudos
MatthiasBuehler1
Frequent Contributor
Hi,

can you PM me your mail address, then I can try your texture here ..



Concerning the game project:

Not sure if you've seen this already, but I've done about 80% of the design and game assembly work in this demo here:


Concerning smooth terrains:
Yes, CE is still limited in that regard, but in general ( independent of any tool ), I'd not hold on to a given baby-butt-smooth terrain model with nice topology, since after a certain design process, the terrain WILL have changed and all the precise-detail-work will only have taken a lot of time. Precision usually kills creativity and only consumes time.

Thus, for work in CE, I'd recommend you import a very crude base terrain ( 200 x 200 subdivisions ) and for the beginning only work on crude layouts ( check out the 'Medieval Town Example' that I've created quite some time ago ) and how the terrain is created there. Yes, I did use a terrain object there as a base, but the main part of the terrain I built only with the 'Dynamic City Layouts' tools.

There's many things that I could tell you here, I guess .. 😉

But in short: There's NO other tool available that let's you create cities more efficient than CityEngine. Not even Houdini, since it has no Architecture-specific tools, such as CGA or the 'Dynamic City Layouts'. Though level-creation is very interesting in Houdini :
e.g.

or
http://www.sidefx.com/index.php?option=com_content&task=view&id=2211&Itemid=68


If I had to do your task, I'd try to combine different approaches ..

matt
0 Kudos
by Anonymous User
Not applicable

Matt!

I can't see your post for the video game. It is a big white space for me. Anyone else seeing his post as just text?

I want to see the game! 

Chris

0 Kudos