Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-229007] Add SVG as texture with upload cost based on size and complexity. #6959

Closed
sl-service-account opened this issue Jun 30, 2020 · 1 comment

Comments

@sl-service-account
Copy link

sl-service-account commented Jun 30, 2020

How would you like the feature to work?

Scalable Vector Graphics (SVG) is a graphical file format that would be useful in Second Life,It Is a lossless format that isn't pixelating when a user is zooming in on it, and it can be enlarged without degradation, this format would be useful in some situation, mostly for text that would be easier to read than text made with ordinary bitmap format.

The SVG specification is an open standard that is based on a XML-like language that also can be compressed with Gzip (SVGZ) to be 20 to 50 % smaller.

A simple SVG file can be very small, it just need some few lines to create a gradient that could be used as a shadow or an ambient occlusion simulation, the upload cost for a small file like that could be low and it would use very little download bandwidth, but a SVG file can also be very complex with alpha gradients and high point density that may affect the rendering in a negative way, so the upload cost has to be calculated on size, complexity and render cost, maybe in a similar way as the mesh upload.

SVG graphics and text can be created with free software like Inkscape or paid programs like Affinity Designer that have a rather low price compared to Adobe's alternative.
I think the strongest argument for SVG is when it comes to text and numbers, for rather than upload a 1024x1024 PNG that shows the number 42, the same thing could be made with a small SVG that then could be scaled down without quality loss.

https://www.wikiwand.com/en/Scalable_Vector_Graphics#:~:text=Scalable%20Vector%20Graphics%20(SVG)%20is,Consortium%20(W3C)%20since%201999.

This is an example of a SVG file that contains the text “We love Moles”, it is 87 lines and the file size is 2.52 KB,



<sodipodi:namedview
showguides="false"
inkscape:window-maximized="0"
inkscape:window-y="27"
inkscape:window-x="32"
inkscape:window-height="904"
inkscape:window-width="1274"
inkscape:showpageshadow="false"
borderlayer="true"
inkscape:pagecheckerboard="false"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer2"
inkscape:document-units="px"
inkscape:cy="-28.720371"
inkscape:cx="93.979329"
inkscape:zoom="2.02"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
borderopacity="1"
bordercolor="#000000"
pagecolor="#606060"
id="base" />

rdf:RDF
<cc:Work
rdf:about="">
dc:formatimage/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
dc:title</dc:title>
</cc:Work>
</rdf:RDF>





We love Moles

 

Edit (2020/07/02)

SVG files as texture is only useful as a file that can be uploaded, as a part of a streamed web media SVG lose all the advantages, and you can not use media as texture, not only for not all users have auto playing media enabled, but you can not enable things as transparency.

The advantage with SVG is that it is like a XML file and when it is uncompressed it would even be possible to edit in world with a text editor as an alternative.

This would make SVG very practical for informative text that and smaller icons and so on, to draw a bug in SVG is almost as mall as an empty HTML page, example under, copy the code under and place it in a file called "bug.svg", then open it in any compatible viewer or in a web browser.

Then I do not know how SL work in the background I can not say what would happen if you displayed it on a 64x64 metre prim or if it could cause lag, but it is therefore I suggested that this format could be treated in the same way as mesh where the the land impact cost is based on size and complexity.

Why is this feature important to you? How would it benefit the community?

I don't like pixels. they are square, and rough, and irritating, and they are everywhere.

Attachments

Original Jira Fields
Field Value
Issue BUG-229007
Summary Add SVG as texture with upload cost based on size and complexity.
Type New Feature Request
Priority Unset
Status Closed
Resolution Duplicate
Reporter Kennylex Luckless (kennylex.luckless)
Created at 2020-06-30T15:08:08Z
Updated at 2020-07-02T21:00:15Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2020-07-01T13:39:10.230-0500',
  'How would you like the feature to work?': 'Scalable Vector Graphics (SVG)  is a graphical file format that would be useful in Second Life,It Is a lossless format that isn\'t pixelating when a user is zooming in on it, and it can be enlarged without degradation, this format would be useful in some situation, mostly for text that would be easier to read than text made with ordinary bitmap format.\r\n\r\nThe SVG specification is an open standard that is based on a XML-like language that also can be compressed with Gzip (SVGZ) to be 20 to 50 % smaller. \r\n\r\nA simple SVG file can be very small, it just need some few lines to create a gradient that could be used as a shadow or an ambient occlusion simulation, the upload cost for a small file like that could be low and it would use very little download bandwidth, but a SVG file can also be very complex with alpha gradients and high point density that may affect the rendering in a negative way, so the upload cost has to be calculated on size, complexity and render cost, maybe in a similar way as the mesh upload.\r\n\r\nSVG graphics and text can be created with free software like Inkscape or paid programs like Affinity Designer that have a rather low price compared to Adobe\'s alternative.\r\nI think the strongest argument for SVG is when it comes to text and numbers, for rather than upload a 1024x1024 PNG that shows the number 42, the same thing could be made with a small SVG that then could be scaled down without quality loss.\r\n\r\nhttps://www.wikiwand.com/en/Scalable_Vector_Graphics#:~:text=Scalable%20Vector%20Graphics%20(SVG)%20is,Consortium%20(W3C)%20since%201999.\r\n\r\nThis is an example of a SVG file that contains the text “We love Moles”, it is 87 lines and the file size is 2.52 KB, \r\n\r\n<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r\n<svg\r\n   xmlns:dc="http://purl.org/dc/elements/1.1/"\r\n   xmlns:cc="http://creativecommons.org/ns#"\r\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\r\n   xmlns:svg="http://www.w3.org/2000/svg"\r\n   xmlns="http://www.w3.org/2000/svg"\r\n   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"\r\n   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"\r\n   sodipodi:docname="drawing.svg"\r\n   inkscape:version="1.0 (4035a4fb49, 2020-05-01)"\r\n   id="svg8"\r\n   version="1.1"\r\n   viewBox="0 0 74.615364 8.2010238"\r\n   height="30.995995"\r\n   width="282.01083">\r\n  <defs\r\n     id="defs2" />\r\n  <sodipodi:namedview\r\n     showguides="false"\r\n     inkscape:window-maximized="0"\r\n     inkscape:window-y="27"\r\n     inkscape:window-x="32"\r\n     inkscape:window-height="904"\r\n     inkscape:window-width="1274"\r\n     inkscape:showpageshadow="false"\r\n     borderlayer="true"\r\n     inkscape:pagecheckerboard="false"\r\n     units="px"\r\n     showgrid="false"\r\n     inkscape:document-rotation="0"\r\n     inkscape:current-layer="layer2"\r\n     inkscape:document-units="px"\r\n     inkscape:cy="-28.720371"\r\n     inkscape:cx="93.979329"\r\n     inkscape:zoom="2.02"\r\n     inkscape:pageshadow="2"\r\n     inkscape:pageopacity="0"\r\n     borderopacity="1"\r\n     bordercolor="#000000"\r\n     pagecolor="#606060"\r\n     id="base" />\r\n  <metadata\r\n     id="metadata5">\r\n    <rdf:RDF>\r\n      <cc:Work\r\n         rdf:about="">\r\n        <dc:format>image/svg+xml</dc:format>\r\n        <dc:type\r\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\r\n        <dc:title></dc:title>\r\n      </cc:Work>\r\n    </rdf:RDF>\r\n  </metadata>\r\n  <g\r\n     transform="translate(-119.25645,-105.11078)"\r\n     sodipodi:insensitive="true"\r\n     inkscape:label="Background"\r\n     id="layer1"\r\n     inkscape:groupmode="layer">\r\n    <rect\r\n       y="2.1874998e-06"\r\n       x="0"\r\n       height="285.75"\r\n       width="508"\r\n       id="rect11"\r\n       style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:0.264583" />\r\n  </g>\r\n  <g\r\n     transform="translate(-119.25645,-105.11078)"\r\n     inkscape:label="Layer 1"\r\n     id="layer2"\r\n     inkscape:groupmode="layer">\r\n    <text\r\n       id="text11"\r\n       y="113.1516"\r\n       x="118.78103"\r\n       style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"\r\n       xml:space="preserve"><tspan\r\n         style="stroke-width:0.264583"\r\n         y="113.1516"\r\n         x="118.78103"\r\n         id="tspan9"\r\n         sodipodi:role="line">We love Moles</tspan></text>\r\n  </g>\r\n</svg>\r\n',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'Target Viewer Version': 'viewer-development',
  'Why is this feature important to you? How would it benefit the community?': "I don't like pixels. they are square, and rough, and irritating, and they are everywhere.\r\n",
}
@sl-service-account
Copy link
Author

Dan Linden commented at 2020-07-01T18:39:10Z

Duplicate of SL-1983 "Add support for SVG media plugin type"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant