LDraw.org Discussion Forums

Full Version: Creating stickers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(2018-08-27, 20:31)Roland Melkert Wrote: [ -> ]
(2018-08-27, 19:30)Knud Ahrnell Albrechtsen Wrote: [ -> ]thanks
does it have a problem with whitespaces?
when i try to export LDCad creates the folder but then shuts down without creating the pov file.

For the pov export all needed png's are copied into the pov export destination using generated names so spaces should not matter.
But if LDCad crashes during the export it might be the cause of it on that side, I'll have to look into this some more.
It would help me, if you send me your model so I can test it myself using similar input.

You can prevent the space in folder names by using relative filenames only (place the png in the same folder as the .dat)
Hi Roland
It helped copying the png files to the same location as the dat file.
Then I tried exporting the model using the below settings.
[Image: ldcad_povray_export.png]

Then I commented out this line in the generated file for better comparison:
//background { color srgb 0.4 }
After rendering the stickers are show so that is great but I am not happy with the result in the colors.
try comparing the DBG with my export from LDView 4.2 (without sticker)
I think the DBG looks very "flat" compared to mine??
Any idea why it looks like this??
[Image: dsb_mk601_ldcadrender.png]

[Image: dsb_mk601_myrender.png]
(2018-08-28, 5:16)Knud Ahrnell Albrechtsen Wrote: [ -> ]After rendering the stickers are show so that is great but I am not happy with the result in the colors.
try comparing the DBG with my export from LDView 4.2 (without sticker)
I think the DBG looks very "flat" compared to mine??
Any idea why it looks like this??

Not sure could be a couple of things, like:
- Light position
- Camera position (you can't really compare to different views)
- LDCad using srgb and LDView using rgb (I think) in the .pov.

You can tweak the colors by copying the
default
folder to e.g. "MyColors" in
%appdata%/LDCad/povray
Then edit its colors.pov to suit your needs.
In the export dialog select "myColors" in the "code donor" field.

You can then also disable the background, you edited out, by default in globalSettings.pov
(2018-08-28, 16:16)Roland Melkert Wrote: [ -> ]
(2018-08-28, 5:16)Knud Ahrnell Albrechtsen Wrote: [ -> ]After rendering the stickers are show so that is great but I am not happy with the result in the colors.
try comparing the DBG with my export from LDView 4.2 (without sticker)
I think the DBG looks very "flat" compared to mine??
Any idea why it looks like this??

Not sure could be a couple of things, like:
- Light position
- Camera position (you can't really compare to different views)
- LDCad using srgb and LDView using rgb (I think) in the .pov.

You can tweak the colors by copying the
default
folder to e.g. "MyColors" in
%appdata%/LDCad/povray
Then edit its colors.pov to suit your needs.
In the export dialog select "myColors" in the "code donor" field.

You can then also disable the background, you edited out, by default in globalSettings.pov

Light position is the same.
cameraposition is - almost the same.
no matter what position I have used it is the same difference.
I did the export to pov file directly from ldview in both versions .
I did not use LDcad for the export.


Editiing the colors like you suggest is a bit over my underrstanding of POV-Ray im affraid Smile


I think I found the differnce.
in ldview 4.2 and 4.3 the color section starts with
#include "lg_defs.inc"
#include "lg_color.inc"
This it doesnt in the 4.4 export.
I tried replacing this section from the above includes to down just before this line:
#ifndef (LDXColor494) // Electric Contact Alloy

that seems to correct the difference in the colors.

Could I put this in the colors.pov file - would that work??
(2018-08-28, 18:49)Knud Ahrnell Albrechtsen Wrote: [ -> ]I tried replacing this section from the above includes to down just before this line:
#ifndef (LDXColor494) // Electric Contact Alloy

that seems to correct the difference in the colors.

Could I put this in the colors.pov file - would that work??
No LDCad uses macros for colors while LDView/LGEO uses individually defined colors.
You can use the non macro way in LDCad but it will need some high level POVRay 'magic'.

I think the main reason of the difference is the fact the LDView export uses LGEO which comes with its own color defs while LDCad uses the RGB colors as supplied in the LDConfig.ldr file.

Also LDCad's pov export was designed mainly for animations so I sacrificed quality over rendering speed at some points.

If anyone with deeper knowledge of LGEO inner workings know the basic differences and point them out to me I could make an alternative colors.pov implementing it.
(2018-08-27, 20:31)Roland Melkert Wrote: [ -> ]
(2018-08-27, 19:30)Knud Ahrnell Albrechtsen Wrote: [ -> ]thanks
does it have a problem with whitespaces?
when i try to export LDCad creates the folder but then shuts down without creating the pov file.

For the pov export all needed png's are copied into the pov export destination using generated names so spaces should not matter.
But if LDCad crashes during the export it might be the cause of it on that side, I'll have to look into this some more.
It would help me, if you send me your model so I can test it myself using similar input.

You can prevent the space in folder names by using relative filenames only (place the png in the same folder as the .dat)

I've tried to replicate the pov export crash you experienced.

I've tried using a .dat with an abs png file name with and without spaces used from a mpd inside a different/same folder etc.

All works for me without a crash.

Could you mail me your model and the used sticker/png files?
(2018-08-29, 21:26)Roland Melkert Wrote: [ -> ]
(2018-08-27, 20:31)Roland Melkert Wrote: [ -> ]For the pov export all needed png's are copied into the pov export destination using generated names so spaces should not matter.
But if LDCad crashes during the export it might be the cause of it on that side, I'll have to look into this some more.
It would help me, if you send me your model so I can test it myself using similar input.

You can prevent the space in folder names by using relative filenames only (place the png in the same folder as the .dat)

I've tried to replicate the pov export crash you experienced.

I've tried using a .dat with an abs png file name with and without spaces used from a mpd inside a different/same folder etc.

All works for me without a crash.

Could you mail me your model and the used sticker/png files?

Hi Roland

I have just tried to do an export again with whitespaces but cant get it to crash this time.
When I encounter the problem again, I will send the files to you.
Is this ok??
Hi all
for parts with curved faces like 93606:
https://www.ldraw.org/parts/official-par...rtid=93606
what type of Projection Methods should i use? Planar, Cylindrical of Spherical?


Thanks
regards
(2020-09-04, 12:54)Simone Wrote: [ -> ]for parts with curved faces like 93606:
https://www.ldraw.org/parts/official-par...rtid=93606
what type of Projection Methods should i use? Planar, Cylindrical of Spherical?
Clearly planar, since you most probably start from a photo which is basically a planar projection. Anyway, here curvature is low, so difference between planar and cylindrical is very low!
(2020-09-04, 13:39)Philippe Hurbain Wrote: [ -> ]Clearly planar, since you most probably start from a photo which is basically a planar projection. Anyway, here curvature is low, so difference between planar and cylindrical is very low!

Thanks

I'm just trying so but obviously I didn't understand how to use the Melkert code generator

I followed the instructions on the site. Since the 93606 is a 2x4 I set width 40 (ldu) and height 80 (ldu)
I entered the PNG name and pressed Generate.

I copied the code into an empty dat file and saved it in the ldraw / Unofficial / customparts / parts folder (which is correctly read by Lpub3D and LDCad).

Opening it with LDView it is correctly rendered but I don't understand how to use the sticker just created on the curved surface of the piece in question (93606).

Could you give me a hand?
thank you
This tool will give it the wanted shape:  https://brickhub.org/i/apps/pf.htm
Pages: 1 2 3 4 5