RE: Fake seams in POV-Ray
2017-02-09, 18:39 (This post was last modified: 2017-02-09, 19:45 by Roland Melkert. Edit Reason: improvement to prevent stickers from disapearing. )
2017-02-09, 18:39 (This post was last modified: 2017-02-09, 19:45 by Roland Melkert. Edit Reason: improvement to prevent stickers from disapearing. )
(2017-02-08, 23:56)Travis Cobbs Wrote: Here is a zoom in of one of LDView's sample models with a relatively large seam width value (0.75):Thanks Travis, I figures something like that was hoping for some alternative (been thinking about merging bevels somehow, but don't know how to do that universally).
Here is most of the model, but with a ridiculously large seam width value (10);
I've added the 3 axis scaling method, works great.
Using a 0.3 seam (0.15 both sides of any brick)
Using 2.0 seam
Was fairly simple to do, just added min max vectors to the mesh2 objects as local objects:
Code:
#declare sf_3703_dot_dat=mesh2 {
#local sfMin=<-160,-4,-10>;
#local sfMax=<160,24,10>;
vertex_vectors {
......
}
#if (doSeams) sfSeam(sfMin, sfMax) #end
#end
And the scaling itself is just a couple of vector operations
Code:
#macro sfSeam(sfMin, sfMax)
#local s=sfMax-sfMin;
#local c=sfMin+0.5*s;
#local ss=<
#if (s.x<=seamSize) 0.0 #else seamSize #end,
#if (s.y<=seamSize) 0.0 #else seamSize #end,
#if (s.z<=seamSize) 0.0 #else seamSize #end
>;
translate -c
scale (s-ss)/s
translate c
#end
Thanks again for the insight.