Other way around !!
I meant deforming the terrain to accomodate the prop mesh, using the brush size (or 1/2 brush size) to figure how many verts on either side of the prop to slope the terrain to meet the prop. The prop in question is almost as large as the terrain, so hand editing is very time consuming.
like this:
Cast a ray vertical up and down from each terrain vert to test intersect with the prop, if intersect mark that vert, and all 8 adjacent verts as being under the prop. Set all these verts to altitude of prop. (optional: if the prop has sections with varying altitude, handle the offset from base altitude of the prop to the altitude of the actual intersection and bring the terrain right up under the raised portion of the prop)
Scan all terrain verts, if they are within 1/2 brush of a vert under the prop, figure the distance to the nearest covered vert and set altitude according to (average of brush edge verts not under the prop) averaged with prop altitude (or something like that to make a slope up/down that converges with the terrain outside the brush, you may have some better ideas how to make that happen)
I could probably do it in the modeling software, but I'm spending way to much time in the modeler, instead of in the editor writing code :) It's gotten to the point where I know more about high end 3D modeling software than my artists do, but I still suck at the creative stuff -- they work in Poser, not 3DS/Maya/Truespace :)
I meant deforming the terrain to accomodate the prop mesh, using the brush size (or 1/2 brush size) to figure how many verts on either side of the prop to slope the terrain to meet the prop. The prop in question is almost as large as the terrain, so hand editing is very time consuming.
like this:
Cast a ray vertical up and down from each terrain vert to test intersect with the prop, if intersect mark that vert, and all 8 adjacent verts as being under the prop. Set all these verts to altitude of prop. (optional: if the prop has sections with varying altitude, handle the offset from base altitude of the prop to the altitude of the actual intersection and bring the terrain right up under the raised portion of the prop)
Scan all terrain verts, if they are within 1/2 brush of a vert under the prop, figure the distance to the nearest covered vert and set altitude according to (average of brush edge verts not under the prop) averaged with prop altitude (or something like that to make a slope up/down that converges with the terrain outside the brush, you may have some better ideas how to make that happen)
I could probably do it in the modeling software, but I'm spending way to much time in the modeler, instead of in the editor writing code :) It's gotten to the point where I know more about high end 3D modeling software than my artists do, but I still suck at the creative stuff -- they work in Poser, not 3DS/Maya/Truespace :)