victorqhong

Member
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

469 Neutral

About victorqhong

  • Rank
    Member

Personal Information

  • Interests
    DevOps
    Programming
  1. DX11 FBX UV coordinates Problem

    There are different ways UVs can be stored in a FBX file (per-vertex, per-index). Try checking your mesh and see if you're parsing it correctly. You can checkout the DisplayMesh example[0] in the FBX SDK to see how to do that. [0] - http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/cpp_ref/_import_scene_2_display_mesh_8cxx-example.html
  2. OpenGL Vulkan is Next-Gen OpenGL

    Why would MS have to do anything? They don't support OpenGL, Mantle, OpenCL and CUDA and yet they all work just fine... this is no different.     I was trying to bring up the fact that some people believe that Microsoft sabotaged the OpenGL implementation on Windows to increase DirectX adoption. And whether Microsoft will allow Vulkan and Mantle to be first-class citizens with DX12 (if it's even possible) and whether Microsoft will keep their open-source friendly ways up (like Promit mentioned).   IIRC, Apple has to explicitly allow support for new APIs because they write their own drivers. So "it just works" isn't always possible.
  3. OpenGL Vulkan is Next-Gen OpenGL

    Looks like Khronos finally got their API redesign, pretty good timing too.   But in order for this to take off there needs to be good drivers. Not sure if Apple will keep up-to-date drivers (past bad OpenGL support, Metal) and not sure how Microsoft will cooperate (DX12 still not available). So it's mostly up to the GPU manufacturers (NV, AMD, Intel, PowerVR) to maintain good drivers. From [0], it looks like there's still a lot of work to be done.   [0] - www.youtube.com/watch?v=KdnRI0nquKc
  4. B-Spline Surface Normal

    Thanks guys. With your help I have been able to compute what appears to be the correct normals (when compared to the central differences method.)     I don't have too much background in these topics so it's completely possible I'm using the terminology wrong. But yes, I am dealing with B-spline surfaces. I'm just assuming that all the weights are one (for now).     Thanks for the clarification. It was actually the website you posted that initially confused me. Their definition for \(Q_i\) involves a difference in control points but I see now that that is from a simplification and not from the derivative.   I actually found the computation of the basis functions and their derivatives to be pretty simple. I just took a dynamic programming approach and computed the values from their definition directly. As long as you compute them from the "bottom up" and store the values as you go, the code is relatively simple and straight forward. Though, I haven't looked at the algorithms you guys posted, so maybe there are gains to be made somewhere.   I don't have a particular use case for B-spline surfaces in mind at the moment. I'm more experimenting with GPU tessellation and decided to use B-splines. Now I'm going to come up with an intelligent level of detail scheme and see how many I can render at once.   I would be interested in hearing what you guys are doing with them though.   Thanks again, Victor    
  5. B-Spline Surface Normal

    I'm trying to compute the analytic normals for a B-Spline surface. I know the normal is the cross product of the partial derivatives of the surface but I'm not sure if I'm taking the partial derivatives correctly.     Since a B-Spline surface is just the sum of the basis functions in each direction multiplied by the control points (2), I should just be able to take the derivative of each term and add them up (3), correct?   I'm getting the derivative of the basis function from [0].   What about the control points? Are they constant with respect to u and v? How do I take their derivative?   Thanks, Victor   [0] - http://members.gamedev.net/skyork/pdfs/Bspline_Construction_Summary2005.pdf
  6.   I would say use DirectCompute to update your 3D texture, it might be better suited for that type of computation. 
  7. iOS game dev. ?

      If you want to roll your own engine then an option for cross-platform development is to use Xamarin. It allows you to develop for the Android, iOS, and OSX SDKs (including OpenGL ES API) in C#. That way, you can have one codebase that you have total control over and that can deploy relatively easy to each platform.   I personally have not tried it but I am looking into it. I believe there are no restrictions on the license once you buy it. And if you are a student then you can get a license for each platform for $99.
  8. Starting out with graphics

    Once you're ready to get into DirectX, I would recommend Introduction to 3D Game Programming with DirectX 9.0C A Shader Approach as a book to read/reference material. It goes from mathematical foundations to shaders and all the way to shadow mapping. It even includes a (short) section about Win32 API programming as it relates to game programming.
  9. The largest component of the normal vector tells you which face it intersects. Next divide the normal vector by the absolute value of the largest component. Then scale and shit the other two components into the usual range for uvs ([0, 1] on each axis). For example if you had the vector <-3, -1, 2>. First it intersects the negative x face. Then <-3, -1, 2> / |-3| = <-1, -1/3, 2/3>. Finally just scale the remaining two components from [-1, 1] to [0, 1], <-1/3, 2/3> * 0.5 + 0.5 = <2/3, 5/6>. And similarly for each other face. Victor
  10. Try this and see if this works. In Main, delete the "using (Game game1...) { ... }" block, create your own GraphicsDevice (you have to use WinForms), and copy and paste the code from the article. [CODE] static void Main(string[] args) { GraphicsDevice device = new GraphicsDevice(); <code from the article> } [/CODE] Then make sure you call GraphicsDevice.Present() in your render() function [CODE] void render(state, GraphicsDevice) { GraphicsDevice.Clear(); <render using state> GraphicsDevice.Present(); } [/CODE] Hopefully that should work. If you want your gameloop to integrate better with the Windows message loop you can read this ([url="http://blogs.msdn.com/b/tmiller/archive/2005/05/05/415008.aspx"]link[/url]). Let me know how it works out. Victor
  11. Hi, You might want to read how Valve did wounds in Left 4 Dead 2 for inspiration. [url="http://alex.vlachos.com/graphics/Vlachos-GDC10-Left4Dead2Wounds.pdf"]http://alex.vlachos.com/graphics/Vlachos-GDC10-Left4Dead2Wounds.pdf[/url] Victor
  12. Can anyone shed some light on how DICE did their profiling in Battlefield 3 like they show on slide 13 of their paper [font="Arial, Helvetica, Verdana, sans-serif"][size="2"]"Culling the Battlefield Data Oriented Design in Practice" [/size][/font]([url="http://publications.dice.se/attachments/CullingTheBattlefield.pdf"]link[/url]) or how I would make a profiling system similar to theirs for my applications? [url="http://imageshack.us/photo/my-images/822/bf3profiling.png/"][img]http://img822.imageshack.us/img822/4189/bf3profiling.th.png[/img][/url] Thanks, Victor
  13. Basic Image Processing (XNA)

    It is possible to modify the individual pixels in a texture in XNA. It would go something like this: [code] Texture2D texture = Content.Load<Texture2D>(@"path\to\texture\to\blur"); Color[] textureData = new Color[texture.Width * texture.Height]; texture.GetData<Color>(textureData); // do something with textureData texture.SetData<Color>(textureData); [/code] You would have to replace the type Color with whatever you texture actually holds (you can figure out by looking at the Format property). The only drawback to this approach is that it's slower than using shaders. With this method you have to copy the texture from the graphics card to the cpu and back (with shaders the texture is modified by the graphics card and stays on the graphics card.) So with large textures this approach is not real-time friendly. What you could do is blur your texture at run-time and blend between the blurred and unblurred version of the texture. Though I would recommend you to learn HLSL since no other options exist in XNA or DirectX 10+. Victor
  14. Hi WarAmp, Looking at your results it seems like your analytical solution is correct. The strange thing is that in all of the atmospheric scatting papers I've read, none have mentioned that this integral can by solved this way. They always rely on look-up tables or different sampling techniques. Funny thing is that I think Sean O'neil was getting close to analytically solving the integral in the article itself (section 16.4.1). Inigo Quilez presents a solution similar to yours on an article on his website ([url="http://iquilezles.org/www/articles/fog/fog.htm"]link[/url]) if you would like to compare. Victor