Jump to content
  • Advertisement

maxmaxmax

Member
  • Content Count

    13
  • Joined

  • Last visited

Everything posted by maxmaxmax

  1. I have a bitmap file that I created in photoshop that contains an alpha channel. When I try to use texconv to create the texture, the resulting texture only contains a fully white alpha channel instead of the alpha channel that I created in photoshop. The arguments that I passed to texconv are: -f BC3_UNORM .\cat_bmp.bmp -dx10 -y the output from texconv is this message: reading .\cat_bmp.bmp (600x400 B8G8R8X8_UNORM 2D) as (600x400,10 BC3_UNORM 2D α:Opaque) writing cat_bmp.DDS I find it suspicious that the output says that it`s reading alpha as "Opaque" since the result I get is an alpha mask that is fully white... which sounds like what the output means by an "opaque" alpha. What could be causing my alpha channel to turn all white?
  2. Yea it turns out both of you mentioned things I was doing incorrectly. I was missing the 0.5 offset for my pixel coordinates. I was also not lerping in the correct order. Thanks! Here's the final result which works as expected: Texture2D g_texture : register(t0); struct pixel_in { float2 tex_coord : TEXCOORD; }; float3 bilinear(float2 texcoord, float tex_dimension) { float3 result; // red channel float4 reds = g_texture.GatherRed(g_sampler, texcoord); float r1 = reds.x; float r2 = reds.y; float r3 = reds.z; float r4 = reds.w; float2 pixel = texcoord * tex_dimension + 0.5; float2 fract = frac(pixel) float top_row_red = lerp(r4, r3, fract.x); float bottom_row_red = lerp(r1, r2, fract.x) float final_red = lerp(top_row_red, bottom_row_red, fract.y); result.x = final_red; // green channel float4 greens = g_texture.GatherGreen(g_sampler, texcoord); float g1 = greens.x; float g2 = greens.y; float g3 = greens.z; float g4 = greens.w; float top_row_green = lerp(g4, g3, fract.x); float bottom_row_green = lerp(g1, g2, fract.x); float final_green = lerp(top_row_green, bottom_row_green, fract.y); result.y = final_green; // blue channel float4 blues = g_texture.GatherBlue(g_sampler, texcoord); float b1 = blues.x; float b2 = blues.y; float b3 = blues.z; float b4 = blues.w; float top_row_blue = lerp(b4, b3, fract.x); float bottom_row_blue = lerp(b1, b2, fract.x); float final_blue = lerp(top_row_blue, bottom_row_blue, fract.y); result.z = final_blue; return result; } float4 PS(pixel_input pin) : SV_Target { uint width_texels; uint height_texels; g_texture.GetDimensions(width_texels, height_texels); float4 result = float4(0.0f, 0.0f, 0.0f, 1.0f); result.xyz = bilinear(pin.tex_coord, width_texels); return result; }
  3. I am trying to create a bilinear interpolation filter using HLSL and the GatherRed / GatherGreen / GatherBlue functions but I am getting really poor results compared to a proper hardware bilinear filter as you can see in the image attached to this post. Here is the pixel shader code I am using: Texture2D g_texture : register(t0); struct pixel_in { float2 tex_coord : TEXCOORD; }; float3 bilinear(float2 texcoord, float tex_dimension) { float3 result; // red channel float4 reds = g_texture.GatherRed(g_sampler, texcoord); float r1 = reds.x; float r2 = reds.y; float r3 = reds.z; float r4 = reds.w; float2 fract = frac(texcoord.xy * tex_dimension); float top_row_red = lerp(r1, r2, fract.x); float bottom_row_red = lerp(r3, r4, fract.x); float final_red = lerp(bottom_row_red, top_row_red, fract.y); result.x = final_red; // green channel float4 greens = g_texture.GatherGreen(g_sampler, texcoord); float g1 = greens.x; float g2 = greens.y; float g3 = greens.z; float g4 = greens.w; float top_row_green = lerp(g1, g2, fract.x); float bottom_row_green = lerp(g3, g4, fract.x); float final_green = lerp(bottom_row_green, top_row_green, fract.y); result.y = final_green; // blue channel float4 blues = g_texture.GatherBlue(g_sampler, texcoord); float b1 = blues.x; float b2 = blues.y; float b3 = blues.z; float b4 = blues.w; float top_row_blue = lerp(b1, b2, fract.x); float bottom_row_blue = lerp(b3, b4, fract.x); float final_blue = lerp(bottom_row_blue, top_row_blue, fract.y); result.z = final_blue; return result; } float4 PS(pixel_input pin) : SV_Target { uint width_texels; uint height_texels; g_texture.GetDimensions(width_texels, height_texels); float4 result = float4(0.0f, 0.0f, 0.0f, 1.0f); result.xyz = bilinear(pin.tex_coord, width_texels); return result; } I'm really not sure what I'm doing wrong here, there doesn't seem to be much linear interpolation hapening in my version but I'm not sure why.
  4. Thanks a lot for your help, it looks like everything is normal. I`m able to create premultiplied and straight alpha images. The RGB channels are intact when in straight alpha and they're properly "clipped" when premultiplied. I was just interpreting the results incorrectly from inside my application. So using .TGA was the fix I needed.
  5. I'm using photoshop cs5 here, is it considered old at this point? I just tried TGA and it does save the alpha channel! The output from texconv is: reading .\cat_bmp.tga (512x512 R8G8B8A8_UNORM 2D) as (512x512,10 BC3_UNORM 2D α:NonPM) writing cat_bmp.DDS It says that the alpha is "NonPM", however it clearly seems premultiplied to me since the transparency effect is visible in the image. Shouldn't the transparency effect not be visible unless the alpha is premultiplied? Also interestingly texdiag.exe says that the alpha mode of the .DDS file is "Unknown". Maybe it's actually premultiplied?
  6. No not at all, I also tried with a PNG with no luck. Is there a better format?
  7. maxmaxmax

    Best Resources\Articles\Forums

    I really like these weekly posts: https://jendrikillner.bitbucket.io/post/
  8. maxmaxmax

    Math I need to know to make shaders

    I'd like to suggest you to download unreal engine 4 and experiment with creating material effects. I have learned a lot by making material shaders for visual effects using cascade and the material editor. They have a map called "Math Hall" in the content example project that has a lot of examples to get you started. Between the documentation, the math hall and the forums, you will have no problem finding answers to your questions. I recommend you use the "Debug nodes" a lot to follow the math.
  9. maxmaxmax

    Special effects

    If you are really looking into learning real-time visual effects, I highly recommend you check out the tutorials of Bill Kladis and ImbueFX. It is a one of a kind source of information on this topic and a true gold mine on this specific art form. It's difficult to gain knowledge about this subject on the internet right now, which is why I want to make tutorials for it.   If I was you, to be honest I would not spend too much time learning Cascade but I highly recommend you get familiar with Unreal Engine 4 and the blueprint system. Once Niagara comes out, learn EVERYTHING there is to know about it and go wild experimenting. Get familiar with shaders/materials, they are very powerful for creating more advanced effects.   Hope this helps!
  10. Hello everyone!   First I would like to mention that my background is in programming. I have been programming games in C++ inside of UE4 since it came out almost 2 years ago and I had been programming for a year before that. For the last 4 months I have been learning all I could find about creating real-time VFX. I have made great progress and I feel like this is something I would like to do professionally. Now that I have a solid grasp of Cascade and how to work with shaders I have chosen to learn Houdini to create my animated textures using particle simulations (fluids, particles, PyroFX). Note that my modelling skills are limited to creating shapes to support the effects that I make, which is basic geometry and abstract shapes.   Now to my question:   Do I have any chance of getting hired as a VFX artist at a big triple-A with my skill set? Which currently does not include any traditional art skills, advanced modelling skills or animation skills besides animating Dust/Fire/Smoke/Magic/Water?    I really believe that I can create a convincing demo reel by leveraging my current skills but I'm afraid that employers might not be interested in hiring somebody without an art background.
  11.   Then keep working at it!     The FAQ answered all of my questions at this point, so thank you for writing that. I'll definitely keep going back to it in the future. I just couldn't help but have doubts about my lack of traditional art background. VFX art feels so unique and different, the more I experiment the more I find that being creative with shaders is what creates those effects that "wow" people (especially other VFX artists :P).
  12. Thank you Tom and cozzie for the quick replie!        What I want to specialize in and market myself as is somebody who is great at making magic effects for abilities in RPG games. This is as specialized as I'd like to become :p       1. Yes, there is a chance. The probability may be rather low, but we can't know without the limited information you've provided. Like, for instance, how many AAA companies are there within daily commuting distance of where you live? 2. Prove it. Make that demo reel. 3. Got a portfolio and a demo reel?    You probably ought to read this forum's FAQs.     I apologize for not reading the forums FAQs, it does look like an amazing resource and I will read it right now! I am lucky and live in Montreal so there is definitely a few. My plan for the demo reel is to pick the best effects that I made for this RPG game I am making with a friend. I have a few already on display on my youtube channel but I don't think they are good enough yet to be put in my demo reel. You can take a look here if you're curious!   https://www.youtube.com/channel/UCpfZAiE91IPM17X4zZWpsFQ/videos?sort=dd&view=0&shelf_id=0
  13. Hello everyone!   A bit of relevant information about me:   I have been programming for 2 years and making games using Unreal Engine 4 since it came out last year. I've also been studying C++ with the help of a friend who works at Ubisoft for around 6 months. I am familliar and comfortable with the basic topics of C++ that are taught in Bjarne Stroustrups book "Programming principles and practices using c++". I very much enjoy working with C++ in UE4 and I find the language itself very deep and interesting compared to the Java and C# I learned in school. Memory management and the theory that goes with it is really cool to learn about.   I also happen to have studied graphic design for 3 years before that and have developed good design sensibilities and know about art theory, I can draw pretty well and have worked for a short period of time as a graphic designer.   I know for a fact that programming is what I enjoy the most and it's what I want to do. However I still don't know what kind of programming work I want to do in the context of a video game company. I know I want to work for AAA studios because I feel like that's where all the cool and cutting edge technology is hapenning and I have my sights set on Ubisoft montreal. I feel like knowing what role I want to have would help me figure out what to study next or what kind of project feature to put efforts on.   So my question to you is: What programming jobs out there can somebody who likes programming in C++ and low-level memory stuff, who also happens to have a good taste for what looks good? Is there anything that merge both of those skills?   Thank you!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!