LDraw.org Discussion Forums

Full Version: Problem between Pov and Sticker part
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I faced another problem between Pov-ray and Sticker.

Look at the picture, please.

The first is a screen shot in LDview and the second is a rendered image by Pov-Ray 3.7RC3.

[Image: a0111809_4ed2d2da09045.png]

[Image: a0111809_4ed2d2d925820.png]

I can see sticker pattern in LDview but can't see it in the picture that is rendered by Pov-Ray.

Pov file was made by L3P 1.3.

If anybody know about this problem, let me know, please.

Thanks for reading.

KWON
What are you using to convert? ldview export?

Tim
Thanks for comment. Smile

I used L3P v1.3 or LDview 4.1 export function to convert LDR file to POV file.

I also used POV-RAY v3.6.2, v3.7RC3 and MEGAPOV v1.2.1. to render POV file.

But both POV file has brought the same results in all Pov-Ray rendering.

Here is the sticker files that I used as reference.

8110 Sticker 1

8110 Sticker 2

KWON
Could you make the POV file available please Smile

Maybe make a small example MPD file just a couple of (simple) stickers embedded and the POV file for that. Since the error seems to occur for simple stripes those would seem best.

Tim
Tim Gould Wrote:
-------------------------------------------------------
> Could you make the POV file available please Smile
>
> Maybe make a small example MPD file just a couple
> of (simple) stickers embedded and the POV file for
> that. Since the error seems to occur for simple
> stripes those would seem best.
>
> Tim


I don't know much about program code.

I attached some files that was made by LDview and L3P and contain only two stickers.

Look at this file and let me know what I should do, please.

I also guess that it might come from incorrect installation.

Thanks.

KWON
I've been experiencing this problem here as well.
POV Export from LDView did not work for stickers 0.25 LDU thin.
The reason was that LDView added a 0.5 seam between bricks to show the gaps:
#declare LDXSW = 0.5; // Seam Width (0 for no seams)
Sadly, the formula used to create the seams just works for bigger bricks, but not for stickers 0.25 LDU thin.
You can confirm this by changing the above line to
#declare LDXSW = 0;
Then your stickers will show correctly.
Sadly, I forgot whether I've reported this problem to Travis already or if a fix is already available.

I think that L3P may have a similar problem.
Weird. I tried with LDView export, looks like POV "sees through" the stickers...
Attached the test file with 3 stickers. The one that renders right is mirrored in Y direction!!! I hope people with better rendering knowledge will be able to explain...
LDView image:
[Image: ldviewimage.png]
POV render:
[Image: povrender.jpg]
Thanks Steffen!
Indeed it solves the problem. Seam is set to 0.5 in LDView export, even if you uncheck "Seam width" and/or set width=0. You have to edit POV file (tested with LDView 4.1).
Hi,

I know what the problem is. POVray sees the two sides as overlapping due to its precision not picking them as different (0.25 is too close apparently).

I suspect there's a solution in POVray settings (maybe) but I couldn't work it out.

The simple solution is just to comment out the backside of the stickers in POVray. In L3p conversion this is simple to do. Just put:

// before the line object { box5_dash_12_dot_dat matrix <...> }

It's a little more complicated in LDview so some fiddling may be required. I've attached my version for you to check.

Tim
> I know what the problem is. POVray sees the two
> sides as overlapping due to its precision not
> picking them as different (0.25 is too close
> apparently).
>
I don't think it's a precision problem (or we wouldn't get the mirror effect). As suggested by Steffen, the seam width > thickness effectively turns the sticker inside out.
If by any chance all the parts in your model can be replaced by LGEO ones, you can get rid of seams. It looks like L3P doesn't apply seam for LGEO parts (you can still see the limit between parts because they have rounded edges). I'm not sure Ldview handles the LGEO library but this can be a temporary solution while waiting for a fix.
Oh how stupid of me. I missed the second matrix operation and just assumed that it had to be rounding.

Tim
I won't swear to it but I think if you replace

Code:
#macro LDXSeamMatrix(Width, Height, Depth, CenterX, CenterY, CenterZ)
...
#end

by

Code:
#macro LDXSeamMatrix(Width, Height, Depth, CenterX, CenterY, CenterZ)
#local aw = 1;
#local ah = 1;
#local ad = 1;
#local ax = 0;
#local ay = 0;
#local az = 0;
#if (Width > LDXSW)
#local aw = 1-LDXSW/Width;
#end
#if (Height > LDXSW)
#local ah = 1-LDXSW/Height;
#end
#if (Depth > LDXSW)
#local ad = 1-LDXSW/Depth;
#end
#if (Width > LDXSW & CenterX != 0)
#local ax = LDXSW/(Width / CenterX);
#end
#if (Height > LDXSW & CenterY != 0)
#local ay = LDXSW/(Height / CenterY);
#end
#if (Depth > LDXSW & CenterZ != 0)
#local az = LDXSW/(Depth / CenterZ);
#end
matrix <aw,0,0,0,ah,0,0,0,ad,ax,ay,az>
#end

It should fix the problem too while giving you correct seamwidths for other parts.

Basically that ensures that any direction smaller than the seam width won't be transformed.

Tim
It's work Smile

Thank you ve~~~~~ry much much ^0^

KWON
I can render 8110 correctly at last.

Thanks again Smile

[Image: a0111809_4ed3aef41ad45.jpg]

[Image: a0111809_4ed3aef3956a8.jpg]
Whoops.

Noticed a mistake. The previous code may have given errors sometimes. Updated version should be fixed.

Tim
would you like to post the file(s) here?

I think the fix is quite simple, just the seams addition algorithm needs
to be extended to deal with very thin parts ;-)

glad I was able to help,
and thanks to Tim for so quickly coming up with a solution;
will checkout your correction when I find some time
oh, sorry, maybe a better place to post the model is http://forums.ldraw.org/list.php?17
Steffen Wrote:
-------------------------------------------------------
> oh, sorry, maybe a better place to post the model
> is http://forums.ldraw.org/list.php?17


Yes, I do Smile

http://forums.ldraw.org/showthread.php?tid=1622
cool :-D
I tried SW=0.25 and it's work Smile

but when SW became 0.26 then decal was disappeared.
See here for an updated LDView build that includes Tim's fix. Please note that it is a build of my development source code, so hasn't received the level of testing that an official release does. On the other hand, it also has all the features set to go into the next official LDView release.