Gandi Posted March 19, 2010 Share Posted March 19, 2010 Hi! im creating an image where i want to set the color of a pixel exactly.. so i created a 4x4 image for testing.. lets say every stripe is 1x4 pixel (don't mind the black border. its just for seeing the borders of the different versions) 1.) the image with the colors i want 2.) the image i get when using the TextureTools i DL'ed at the dl section of the forum 3.) the image i get when using nvidia dds tools with photoshop. as you can see i get several outputs, but not the one i want to get.. i want to get the color of the 1st texture. and now plz dont say i should just store the colors in my program, as i just used the 4 px for testing. this should have like 256x4 pixel later. is there any other format then dds i can use with LE. i just want to get the color information of the texture at a specific location in my shader.. greetings Gandi Quote Link to comment Share on other sites More sharing options...
BrokenPillar Posted March 19, 2010 Share Posted March 19, 2010 what compression setting are you using with the Photoshop plugin? The DXT methods compress by creating 4x4 blocks of color where only the two extremes are stored. Here is a link that explains it: http://www.fsdeveloper.com/wiki/index.php?title=DXT_compression_explained Here are a couple of quotes from that link: For DXT compressions the texture is split into segments of 4x4 pixels which are then compressed. When compressing a 4 colour palette is determined for these 16 pixels. Afterwards each pixel will get an index into this palette, which only requires 2 bit per pixel. For the palette only two colours are stored, the two extremes, and the other two colours are interpolated between these extremes. so you are basically setting up a "worst case scenario" for a compression method meant to be used for larger diffuse textures with more subtle changes in values. This is also why standard DXT methods butcher normal maps, which usually have sharper and more significant changes in value. Try using some of the other compression types that result in larger file sizes, but use different methods, like 8.8.8 RGB and see what results you get from that. I am not sure if that will be good enough either, but it is worth a try. As far as support for other texture types, I am pretty sure LE does not support any type other than dds. Some of the users that have been around longer can correct me if I am wrong. *edit* I tried it, and 8.8.8 RGB works. Here is a screenshot: The image on the left is a 4x4 saved as 8.8.8 RGB and the one on the right is the same 4x4 saved using DXT1 (blown up of course) Quote Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB Online Portfolio | www.brianmcnett.com Link to comment Share on other sites More sharing options...
Gandi Posted March 19, 2010 Author Share Posted March 19, 2010 Thx a lot! works fine now. Quote Link to comment Share on other sites More sharing options...
BrokenPillar Posted March 20, 2010 Share Posted March 20, 2010 No problem. What is this shader going to do, if you don't mind me asking? and now plz dont say i should just store the colors in my program, as i just used the 4 px for testing. No need to ever fear that from me, as I don't know how to do anything by programming it... Quote Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB Online Portfolio | www.brianmcnett.com Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.