Jump to content

  • Log In with Google      Sign In   
  • Create Account


viper110110

Member Since 11 Nov 2008
Offline Last Active Aug 30 2014 06:15 PM

#5096871 What program to use to add alpha

Posted by viper110110 on 26 September 2013 - 12:39 AM


do you need to compute the alpha values from the rgb channels of the current image, or are you using a different image as a source?

 

I am somewhat basing it off the current image. I basically want to take the current image and then stretch the range of values to be full 0-255. That way a dark texture won't always fall below a light texture. The current best way for me seems to be to use paint.net to convert to greyscale, adjust the range manually based on the histogram, then save the greyscale image and import both into the directx texture tool.




#5096446 What program to use to add alpha

Posted by viper110110 on 24 September 2013 - 12:10 PM

Another method is to create a separate greyscale image that serves as an alpha-channel. You can use the DirectX Texture Tool to load the image into the alpha-channel of an RGBA image to combine the two.

I like this one. I want to be able to manipulate the range of the heights that I am generating.




#5096407 What program to use to add alpha

Posted by viper110110 on 24 September 2013 - 07:58 AM

I want to use the alpha channel to add height data to my textures. I am currently getting textures online and then using paint.net to convert them to DDS. Problem with paint.net is that I can't set the alpha to zero while maintaining the RGB data. It also makes editing a pain if I want to make changes. I can calculate the height on the fly based on the average of the rgb, but I would prefer to use an actual map so that I can adjust the values myself.




#5043231 There has to be a better way... (to get text)

Posted by viper110110 on 14 March 2013 - 07:46 PM

Is there a better way to do the following?

 

I tried importing Microsoft.VisualBasic and then using Interaction.InputBox() but it sometimes crashed and otherwise froze the game.

 

string text = string.Empty;

            if (IsNewKeyPress(Keys.A))
            {
                if (CurrentKeyboardState.IsKeyDown(Keys.LeftShift) || CurrentKeyboardState.IsKeyDown(Keys.RightShift))
                {
                    text += "A";
                }
                else
                {
                    text += "a";
                }
            }
            if (IsNewKeyPress(Keys.B))
            {
                if (CurrentKeyboardState.IsKeyDown(Keys.LeftShift) || CurrentKeyboardState.IsKeyDown(Keys.RightShift))
                {
                    text += "B";
                }
                else
                {
                    text += "b";
                }
            }
           //Through z, plus numbers

 




#5037791 Baby's first pixel art

Posted by viper110110 on 28 February 2013 - 05:15 PM

Looking a lot better! i think what most people do wrong is to go for the classic hard black color for outlining. If you do want to use a "black" outline, soften down the color, make it a bit closer to gray. and people forget shades. 

but yea, a lot of progress comes from trying. try different looks, different mouth, without glasses, other glasses and so on. try try try tongue.png

 

Thanks. I saw a tutorial about a week ago that said start with a black outline for your shape. I guess I forgot to get rid of it after.

 

I spent less than 10 min on this but figured i would show you how you can make it look better:

 

gallery_1_8_1302.jpg

 

Cool. You went with 64x64, which I wasn't originally going with, but I can now see that it makes his jacket look much better. Don't like the face much, but that's just opinion. I think I will go with 64x64 now that I've seen this. You've also shown me some good shading.

 

I changed most of the black lines to darker shades of the bordering colour. I left his shoes, sunglasses, and whatever is in his backpack black. I also gave him thumbs, but I don't think I like the whole thumbs-up thing because he will be holding a gun. I'd like to give him fingers, but I'm not quite sure how to go about that. Would it be beneficial to start over at 64x64? I just thought it would be easier to draw a smaller image and scale it and I don't have my heart set on the pixelated look. Also, his hands were already the same size (3x3) but they aren't level with each other. Should I move them?

 

bloomanfull.png

 

Basically, the lower the resolution, the harder it gets to make the little squares look like they're not little squares. But the higher the resolution, the more pixels you have to deal with. It's a balance between simplicity and complexity.

 

I think your issue is that it looks like you started out already digital, which is tempting to do but not the best way to go. It's almost always better to sketch out a few ideas on paper, preferably after looking at a few references online of similar characters in other games. Paper's important because it lets you throw several ideas out there really quickly without getting too attached to any one. Once you have a handful of sketches, you can then take your favorite parts from each one and start the digital version. For pixel art this is especially important because if you start out with pixels, it can be hard to see how that translates into smoother less pixel-y looking shapes.

 

I definitely did start out digital. I honestly can't draw much at all on paper. It already looks much better on the computer than I would be capable of with a pencil.




#5036726 Baby's first pixel art

Posted by viper110110 on 26 February 2013 - 09:35 AM

I changed most of the black lines to darker shades of the bordering colour. I left his shoes, sunglasses, and whatever is in his backpack black. I also gave him thumbs, but I don't think I like the whole thumbs-up thing because he will be holding a gun. I'd like to give him fingers, but I'm not quite sure how to go about that. Would it be beneficial to start over at 64x64? I just thought it would be easier to draw a smaller image and scale it and I don't have my heart set on the pixelated look. Also, his hands were already the same size (3x3) but they aren't level with each other. Should I move them?

 

bloomanfull.png




#4998295 Non power of two texture in DirectX

Posted by viper110110 on 06 November 2012 - 07:39 PM

I am trying to load textures in the same way as the rastertek tutorials do it, but when I get to the font tutorial, the texture for the font won't load. After some thorough detective work, I determined that it was because one of the texture dimensions was not a power of two. How can I get directx to load any texture regardless of size?

Edit: Just figured out that he uses a power of two texture for the font and posted a different texture on his website (with a bad size). Regardless, I would still like to know how to handle non-power-of-two textures


#4996740 error X4502: invalid vs_4_0 output semantic 'SV_TARGET'

Posted by viper110110 on 02 November 2012 - 08:52 PM

I have a pixel shader, copied from the font tutorial at rastertek. I have changed the tutorials for the new windows sdk on windows 8, but when I try to load the shader, the output says

error X4502: invalid vs_4_0 output semantic 'SV_TARGET'

I find this weird because I have another shader that also uses SV_TARGET in the same place and it works fine.

Here is my shader:

[source lang="cpp"]/////////////// GLOBALS ///////////////Texture2D shaderTexture;SamplerState SampleType;cbuffer PixelBuffer{ float4 pixelColor;};//////////////// TYPEDEFS ////////////////struct PixelInputType{ float4 position : SV_POSITION; float2 tex : TEXCOORD0;};////////////////////////////////////////////////////////////////////////////////// Pixel Shader////////////////////////////////////////////////////////////////////////////////float4 FontPixelShader(PixelInputType input) : SV_TARGET{ float4 color; // Sample the texture pixel at this location. color = shaderTexture.Sample(SampleType, input.tex); // If the color is black on the texture then treat this pixel as transparent. if(color.r == 0.0f) { color.a = 0.0f; } // If the color is other than black on the texture then this is a pixel in the font so draw it using the font pixel color. else { color.a = 1.0f; color = color * pixelColor; } return color;}[/source]


#4992680 Is XNA dying and MS forcing to C++?

Posted by viper110110 on 21 October 2012 - 11:57 PM

I was recently at a game competition and a Microsoft rep came to visit. Not sure how much she knew about internal developments, but when I spoke of XNA dying she recommended monogame and/or SharpDX.


#4983232 Texturing a triangle, completely lost

Posted by viper110110 on 24 September 2012 - 08:42 AM

Well let me just tell everybody to not code when you are tired. I guess that's the lesson to be learned here. Stupid mistakes.


#4982826 C helper functions in c++

Posted by viper110110 on 22 September 2012 - 11:25 PM

You don't design a multi-paradigm language, and then say that any method that isn't the OOP one is the wrong way to go about something. :P


It's sad how much this exact mindset is pushed in school. After all the time I've spent trying to understand and use OOP, I've started to hate it. A part of me wants to join Torvalds and use pure C for everything.


#4878151 Story mapping / Dialog Tree Software

Posted by viper110110 on 28 October 2011 - 11:55 PM

I have absolutely no experience in tracking stories, but could you use visio?

Also, you can set up a wiki with little to no knowledge of HTML, but I would always advise to learn a little bit of it.


PARTNERS