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, thats 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 mustve worked though.
|
Heh. Yeah, considering how raw my edge-construction code is, a few small math
errors wouldnt 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 doesnt.
|
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 wasnt an
issue.
|
Im 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. Im 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 youve 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 youve gone to the trouble of separating the regions by color,
it wouldnt 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 youve done all the
hard work, Im perfectly willing to borrow it and make a portable
vectorBMP2DAT program when youre finished.
|
Ill happily share what Ive done, especially if I ever finish it. But (working
with Autotrace) you were probably were ahead of what I accomplished. But Id 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
|
|
|
|