Page 1 of 1

generate a model FROM a heightmap?

Posted: Fri Sep 07, 2007 11:45 pm
by zaroba
i guess this is more to fooli then anybody else.

is it possible to generate a model from a heightmap?

if so, this might be a good method to making alot of nice vehicles and buildings

draw a greyscale car from the side, then convert it to a model, and mirror it to make a whole car.

Posted: Fri Sep 07, 2007 11:59 pm
by Fooli
Er.... um.... what a truly bizarre request :)

Ok, well... yes, I've seen programs that'll take a heightmap (for landscape purposes) and squirt out a 3d mesh the other end. That's pretty straightforward if you're just thinking about landscapes: heightmap information, as you know, is just height above zero. And in theory, I guess you could use that to create simple building and vehicle shapes in just the same way.

But... you'd only be able to do that using information in the height axis... no indented door panels, windows etc... and if you were going to go to all that trouble, just to create (a cuboid building, a simple car outline etc) then I suspect it'd be quicker just to build it in 3d in the first place.

Now, there are very clever programs that'll take a 2d image (photo, drawing etc) and convert that into 3d. But that's all very clever and either not available commercially (like, academic research programs - my fave is one that'll analyse video of things walking and running, and create the skeleton for you) or horrendously expensive ;)

Happy to be proved wrong... but I think this is "wouldn't it be cool if I could go to work on a hoverboard" sort of territory :)

f

Posted: Sat Sep 08, 2007 12:16 am
by zaroba
well now...for the indented doors, windows etc, you'd just have to define that in the heightmap. afterall, who says it has to be only 256x256?


right after posting the topic, i did find a program designed for anim8or that can convert heightmap images to models. it should be pretty useful for making the buildings for sabrada that can be walked threw, since they mainly are just walls. although its not to useful when it comes to conserving polys.

Posted: Sat Sep 08, 2007 12:34 am
by Fooli
erm.... my point is, this:

Image

Heightmaps are 2d. 3 models, well they're 3d aren't they :) You could only achieve detail in one axis at a time - the height axis.... so with a heightmap like the top left of this image, you'd end up with a building like so. Which'd be trivial to make in 3d in the first place, with the added benefit of being able to add detail to the sides and so on, as well.

f

/edit: One thing bitmaps can be good for, in a 3d sense, is displacement... with the right program you can use 2d images to affect a 3d mesh, which can be useful. And some heightmap programs use more than greyscale, which lets them do clever things like caves and so on. But if you're looking for a 3d model, well... that's what 3d progs are for I reckon :)


/edit edit: I did ask mit about using multiple heightmaps to create walls, roads etc. He said it wouldn't be hard, but that was several months ago... basically I wanted to use a bitmap to outline an arena, which sounds sort of similar to what you're doing. Using two heightmaps would make that pretty simple.

Posted: Sat Sep 08, 2007 12:41 am
by zaroba
i was thinking more along the lines of:

Image

converted to heightmap, and cropped to remove the top and bottom empty spaces (and stretched since i used the wrong dimensions), results in:

Image


although not a greyscale image, the model of it isn't that far off from replicating the original car despite that the side view mirrors, tires, and interior would need to be manually modeled. if it was a true heightmap reference of the side of the car i'm sure it'd look quite a bit better, plus you could have it a good distance off the surrounding empty space to make it easy to crop off the excess polys.



as for buildings, you could use a top down view to model them from the roof to the ground.

Posted: Sat Sep 08, 2007 1:08 am
by Fooli
Well, good luck. It won't work, but good luck anyway :)

To explain... look at the car model. The "heightmap" version you've got there, that's just what you'd get if you embossed the image, or something, in a paint program. And you'd end up interpreting shadows as height, so you'd have to remodel almost all of it. Take, for example, that little dink just to the right of the front wheel. It's a little 3d bump - the indicator, perhaps, I dunno - but the point is, the bottom of it in the heightmap is very dark... it'd be very "deep" compared with the body panel it sits on. But actually it isn't - it's only slightly deeper than the highest bit of the dink. You'd need to remodel that. And the same goes for all the shadowed/highlighted parts of the model. Yes it'd look fine as a 3d model if you looked at it side on, but in true 3d, it'd be so broken you'd be better off just building it from scratch. I reckon, anyway.

The same applies to doing a top down building model. As in my simple example above. You couldn't model it from the roof to the ground: all you could model was the roof, and even then, only if all the detail was in the height axis. It just won't work. But prove me wrong if u like: )
f

Posted: Sat Sep 08, 2007 1:34 am
by zaroba
lol, you almost sound like you want me to :P


hmm...misworded the pics a bit.
the top pic was the actual pic used to make the model which is the 2nd pic.

the model, even after cropping off all the flat surface around the car, was about 51k polies in the model converter. so unless a highly detailed heightmap of a car can be drawn in an area of less then maybe 100x100 pixles, cars wouldn't be made with any polygon limit the game could handle. was worth a shot though.

Posted: Wed Oct 17, 2007 10:56 am
by Malkiah
Zar, all 3D Software uses a effect called "Noise" in which it pretty much does what the Game Engine in TU does to generate a map from a heightfield essentially by bouncing noise through it. Really thats all the intention is in 3D Software, an extremely quick way of modeling landscape for a scene. In relative theory you could model other things, but results will dramatically vary outside the use of landscape purposes.

Posted: Wed Oct 17, 2007 6:29 pm
by Jayecifer
Try zbrush, mudbox, and a bunch of other stuff that will be equally as expensive..