|
 |
I have a scene that is made up of dozens of nested objects. Here is the
top-most layer:
//// Model datsville_master.ldr
#ifndef (datsville__master_dot_ldr)
#declare datsville__master_dot_ldr = union {
// Datsville
// Name: datsville.ldr
// Author: John VanZwieten, Michael Horvath, Tore Eriksson
// !LICENSE Redistributable under CC BY-SA version 3.0 : see
https://creativecommons.org/licenses/by-sa/3.0/
// Unofficial Datsville Model
// ROTATION CENTER 0 0 0 1 "Custom"
// ROTATION CONFIG 0 0
// 1 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_blocks_base.ldr
object { layer__blocks__base_dot_ldr matrix <1,0,0,0,1,0,0,0,1,0,0,0> }
// 1 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_streets_base.ldr
object { layer__streets__base_dot_ldr matrix <1,0,0,0,1,0,0,0,1,0,0,0> }
// 1 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_river.ldr
object { layer__river_dot_ldr matrix <1,0,0,0,1,0,0,0,1,0,0,0> }
// 1 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_blocks_overlay.ldr
object { layer__blocks__overlay_dot_ldr matrix <1,0,0,0,1,0,0,0,1,0,0,0> }
// 1 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_streets_overlay.ldr
object { layer__streets__overlay_dot_ldr matrix <1,0,0,0,1,0,0,0,1,0,0,0> }
// 1 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_traffic.ldr
object { layer__traffic_dot_ldr matrix <1,0,0,0,1,0,0,0,1,0,0,0> }
// 16 0 0 0 1 0 0 0 1 0 0 0 1 layer_terrain.ldr
}
#end // ifndef (datsville__master_dot_ldr)
Is there any way in POV-Ray to "walk" down the tree and get the name of
every one of these objects? I'm guessing there is not since I've not
heard of anyone ever doing this.
Thank you.
Michael
Post a reply to this message
|
 |
|
 |
Le 2020-02-16 à 18:26, Mike Horvath a écrit :
> [Sorry for the double post. This is the second time Thunderbird has
> messed up on me recently.]
>
> I want to create an imagemap with hotspots based on the following
> POV-Ray scene:
>
>
https://mjhorvath.github.io/Datsville/docs/high-resolution-render/high-resolution-render.html
>
>
> I was wondering if there were maybe some way of automating the process,
> by outputting the outlines of the objects that I can later vectorize in
> Illustrator or Inkscape?
>
> I know someone made a vector outline tool for Blender, but I'm not sure
> how it works, or if it works _well_ at all.
>
> Any ideas? Thanks so much!
>
>
> Michael
If you can render the objects separately, you can get a silhouette by
rendering the object with finish{ambient 0 diffuse 0} against a white
background. Or, render with +q0, a black pigment and a white background.
If you want a white object against a black background, then, you can use
this:
pigment{rgb 1}finish{emission 1}
Or, +q0, a white pigment and black background.
For both options, you don't need any light.
Then, in Inkscape, you can use that image to generate that outline. You
may also use a contour filter as another way to get a line around the
object.
Only work for the object seen from a specific direction.
Post a reply to this message
|
 |
|
 |
Yes! This is what I ended up trying. However, there are over 100
buildings, so I wonder how big the SVG will get in the end. Also, I am
continually updating the scene, so I really need some way to automate
the process so I don't have to repeat all this work each time. I am not
sure Inkscape can be run from the command line, or what other tool I
might use instead.
Thanks!
Michael
On 2/17/2020 4:20 PM, Alain Martel wrote:
> If you can render the objects separately, you can get a silhouette by
> rendering the object with finish{ambient 0 diffuse 0} against a white
> background. Or, render with +q0, a black pigment and a white background.
> If you want a white object against a black background, then, you can use
> this:
> pigment{rgb 1}finish{emission 1}
> Or, +q0, a white pigment and black background.
>
> For both options, you don't need any light.
>
> Then, in Inkscape, you can use that image to generate that outline. You
> may also use a contour filter as another way to get a line around the
> object.
>
> Only work for the object seen from a specific direction.
Post a reply to this message
|
 |