A Better Texture

2»

Comments

  • _INTER__INTER_ Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
    edited March 2016
    Kouji_San wrote: »
    Alright, but can ya batch it :D
    Maybe with a plugin like this or similar? https://pdnbulkupdater.codeplex.com/wikipage?title=Usage from Command Line&referringTitle=Documentation
    Someone who knows whats to do, could make a "Texture Enhancement Mod"? Just to see how it'd turn out.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    Well it would have to be a script that does the conversion, but it cannot be a material mod, with it going far beyond the max 100Mb limit :(
  • UncleCrunchUncleCrunch Mayonnaise land Join Date: 2005-02-16 Member: 41365Members, Reinforced - Onos

    I don't really see the point as @McGlaspie stated clearly :
    McGlaspie wrote: »
    Via Paint.NET [arc.dds] (DXT1 format) with no mipmaps = 2101248 bytes
    Via Paint.NET [arc.dds] (DXT1 format) with mimaps = 2797568 bytes
    Via Photoshop and Nvidia DDS plugin [arc.dds] (DXT1 format) with mipmaps = 2797586 bytes
    Via Builder and nvcompress (DXT1 format) with mipmaps = 2797568 bytes
    This algorithm is only meant to compress in a fashion that will give the same result whatever the software / plugin you're using. If the algorithm is implemented properly, it just give the same output. It is a fixed-rate compression method. 2048x2048 as DXT1 weight 2Mb and 2.7Mb with MIPmaps whatever you do.

    Only the artist can make his texture in a way it avoids the "ugly degradation" when it is finally compressed.

    The only requirement would be :
    • for the artist to care about what DXT'x' they use and what method they select. If no alpha channel needed just don't select those who implement detailed alpha channel like DXT5. DXT1 will suffice. Prefer "iterative mode" than "group" or "interleaves" & set Perpetual in "error checking".
    • for the engine to support more compression methods. I remember having trouble with some. Last time I checked it supports DXT1 and DXT5 (which is enough) but having more would eventually allow to save some space. A4R4G4B4 for example would be great for images that have 90% of black pixels, like the "emissive" textures.


    MIPmap are good most of the time but be cautious with texture like "grate" and "grids" (thin lines). This is the only bad side of it as texture filtering (bi+tri-linear + anisotropic) does things...

    Maybe @McGlaspie could make a little doc on how to properly use Builder.exe. Like what happens when you put a .PNG with no Alpha channel in the source directory and one .PNG with an "Alpha". What would be the DXT method selected ? etc.
  • ChrisStarkChrisStark Germany Join Date: 2016-02-11 Member: 212895Members, NS2 Playtester
    @Soul_Rider Okay since it is not capable of batch it doesn't matter though better quality would be nice... Maybe builder gets an update at some point...
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited March 2016
    @Obraxis already mentioned he was looking into that, although I don't know how far that got..

    --Edit--

    @_INTER_ I was looking at that tool the other week. I am going to download the code and see if I can figure anything out in the meantime...
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    I still can't see any difference between the two comparison screenshots...
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited March 2016
    BeigeAlert wrote: »
    I still can't see any difference between the two comparison screenshots...

    The old builder (no crystal) or photoshop DDS files compared to the crystal and Paint.net one, there is a very clear detail difference, blurry vs sharp.

    Between the crystalnvcompress and Paint.net, there is less of a difference, but the ones I saved without mipmaps using Paint.net are still sharper. And @Soul_Rider says with mipmaps they are still sharper. It's just the batch issue, I guess...

    Just open the images in two tabs and switchbetween them, you shall see :D
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    @BeigeAlert If you struggle to see the difference in the detail, please look at the UI images I posted, which highlight the builders blurry effect more clearly.
    Soul_Rider wrote: »

    I am going to start with a UI example. Unfortunately, as this uses transparencies, it doesn't quite show up correctly on the forums, but it does provide a good reference comparison between the source file, the actual NS2 builder version of the dds, and the paint.net dds.
    alpha%20dds_zpsartlrxhe.png

    As you can see, the paint.net dds file is much closer to the original PSD file. It has retained much more information and is less blurry.

  • ArchieArchie Antarctica Join Date: 2006-09-19 Member: 58028Members, Constellation, Reinforced - Supporter, WC 2013 - Supporter
    edited March 2016
    Kouji_San wrote: »
    Well it would have to be a script that does the conversion, but it cannot be a material mod, with it going far beyond the max 100Mb limit :(

    could have multiple workshop mods ;p

    questions relating to textures, is the maximum texture supported by spark 1024? if i set it any higher the builder rebuilds it as 1024, or is that only for non equal power resolution image?

    also how do i get rid of some textures nagging me about illegal mip level (and rendering incorrectly in game) renders fine in editor/viewer, but then in game gives me errors.

    "illegal miplevel 11 (0 - 10) changing to 10"
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    There are textures up to 2048
  • YojimboYojimbo England Join Date: 2009-03-19 Member: 66806Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    edited March 2016
    I have no idea what anyone is saying in this thread but...
    exvzxhrd4boe.jpeg
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    Soul_Rider wrote: »
    @BeigeAlert If you struggle to see the difference in the detail, please look at the UI images I posted, which highlight the builders blurry effect more clearly.

    That's not blurriness... that's the alpha channel being misinterpreted (premultiplied vs unpremultiplied color). It seems one was saved with a white background instead of a black background.
    Kouji_San wrote: »
    Just open the images in two tabs and switchbetween them, you shall see :D

    That definitely helps me see the difference, but what I'm seeing is not higher quality, but higher aliasing.

    What's happening is things appear sharper because the nearest-neighbor sampling being performed is creating a TON of aliasing artifacts -- you just can't see that they're a problem in a still image... it's too difficult to distinguish detail from noise when you have no other reference to refer to (ie other frames).

    Here's a quick visualization I cooked up. I made a texture in photoshop that's just 1024x1024 of white noise. I saved this texture first as a PSD in the builder source directory, and again as a DDS file WITHOUT MIP MAPS in the builder output directory. I built, then opened two viewer windows. I created a quick material for each texture, and opened each one in their respective viewer window. When viewer displays materials (instead of models), it maps them onto a cube. On the screenshot below, the left image is the one without mip maps, and the one on the right is the one WITH mip maps. Notice the front-face of the cube is pretty much the same in both pictures. Good. That's to be expected. Now the TOP of each cube... the one on the right looks better, whereas the one on the left just devolved in a huge mess of noise. The textures weren't animated at all, but moving the camera ever so slightly would make the left texture "dance". :)
    IgXUZ3g.png
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited March 2016
    I did stop the animation though and just reloaded the texture by running builder or copy pasting the Photoshop/Paint.net files. They are all on the same frame in the same viewer.exe. So, I should perhaps disable FXAA?
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    edited March 2016
    Kouji_San wrote: »
    I did stop the animation though and just reloaded the texture by running builder or copy pasting the Photoshop/Paint.net files. They are all on the same frame in the same viewer.exe. So, I should perhaps disable FXAA?

    Oh no no, it has nothing to do with an animation playing -- that cube isn't animated. :) Yea my terminology was a bit confusing there. I mean "frame" in the sense of "rendered frame" not "animation frame." See, without a technique to reduce aliasing, like mip-mapping, any slight change in camera position or orientation is going to cause a completely different texel (texture pixel) to be sampled for any given pixel. So when we either zoom out, or adjust our camera angle to be more oblique -- basically anything that causes there to be more texels per pixel than pixels per texel, it's going to introduce aliasing artifacts. What mip mapping does is create down-sampled versions of the texture so the computer doesn't have to sample multiple times to eliminate aliasing, it can just sample once from an already down-sampled version of the same image.

    So yes, a still image would appear to be "sharper" but it's really just noise, not actual detail.

    For fun, here's what a checkerboard texture (white, black, white, black... etc) looks like without mip mapping. You can't tell scale from the picture, but that's far enough away that it *should* just be a grey blob.
    psbQfsT.png
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    Aha! Gotha Beige, good stuff :D
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    @BeigeAlert I don't understand what you are saying about the UI image? Did you just look at the image on the forums, or did you click to look at the actual image?

    The actual image is on a white background, and you can see that the builder version is lacking a lot of alpha detail vs the paint.net version.

    Also, as I have posted, paint.net uses mipmaps, originally, I just didn't tick the box because I didn't know what they were for.

    How can you say there is no difference in visual quality looking at the UI image?
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    I was just looking at it on the forums. Didn't realize there was anything to click on. I thought you were pointing out the white glow as a "quality" issue. That being said, I'm not sure what you're hoping to learn from comparing apples and oranges here. It's obviously been saved differently between the two methods.

    Even so, there's barely any difference in quality between the paint.net one and the builder one. Such a tiny difference, even if it isn't a result of the difference in the source files, is hardly worth changing our entire pipeline.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited March 2016
    @BeigeAlert I am not saying change the whole pipeline, I am just asking that the output quality of builder be improved. Ghoul has already posted about an updated plugin for the dds exporter in builder. That's hardly changing the whole build system?

    My point was since alpha we have complained about blurry textures in NS2, and the only reason they exist is because of the builder plugin currently used.

    Also I still dont get this apples to oranges thing?? What are you saying that is being compared differently?

    Here is a video of my process. Tell me where you think I am doing an apples to oranges comparison...

    Note, I rebuilt the builder images because I realised I hadn't flattened the PSD's, so they would not be valid.



    Because youtube always lowers the quality of my videos, here is a link to download the original directly.

    https://www.dropbox.com/s/gwi6knsr62ogt51/buildervspaint.mp4?dl=0

    and here is the link to the zip created in the video...

    https://www.dropbox.com/s/uwdaw35cgg0caa9/PSD.zip?dl=0


    I don't get what you think is apples to oranges? The only thing apples to oranges is the builder output compared to the source file it is supposed to be replicating.

    Edit, For information, the file size of the images are the same, MipMaps are enabled, and paint.net is set to highest quality output, I don't know what quality the builder plugin is set to.

    Builder loses so much information from the alpha channel that any non 1 or 0 values get almost entirely discarded.
  • Sgt_SassSgt_Sass Join Date: 2016-02-13 Member: 213004Members
    Soul_Rider wrote: »
    Builder loses so much information from the alpha channel that any non 1 or 0 values get almost entirely discarded.

    uclh2z5lp7hm.png

    I'm not sure that portion of your post is entirely accurate, unless you are referring to the 0-1 blending of the other channels in relation to the alpha or I'm otherwise misinterpreting what you mean. I'll take a look at the other images you zipped up when I get home.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    @Sgt_Sass Taking a long time to look at those files.

    For the most striking results, I suggest you look at communication_status_new3, would love to see pictures like above for those files. As you can clearly see some of them have no alpha at all, despite clearly having alpha in the original and paint.net builds.
Sign In or Register to comment.