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 / 11145
     
   
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 1 Apr 2011 01:19:07 GMT
Viewed: 
21591 times
  

In lugnet.cad.dev, Bram Lambrecht wrote:
In lugnet.cad.dev, Michael Horvath wrote:
Is it possible to create a SVG version of a rendering of an LDRaw model? I am
only interested in the visible portion, such as what you see from one of the
several default views (front, left, back, etc.).

Rendering from 3D to 2D vector graphics should be possible:
http://www.geuz.org/gl2ps/
But I don't know how efficient it is.
--Bram

LDView actually has experimental support for this built-in (although it has to
be manually enabled via either a command line switch or a registry setting).
Unfortunately, it's effectively useless on anything other than individual parts
due to the astronomically large output files, and their extremely slow
processing.  The results also tend to not render nicely in most SVG renderers
(particularly transparent parts).  See below for the output from car.dat
(WARNING: 8.3MB file).

http://www.halibut.com/~tcobbs/ldraw/private/car.svg

Here's a single part (276KB):

http://www.halibut.com/~tcobbs/ldraw/private/30272.svg

The above also has another experimental LDView feature (OBI: Old/Original
Building Instructions) enabled with a custom part file to make use of that
feature.  That's why the sides of many of the cylinders are black.

--Travis

   
         
     
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 1 Apr 2011 06:32:36 GMT
Viewed: 
21227 times
  

In lugnet.cad.dev, Travis Cobbs wrote:
In lugnet.cad.dev, Bram Lambrecht wrote:
In lugnet.cad.dev, Michael Horvath wrote:
Is it possible to create a SVG version of a rendering of an LDRaw model? I am
only interested in the visible portion, such as what you see from one of the
several default views (front, left, back, etc.).

Rendering from 3D to 2D vector graphics should be possible:
http://www.geuz.org/gl2ps/
But I don't know how efficient it is.
--Bram

LDView actually has experimental support for this built-in (although it has to
be manually enabled via either a command line switch or a registry setting).
Unfortunately, it's effectively useless on anything other than individual parts
due to the astronomically large output files, and their extremely slow
processing.  The results also tend to not render nicely in most SVG renderers
(particularly transparent parts).  See below for the output from car.dat
(WARNING: 8.3MB file).

http://www.halibut.com/~tcobbs/ldraw/private/car.svg

Here's a single part (276KB):

http://www.halibut.com/~tcobbs/ldraw/private/30272.svg

The above also has another experimental LDView feature (OBI: Old/Original
Building Instructions) enabled with a custom part file to make use of that
feature.  That's why the sides of many of the cylinders are black.

There must be a way to weld all those polygons together and do vertex shading,
but I'm sure its no 5 minute programming exercise.
--Bram

   
         
     
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 1 Apr 2011 12:54:20 GMT
Viewed: 
20792 times
  

In lugnet.cad.dev, Travis Cobbs wrote:
The results also tend to not render nicely in most SVG renderers
(particularly transparent parts).

Yeah, in Google Chrome I can see the edges faintly between the polygons.


-Mike

   
         
     
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 1 Apr 2011 13:50:58 GMT
Viewed: 
21261 times
  

In lugnet.cad.dev, Travis Cobbs wrote:
In lugnet.cad.dev, Bram Lambrecht wrote:
In lugnet.cad.dev, Michael Horvath wrote:
Is it possible to create a SVG version of a rendering of an LDRaw model? I am
only interested in the visible portion, such as what you see from one of the
several default views (front, left, back, etc.).

Rendering from 3D to 2D vector graphics should be possible:
http://www.geuz.org/gl2ps/
But I don't know how efficient it is.

Wow, I must be getting really old. The deja-vu didn't didn't set in
until I slept on it.  I can't hardly believe this was 8 years ago.

http://news.lugnet.com/cad/dev/?n=9286

And at that point ldglite already had experimental support for the
similar gleps code that seems to have disappeared down the memory hole
of the internet.

Unfortunatly I found gleps also produced astronomically large files,
similar to the results reported below.  But it's nice to know Travis is
still hammering away at it.  I'm confident he'll eventually get the
size to something acceptable, even if we have to wait until googlebyte
local storage is commonplace. :^)

Don

LDView actually has experimental support for this built-in (although it
has to be manually enabled via either a command line switch or a registry
setting).  Unfortunately, it's effectively useless on anything other than
individual parts due to the astronomically large output files, and their
extremely slow processing.  The results also tend to not render nicely in
most SVG renderers (particularly transparent parts).  See below for the
output from car.dat (WARNING: 8.3MB file).

http://www.halibut.com/~tcobbs/ldraw/private/car.svg

Here's a single part (276KB):

http://www.halibut.com/~tcobbs/ldraw/private/30272.svg

The above also has another experimental LDView feature (OBI: Old/Original
Building Instructions) enabled with a custom part file to make use of that
feature.  That's why the sides of many of the cylinders are black.

    
          
     
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 1 Apr 2011 16:12:07 GMT
Viewed: 
21023 times
  

In lugnet.cad.dev, Don Heyse wrote:
Unfortunatly I found gleps also produced astronomically large files,
similar to the results reported below.  But it's nice to know Travis is
still hammering away at it.  I'm confident he'll eventually get the
size to something acceptable, even if we have to wait until googlebyte
local storage is commonplace. :^)

Actually, I'm not hammering away at it.  I put the support in back in May of
2008, but I haven't really done much with it since then.

--Travis

   
         
   
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 24 May 2011 18:23:49 GMT
Viewed: 
21747 times
  

In lugnet.cad.dev, Travis Cobbs wrote:

LDView actually has experimental support for this built-in (although it has to
be manually enabled via either a command line switch or a registry setting).
Unfortunately, it's effectively useless on anything other than individual parts
due to the astronomically large output files, and their extremely slow
processing.  The results also tend to not render nicely in most SVG renderers
(particularly transparent parts).  See below for the output from car.dat

How would I go about enabling this experimental feature?  I'd like to try it out
on one of my line drawings.

Eric Albrecht

   
         
   
Subject: 
Re: SVG renders possible?
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 25 May 2011 01:48:24 GMT
Viewed: 
22311 times
  

In lugnet.cad.dev, Eric Albrecht wrote:
In lugnet.cad.dev, Travis Cobbs wrote:

LDView actually has experimental support for this built-in (although it has to
be manually enabled via either a command line switch or a registry setting).
Unfortunately, it's effectively useless on anything other than individual parts
due to the astronomically large output files, and their extremely slow
processing.  The results also tend to not render nicely in most SVG renderers
(particularly transparent parts).  See below for the output from car.dat

How would I go about enabling this experimental feature?  I'd like to try it out
on one of my line drawings.

Add the following to LDView's command line:

-GL2PSAllowed=1

Alternatively, run regedit, browse into the HKEY_CURRENT_USER\Software\Travis
Cobbs\LDView key, then create a new DWORD value there named GL2PSAllowed, and
set it to 1.

Once you do either of the above, you'll see some new file types in the Save
Snapshot dialog box.

Please note a few things.  First of all, as mentioned, the files are really,
really big.  Secondly, they take a fairly long time to create, and there's no
way to cancel during creation, and LDView is unresponsive during this time (with
no feedback; since it's basically a failed experimental feature, I saw no reason
to make it user-friendly).

--Travis

 

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