Fake seams in POV-Ray


Fake seams in POV-Ray
#1
Anyone knows of an alternative way of faking part seems in POV-Ray besides shrinking all part just slightly?

I added the shrinking option to LDCad's export it looks nice at first glance but then you'll notice the uneven scaling.

For example 5510, the 2x8 plate at the red circle no longer matches the inverted slope brick beneath it.

   

This is using a scaling of 0.9925

edit: added a zoom
   
Reply
RE: Fake seems in POV-Ray
#2
(2017-02-08, 23:08)Roland Melkert Wrote: Anyone knows of an alternative way of faking part seems in POV-Ray besides shrinking all part just slightly?

I added the shrinking option to LDCad's export it looks nice at first glance but then you'll notice the uneven scaling.

For example 5510, the 2x8 plate at the red circle no longer matches the inverted slope brick beneath it.



This is using a scaling of 0.9925

edit: added a zoom

LDView calculates the scaling on a part-by-part basis based on the part's bounding box size in X, Y, and Z, and the bounding box's centroid. For POV exports, the actual seam calculation happens in the POV code based on width, height, and depth, and X, Y, and Z that are calculated by LDView at export time. (See LDXSeamMatrix in any POV file created by LDView.) I believe this concept was copied (with blessing from Lars) from L3P. Note that this means that the actual seam size is consistent between any two parts, no matter their size, and the scaling applied to each part is independent in X, Y, and Z. If you set LDXSW to a large value, you can easily see on plates that the scaling is axis-dependent.
Reply
RE: Fake seems in POV-Ray
#3
Here is a zoom in of one of LDView's sample models with a relatively large seam width value (0.75):

[Image: KO5cPyu.png]

Here is most of the model, but with a ridiculously large seam width value (10);

[Image: pn4fzfm.png]
Reply
RE: Fake seems in POV-Ray
#4
(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):

[Image: KO5cPyu.png]

Here is most of the model, but with a ridiculously large seam width value (10);

[Image: pn4fzfm.png]

You can use LGEO, as there are rounded edges, you no longer need seams. Drawback is that not all parts are available in LGEO.
Reply
RE: Fake seams in POV-Ray
#5
(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):


Here is most of the model, but with a ridiculously large seam width value (10);
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).

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 Smile
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.
Reply
RE: Fake seems in POV-Ray
#6
(2017-02-09, 8:11)Damien Roux Wrote: You can use LGEO, as there are rounded edges, you no longer need seams. Drawback is that not all parts are available in LGEO.

LGEO is next on my todo list Smile

Just need to (re)familiarize myself with the multiple libraries and their inner workings as I haven't really used it myself.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 7 Guest(s)