LDCad POVray export


RE: LDCad POVray export
#14
(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.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
LDCad POVray export - by Michael Horvath - 2018-02-17, 21:47
RE: LDCad POVray export - by Roland Melkert - 2018-02-18, 21:01
RE: LDCad POVray export - by Michael Horvath - 2018-02-18, 21:28
RE: LDCad POVray export - by Roland Melkert - 2018-02-18, 21:48
RE: LDCad POVray export - by Michael Horvath - 2018-02-18, 23:03
RE: LDCad POVray export - by Orion Pobursky - 2018-02-18, 23:31
RE: LDCad POVray export - by Michael Horvath - 2018-02-18, 23:43
RE: LDCad POVray export - by Orion Pobursky - 2018-02-18, 23:50
RE: LDCad POVray export - by Orion Pobursky - 2018-02-19, 2:05
RE: LDCad POVray export - by Michael Horvath - 2018-03-03, 12:18
RE: LDCad POVray export - by Philippe Hurbain - 2018-03-03, 13:10
RE: LDCad POVray export - by Roland Melkert - 2018-03-03, 18:06
RE: LDCad POVray export - by Roland Melkert - 2018-02-19, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)