To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.ideasOpen lugnet.cad.dat.ideas in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Ideas / 215
214  |  216
Subject: 
Re: non-lego rendering using various LDraw tools
Newsgroups: 
lugnet.cad.dat.ideas
Date: 
Thu, 23 Sep 2004 17:58:18 GMT
Viewed: 
4293 times
  
In lugnet.cad.dat.ideas, Don Heyse wrote:
   Hey, that’s pretty cool. Did you use the Triangle executable I built?

Yep, thanks for doing that. Then I turned around and installed Cygwin, so now I probably have gcc available -- I think.

   I replaced it with a new build containing the math fix Travis mentioned, but forgot to mention that I did so. I guess whatever you used must’ve worked though.

Heh. Yeah, considering how raw my edge-construction code is, a few small math errors wouldn’t be noticeable. And the input BMP was about 1000x1000, which reduces the appearance of any errors as well.

   How does Triangle handle different colors?

It doesn’t.

   Do you have to generate a separate input file for each color?

I believe so, yes. I was only dealing with a single color, so it wasn’t an issue.

   I’m hoping to maybe steal some of your work. A while back (in May) I made a version of autotrace that takes a BMP file and outputs a LDR file with all the type 2 edge lines. I’m pretty sure I posted the source and executable here somewhere. Anyhow, I lost focus at that point because I had to write the converters to and from the Triangle format so I could use it to generate the Meshes for each color. Darn that attention deficit disorder!

Ha. Once you’ve got vertices and edges, writing the Triangle format is pretty straightforward. The only tricky bit (and one I did not solve) is telling Triangle the location of ‘holes’. If you have open spaces in your image, you have to tell Triangle, or it will happily pave over them.

I suppose, once you’ve gone to the trouble of separating the regions by color, it wouldn’t be too challenging, to pick one point out of each region, and use those points as the ‘holes’ for each of the other colors. I wonder if Triangle minds if you specify holes that are actually just outside of the region being filled?

   Now what the heck was I talking about? Oh yeah, if you’ve done all the hard work, I’m perfectly willing to borrow it and make a portable vectorBMP2DAT program when you’re finished.

I’ll happily share what I’ve done, especially if I ever finish it. But (working with Autotrace) you were probably were ahead of what I accomplished. But I’d be interested in looking at your code. :)

Steve



Message has 1 Reply:
  Re: non-lego rendering using various LDraw tools
 
(...) I'd imagine so. I don't actually use Cygwin. I use the (URL) mingw> version of gcc on Windows because I don't want to worry about the Cygwin unix compatibility DLL. (...) It's not too hard to detect holes while you're vectorizing edges, just (...) (20 years ago, 23-Sep-04, to lugnet.cad.dat.ideas, FTX)

Message is in Reply To:
  Re: non-lego rendering using various LDraw tools
 
(...) Hey, that's pretty cool. Did you use the Triangle executable I built? I replaced it with a new build containing the math fix Travis mentioned, but forgot to mention that I did so. I guess whatever you used must've worked though. (...) How does (...) (20 years ago, 23-Sep-04, to lugnet.cad.dat.ideas, FTX)

8 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