Idea for plugin: Bump Map From Geometry
-
I just did a quick test. Results:
-
You don't get any resulting entities passed when exploding an image. Workaround: add the image to a disposable group, explode the image inside the group, then explode the group and collect the results (exploding a group or instance does return results).
-
The exploded image will be projected (as expected - duplicates the manual behavior)
So, scripting this is good to go. All I would add is creating a new "Bump Map" style and a "Bump Map" orthagonal top-down scene tab with that style applied.
-
-
TIG - good suggestion
I may have some time this weekend to knock something out.
-
We created a prototype of a routine to generate a bump map from SketchUp geometry and showed it to some folks at SketchUp about two years ago.
Our idea was to create bump maps of background geometry - say windows and other detail on buildings in the background, so that the geometry could be rendered as a bump map using fewer polygons in the model.
-
@rickw said:
I just did a quick test. Results:
- You don't get any resulting entities passed when exploding an image. Workaround: add the image to a disposable group, explode the image inside the group, then explode the group and collect the results (exploding a group or instance does return results).
- The exploded image will be projected (as expected - duplicates the manual behaviour)
So, scripting this is good to go. All I would add is creating a new "Bump Map" style and a "Bump Map" orthogonal top-down scene tab with that style applied.
I recommend this slightly different way:
Insert the image [from file] and rotate/scale-transform it [using model.bounds maxZ-minZ+~1% for its 'height' and putting the image's bottom at minZ, 90 degrees etc]...
Add a group to the model: group=model.entities.add_group(image).
Explode the image inside the group and leave it there - don't explode the group itself - if you do some of its raw geometry edges might clash with the model's edges on their final erasure.
So, find the group's only face: group.entities.each{|e|face=e if e.typename=="Face"}.
Get the face material - material=face.material
Do the material changes to the model [global material changer et al] as needed.
Set up an appropriate scene and style.
Finally erase the original image's group to tidy up - having avoided raw geometry clashes...Presumably the new 'Bump Map' style will have no edges, no shadows, no fog etc.
The top scene+zoom_extents is relatively easy to do [for you]...Waiting for your solution with considerable interest...
-
wow, thats quite interesting, Hart
-
Has that made it past prototyping?
-
Send me a model you want to try, and I will create a sample bump map.
I will run the bump map through IRender nXt, and perhaps you can show what it does with another rendering or Photoshop rendering.
-
Hey i just found this thread in my search for an easy and effective way of generating a gray-scale height-map from a Google sketch up terrain, for importing into a sandbox editor such as unity or the cryengine. I was enjoying the thread so far but it seems to have gone dead, has it moved else where.?
Al Hart will you be making your plugin available.? -
Upload a sample model, and I will see if I can find the utility to create a bump map. The model should be just the terrain, because I create the bump map by rendering the model from a top view, retaining the Z-values, and then using them to create the bump map.
Advertisement