To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10882
10881  |  10883
Subject: 
Re: POV-Ray help needed
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 25 Jun 2008 20:21:10 GMT
Viewed: 
8365 times
  
In lugnet.cad.dev, Roland Melkert wrote:
Hello all,

I have been busy with POV-Ray export for LD4DStudio now and then for
about two weeks now.

It comes along quite nicely, but the results can be better. I am no
POV-Ray expert so I'm looking for some tips from experienced users.

An example of the current results you'll find here:

http://www.ld4dstudio.nl/action/download/povrayTest01.rar

it's an 33000 :) lines .pov file and the bmp it generates. I also
included a BMP of the corresponding LD4DStudio OpenGL rendering.

The result Is not bad but I think it's kinda dark. Also I'm struggling
to get the view (composition) exactly the same as in OpenGL.

Of course most of the work must be done by tweaking the materials (I
used the l3p finish settings for the time being).

But maybe people can give me pointers/tips whom help improve the result.

Any comment is welcome

A few things.

First of all, both the LDraw file format and the POV file format support
hierarchical compositions, so I think it's a good idea to leave things in their
original hierarchy.  So, instead of having a POV object for each part that is
made up entirely of one single mesh2 object, with all the geometry for the part,
it should instead contain a mesh2 object for all the type 3 and 4 lines in the
part, but then references to the part's primitives and subfiles (which
themselves are constructed in the same way).  This would significantly decrease
the file size of the generated POV file.

Secondly, primitive substitution helps a lot.  At the very least, I think you
should support primitive substitution for cylindrical primitives, since there
are so many studs.  This improves the final result noticeably.  If you're
interested, I have a class (in C++) that parses an LDraw filename and then
automatically determines if it is a primitive, and if it is a primitive,
extracts all the pertinant info from the filename.  (For example, if you feed it
4-4cyli.dat, it knows that it's a cylinder, and knows that the cylinder fraction
is 1.0.  2-4cyli.dat is recognized as a cylinder with a fraction of 0.5.)

I also have code in LDView that generates a POV camera statement that exactly
matches LDView's view (assuming the POV output has the same aspect ratio as the
LDView view).  If you're having trouble with your camera angle, you might be
interested in that code.

As for material properties, I can't really help you much there.  Different
people have come up with different material properties for the various LDraw
colors with differing levels of apparent match to real life bricks.  The thing
is, different material definitions produce different results based on the render
settings.  Radiosity and HDR light field renders in POV can look very realistic,
but they can also be very slow to render.  And the material properties that look
best for those will probably not match the material properties that look best
for other lighting models.

One thing to do here is to give users the opportunity to include their own
custom include file at the top of your output.  Then, enclose all of your color
definitions in #if defined blocks, so that if the user wants to redefine the
colors, all they have to do is define them in their include, and then make the
appropriate declares to prevent your color definitions from being used.

--Travis



Message has 1 Reply:
  Re: POV-Ray help needed
 
(...) Actually I was planning to support both to see which approach renders faster. Having the vertex and index data in memory, the mesh2 approach was the easiest step to begin with. I only had to correct for quad -> triangle conversion to get (...) (16 years ago, 26-Jun-08, to lugnet.cad.dev)

Message is in Reply To:
  POV-Ray help needed
 
Hello all, I have been busy with POV-Ray export for LD4DStudio now and then for about two weeks now. It comes along quite nicely, but the results can be better. I am no POV-Ray expert so I'm looking for some tips from experienced users. An example (...) (16 years ago, 25-Jun-08, to lugnet.cad.dev)

7 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR