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 / 6198
6197  |  6199
Subject: 
Re: Opinion sought for rendering style
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 1 Jun 2001 05:16:50 GMT
Viewed: 
675 times
  
"Steve Bliss" <steve.bliss@home.com> wrote in message
news:GE8IMF.8K5@lugnet.com...
In lugnet.cad.dev, Gary Williams writes:
I spent a few moments tweaking the rendering style of my in-development • cad
program.

A sample can be seen at http://www.wizardhat.com/demo/1.gif

Looks quite nice, sharp rendering.

Of note is the fact that my rendering engine is completely ignoring the • line
and conditional line entities in the .dat files (entity types 2 and 5).
Instead I'm always drawing polygon borders in black.

Why?  A lot of pieces have odd lines on their surfaces -- sometimes
regularly laid out (like on cylindrical bits), sometimes oddly laid out
(like the car doors or complicated printed pieces).  Sometimes these lines
will make an interesting effect, but often they won't.

So far all of the lines and optional lines I've seen, have been polygon
edges.  Rather than do the math to determine if an optional line should be
drawn, it's faster to always draw the edge, then let another polygon obscure
it later in the process if neccessary.

If you can give an example of a part where a line does not fall on a polygon
edge, please do.


(I have no intention
of supporting color code 24.)

Again, why?  Black edgelines look great, except when they're drawn on a
black part.  The line information--including color 24--is a big part of • the
content of a LDraw part.

Black lines look a lot better than light or dark shades of the current color
(my opinion).  Black lines show up fine on a black surface if the surface is
shaded (see the example image I mentioned).

But I could make this a user-configurable option, I suppose.

While this approach looks very good in general (or at least I think so), • one
problem is the appearance of the studs (specifically the 16 triangles • that
make up 4-4disc.dat).  I think the studs would look much better without • all
those extraneous lines emanating from the center, but I don't have an • easy
way to fix that at the moment.

Two suggestions:

1. Write your own files to replace the various stu*.dat files.
2. In your renderer, process studs as inherent primitives, rather than
subfiles.  Then you can make them look however you like.

Right now I'm considering having the program analyze .dat files as they're
opened, and generate a list of polygon edges that are not shared by coplanar
polygons.  Then those lines would always be drawn, and stud surfaces and car
doors would then look nice.

My rendering engine will eventually be used in non-Lego-related applications
(it's not dependent on the .dat file hierarchy) and I want to keep it as
generic as possible.  I could provide my own primitives, but that would (a)
be a time consuming process and (b) only handle the cases I was aware of,
potentially generating a lot of work as more cases are discovered over time.

Comments?

It's your program, and you should do as you like.  I'm just not sure how
generally useful this style of rendering will be.

This isn't intended for generating photorealistic images -- it's only for
viewing and manipulating parts in the editor.

-Gary



Message is in Reply To:
  Re: Opinion sought for rendering style
 
(...) Why? A lot of pieces have odd lines on their surfaces -- sometimes regularly laid out (like on cylindrical bits), sometimes oddly laid out (like the car doors or complicated printed pieces). Sometimes these lines will make an interesting (...) (23 years ago, 1-Jun-01, to lugnet.cad.dev)

3 Messages in This Thread:

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

Custom Search

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