![]() |
LDCad POVray export - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html) +--- Thread: LDCad POVray export (/thread-22717.html) Pages:
1
2
|
LDCad POVray export - Michael Horvath - 2018-02-17 A couple of observations. 1. slope bricks are not bumpy/grainy like they should be 2. at the POV-Ray newsgroups we came up with some code to add blurred reflections to models: Code: // this methoid is slower Unfortunately, there's no way to differentiate between ABS (solid) and Polycarbonate (clear) plastics. Could you add another column to the `ldColor` array for the `BlurAmount` value, in addition to `ior`? It would be great. See also: https://www.eurobricks.com/forum/index.php?/forums/topic/159291-pov-ray-surface-realism/ http://news.povray.org/povray.binaries.images/thread/%3C5a8191e7%241%40news.povray.org%3E/ Thanks! RE: LDCad POVray export - Roland Melkert - 2018-02-18 (2018-02-17, 21:47)Michael Horvath Wrote: A couple of observations. 1: Those would require .dat changes and an extension to the texture map spec to allow for bump maps or something like that. 2: You could check on alpha being <1.0 ( ldColor[getColorIndex(ldCode)][4]<1.0 ) for transparent ones. If you need an extra parameter you could declare an array for mapping the odd ones, e.g. Code: #declare ldColorBlurCount=3; FYI: did you notice you can apply your modifications to material definitions in the %appdata%/LDCad/povray/default/colors.pov file to avoid to have to post process each export. Or copy the default map so you can choose which set of scripts to use during export. RE: LDCad POVray export - Michael Horvath - 2018-02-18 (2018-02-18, 21:01)Roland Melkert Wrote: 1: For some reason I recalled L3P supporting parts with bumps, but this apparently is only true for LGEO parts. My mistake. (2018-02-18, 21:01)Roland Melkert Wrote: 2: Yes, I can make my own array. But I was hoping for official support within LDCad. (2018-02-18, 21:01)Roland Melkert Wrote: FYI: did you notice you can apply your modifications to material definitions in the %appdata%/LDCad/povray/default/colors.pov file to avoid to have to post process each export. Or copy the default map so you can choose which set of scripts to use during export. I already delete all colors from each POV file and simply link to an external INC file with colors in it. I do this for L3P and LDView, as well, so now I can swap between all three whenever I want to in any model. RE: LDCad POVray export - Roland Melkert - 2018-02-18 (2018-02-18, 21:28)Michael Horvath Wrote: Yes, I can make my own array. But I was hoping for official support within LDCad. I wouldn't know where to get the values from unless they are added to !COLOUR meta's or something. RE: LDCad POVray export - Michael Horvath - 2018-02-18 (2018-02-18, 21:48)Roland Melkert Wrote:(2018-02-18, 21:28)Michael Horvath Wrote: Yes, I can make my own array. But I was hoping for official support within LDCad. "LDConfig.ldr" does not specify anything other than color, so you must have come up with your own values for `ior`, `reflection`, `diffuse`, `specular`, etc. etc. `BlurAmount` is just one added value. Maybe instead of storing `ior` in the array, you should instead store the material type? E.g. ABS = 1, polycarbonate = 2, rubber = 3, chrome = 4, pearl = 6, metal = 7, etc. etc. Regardless, you use the `ldrawTexPlastic` macro for both regular plastic bricks and transparent plastic bricks. Since they are two different types of plastics (ABS versus polycarbonate) they should probably use different textures/materials. The POV-Ray newsgroup may be able to offer tips on what values you should use for materials. RE: LDCad POVray export - Orion Pobursky - 2018-02-18 (2018-02-18, 23:03)Michael Horvath Wrote:(2018-02-18, 21:48)Roland Melkert Wrote: I wouldn't know where to get the values from unless they are added to !COLOUR meta's or something. Even if you differentiate between plastics, the refraction still won’t be quite right since the converter makes meshes and not solid geometry. RE: LDCad POVray export - Michael Horvath - 2018-02-18 (2018-02-18, 23:31)Orion Pobursky Wrote:(2018-02-18, 23:03)Michael Horvath Wrote: "LDConfig.ldr" does not specify anything other than color, so you must have come up with your own values for `ior`, `reflection`, `diffuse`, `specular`, etc. etc. `BlurAmount` is just one added value. Maybe instead of storing `ior` in the array, you should instead store the material type? E.g. ABS = 1, polycarbonate = 2, rubber = 3, chrome = 4, pearl = 6, metal = 7, etc. etc. I'm talking about blurred reflections, not blurred refractions. Also, why do you store `ior` info if your geometry is not solid? RE: LDCad POVray export - Orion Pobursky - 2018-02-18 (2018-02-18, 23:43)Michael Horvath Wrote:(2018-02-18, 23:31)Orion Pobursky Wrote: Even if you differentiate between plastics, the refraction still won’t be quite right since the converter makes meshes and not solid geometry. Light transmittal through the material affects the reflection. Also, reflection should be more of a function of material smoothness and not plastic type. RE: LDCad POVray export - Michael Horvath - 2018-02-19 (2018-02-18, 23:50)Orion Pobursky Wrote:(2018-02-18, 23:43)Michael Horvath Wrote: I'm talking about blurred reflections, not blurred refractions. Sorry, I got you and Roland mixed up earlier. I think LDCad output meshes *are* solid, which is why `ior` (index of refraction) is specified for transparent parts. (Otherwise there would generally not be a point in specifying `ior`.) Also, Roland *already* does differentiate between types of plastic by specifying different `ior` values for transparent and non-transparent parts. He just doesn't do this for finishes as well. [ed. correction: there is no `ior` specified for non-transparent parts.] Anyway, blurred reflections don't look realistic on transparent parts. Something has to be done about this. RE: LDCad POVray export - Orion Pobursky - 2018-02-19 (2018-02-19, 1:50)Michael Horvath Wrote: Sorry, I got you and Roland mixed up earlier. I think LDCad output meshes *are* solid, which is why `ior` (index of refraction) is specified for transparent parts. No they aren’t. Nothing that is a mesh is. This is why I started the LDraw POV project. Admittedly, I have no idea if it makes a huge difference and, if there is a noticeable difference, if it is worth the trouble for non-high res renders. |