LDraw.org Discussion Forums
Problem between Pov and Sticker part - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: Rendering Techniques (https://forums.ldraw.org/forum-20.html)
+--- Thread: Problem between Pov and Sticker part (/thread-1567.html)



Problem between Pov and Sticker part - Oh-Seong KWON - 2011-11-28

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


Re: Problem between Pov and Sticker part - Tim Gould - 2011-11-28

What are you using to convert? ldview export?

Tim


Re: Problem between Pov and Sticker part - Oh-Seong KWON - 2011-11-28

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


Re: Problem between Pov and Sticker part - Tim Gould - 2011-11-28

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


Re: Problem between Pov and Sticker part - Oh-Seong KWON - 2011-11-28

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 experience the problem here as well - Steffen - 2011-11-28

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.


Re: Problem between Pov and Sticker part - Philippe Hurbain - 2011-11-28

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]


Re: I experience the problem here as well - Philippe Hurbain - 2011-11-28

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).


Re: Problem between Pov and Sticker part - Tim Gould - 2011-11-28

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


Re: Problem between Pov and Sticker part - Philippe Hurbain - 2011-11-28

> 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.


Re: Problem between Pov and Sticker part - Damien Roux - 2011-11-28

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.


Re: Problem between Pov and Sticker part - Tim Gould - 2011-11-28

Oh how stupid of me. I missed the second matrix operation and just assumed that it had to be rounding.

Tim


Re: I experience the problem here as well - Tim Gould - 2011-11-28

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


Re: I experience the problem here as well - Oh-Seong KWON - 2011-11-28

It's work Smile

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

KWON


Re: I experience the problem here as well - Oh-Seong KWON - 2011-11-28

I can render 8110 correctly at last.

Thanks again Smile

[Image: a0111809_4ed3aef41ad45.jpg]

[Image: a0111809_4ed3aef3956a8.jpg]


Re: I experience the problem here as well - Tim Gould - 2011-11-28

Whoops.

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

Tim


wow, that's an impressive render - Steffen - 2011-11-28

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


Re: wow, that's an impressive render - Steffen - 2011-11-28

oh, sorry, maybe a better place to post the model is http://forums.ldraw.org/list.php?17


Re: wow, that's an impressive render - Oh-Seong KWON - 2011-11-28

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


Re: wow, that's an impressive render - Steffen - 2011-11-28

cool :-D


Re: I experience the problem here as well - Oh-Seong KWON - 2011-11-29

I tried SW=0.25 and it's work Smile

but when SW became 0.26 then decal was disappeared.


Re: I experience the problem here as well - Travis Cobbs - 2011-11-29

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.