Raj Vaidya wrote:

> Nearly a year back I had posted a fairly long note about getting
> publication quality Text2Ds in Java3D. If SVG is an avenue for
> achieving this, then I am very interested.

I doubt _any_ 3D graphics API is capable of producing that. The simple
nature of what happens to a 2D object to transform it into a 3D texture
will take care of any of those problems. Print-quality stuff needs to be
at extremely high resolutions - absolute minimum of 2400dpi. There's
just no way that traditional amounts of texture memory on a 3D graphics
card would be capable of handling just a single A4 page at print
quality. FWIW, that's one of the core issues we have to deal with in our
rare book viewer project where they are talking about scanning in the
books at some ridiculously high rate (7200dpi comes to mind, but I could
be corrected on that).

> What do you mean by an SVG texture ? Does it involve parsing
> the (XML-like) SVG instructions for making a circle, line etc and
> converting them to Java3D primitives - that would be a lot of work !

No. For our first cut, and for something that would be useful for 90% of
users, is to take a standard SVG renderer and have it draw to an AWT
[Buffered]Image. We would set the output image size and then let the
renderer deal with everything after that. If there is animation of the
texture to be done, then we would need to write the infrastructure to do
that and combine it with Java3D. That way, it would act like an animated
GIF as a texture too. Just nominate the file and then let "the system"
deal with it (Note that the core of java3D API does not directly support
animated textures).

> Or is it something much simpler that I have not seen thru'. The
> scalabilty of the SVG image stops right when you put that into
> a texture, am I right (scalability with regard to maintaining the good
> resolution ) ?

Correct. One way that we could deal with this is through mip-mapping. We
could ask the SVG renderer to produce us multiple copies of the image at
different resolutions and then set up the ImageComponent2D to use a
mip-map. Hardware then takes care of the rest.

> Would it be possible to save a Java3D canvas as an SVG image :) ?

Err.... no.  Possible if you started by saving the raw bytes, then
running edge detection algorithms over it to extract the features. Not
sure how good quality that would be, but it is a hell of a lot of extra
work.

> Or, would it be as difficult as trying to do that in Postscript ?

'bout the same. Saving to EPS from the canvas is relatively trivial.
There is already a framework for doing that in the code repository now.
It saves JPEGs, but if you have something that could take an AWT Image
and write that out as EPS, there would be no problems doing it.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                               - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to