19

SVG is the W3C's standard for 2D vector graphics. Something quite solid. Is there a 3D version of SVG? A kind of extension of it, so converting from .svg to .ext and reverse is quite straight forward programatically.

Hugolpz
  • 17,296
  • 26
  • 100
  • 187
  • Well, I'am on purpose splitting it into 2 different questions : a. 2D to 3D process, b. 3D format. Related but not duplicates. – Hugolpz Dec 30 '13 at 15:41
  • There is VRML - which is a non-XML based 3D modeling standard - but it's not widely supported. – Michael Mullany Dec 30 '13 at 18:39
  • @Phrogz: this question and the other one are *not* duplicates, could you remove the "`This question may already have an answer here: How to convert 2D vector (SVG) representing relief to 3D vector file?`" flag over the question. – Hugolpz Dec 30 '13 at 22:03
  • 1
    @Hugolpz Now that you have clarified and split the two questions better, I have removed my comment. However, as I am not a moderator, I cannot remove my single close vote. I encourage others to ignore that vote at this point, as this question and the other have been mutated to be clearly separate. – Phrogz Dec 31 '13 at 01:19
  • 1
    There are examples of 3d in svg if you are willing to do the math. https://prideout.net/blog/svg_wireframes/ – Brian Takita Oct 28 '22 at 21:13

2 Answers2

8

No, there is no such standard extension to SVG as part of the W3C.

The closest that exists is the W3C Community Group, "Declarative 3D for the Web Architecture Community Group".


Editorial: nor should there be. While SVG is great and vector, it is a presentation format, not a data-interchange format as you seek for 3D. For example, the painter's model of SVG describes the visual layering of elements, a concept that is unrelated to the vector data. Similarly is the presentation markup on fill and stroke color/opacity, instead of metadata such as material. Though it's not a great format IMHO, you should look at COLLADA if you want an XML-based file format for 3D data.

Phrogz
  • 296,393
  • 112
  • 651
  • 745
  • It would be useful to have 3d objects which are rendered in 2d for schematics That way, a single object can be viewed in 2d for schematic diagrams but represented as a single object supporting multiple perspectives. Right now, each perspective needs it's own set of objects leading to combinatorics of object count * perspective count. – Brian Takita Oct 28 '22 at 21:08
7

If the W3C feature of SVG is critical, I don't know of anything. And if you want to make an SVG graphic into 3D by changing some outer tags and leaving the rest alone, I don't know of anything either.

But if what you like about SVG is that it is a declarative language for 2D graphics that can be rendered in a browser, and furthermore that the objects are "persistent" in the sense that you can change an attribute in the DOM and that change is reflected in the browser (in contrast to a canvas approach where making a change means redrawing the picture), then X3D is a candidate. They appear to have liaison and cooperation agreements with W3C etc. Javascript libraries support rendering in a browser; see demos at X3dom, Cobweb.

gnarledRoot
  • 317
  • 2
  • 11