LDraw.org Discussion Forums

Full Version: LDCad POVray export
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2018-02-19, 2:05)Orion Pobursky Wrote: [ -> ]
(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.

Well, the blurred reflections *are* noticeable in non-high res renders, and they require a blur value as well as ior.
Is seam width the total distance between two bricks, or just half the distance?
(2018-02-19, 6:00)Michael Horvath Wrote: [ -> ]Is seam width the total distance between two bricks, or just half the distance?

Total space in between bricks.

A brick gets scaled by (size-seamWidth)/size. So it has half the seamWidth per side left over.
(2018-02-19, 2:05)Orion Pobursky Wrote: [ -> ]
(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.

It seems solid meshes are possible in POV-Ray if you define an "inside_vector". But I have seen gaps between LDraw sub-parts, for instance where a low-res cylinder meets a high-res hole, or something similar. So maybe these are not "well-behaved".

http://wiki.povray.org/content/Reference:Mesh

Code:
Solid Mesh
The triangle mesh objects mesh (and mesh2) can be used in CSG objects such as difference and intersect. Adding the inside_vector they do have a defined inside. This will only work for well-behaved meshes, which are completely closed volumes. If meshes have any holes in them, this might work, but the results are not guaranteed.

To determine if a point is inside a triangle mesh, POV-Ray shoots a ray from the point in some arbitrary direction. If this vector intersects an odd number of triangles, the point is inside the mesh. If it intersects an even number of triangles, the point is outside of the mesh. You can specify the direction of this vector. For example, to use +z as the direction, you would add the following line to the triangle mesh description (following all other mesh data, but before the object modifiers).

inside_vector <0, 0, 1>
This change does not have any effect on unions of triangles, these will still be always hollow.
(2018-03-03, 12:18)Michael Horvath Wrote: [ -> ]It seems solid meshes are possible in POV-Ray if you define an "inside_vector". But I have seen gaps between LDraw sub-parts, for instance where a low-res cylinder meets a high-res hole, or something similar. So maybe these are not "well-behaved"
There is definitely no clearly defined inside in most LDraw parts...
(2018-03-03, 13:10)Philippe Hurbain Wrote: [ -> ]
(2018-03-03, 12:18)Michael Horvath Wrote: [ -> ]It seems solid meshes are possible in POV-Ray if you define an "inside_vector". But I have seen gaps between LDraw sub-parts, for instance where a low-res cylinder meets a high-res hole, or something similar. So maybe these are not "well-behaved"
There is definitely no clearly defined inside in most LDraw parts...

Having normals in mesh2 should do the trickp too, I already define an "interior" in LDCad's pov export. This controls transparency without the use of alpha.
Pages: 1 2