Jump to content
  • Advertisement

den_wan

Member
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

164 Neutral

About den_wan

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. den_wan

    DX12 problem with layered MRT

    yes, i am rendering the exact same data to my layered MRT. so both pictures should look the same. and i fixed my problem. turns out that creating a texture array with 0 miplevels is not a good idea.
  2. den_wan

    DX12 problem with layered MRT

    for some reason in my browser the post looks terrible and i can't edit it...
  3. rerndering to the first layer works just fine: but the second layer looks this: resource descs: http://pastebin.com/zetRzV9t rtv desc: http://pastebin.com/905tW9Lx dsv desc: http://pastebin.com/YtY6rLL2 vertex shader: http://pastebin.com/8UYhzNKW geometry shader: http://pastebin.com/t5nBAWFA pixel shader: http://pastebin.com/Ljbchrre ---------- for rendering gbuffer srv desc: http://pastebin.com/guDMnWqP screenquad vs: http://pastebin.com/qUz0YRiy screenquad gs: http://pastebin.com/1LymhJ4W screenquad ps: http://pastebin.com/yBehwuBz
  4. got it almost working now (too retarded to scale from 540 to 1080):     as mentioned above, blue area is shadow. still need to enlarge the triangle during step 6 when testing against voxel grid somehow.
  5. i'm currently trying to get a ray tracer working that uses a voxel grid as an acceleration structure, like they described in GPU Pro 5. my pipeline currently looks like this:   1. voxelize scene and flag occupied voxels 2. create gbuffer 3. create rays from gbuffer 4. test rays against voxel grid and find out how many overlaps there are for ray link offsets 5. create ray links 6. voxelize again and test triangles against voxel grid, getting how many voxels they overlap. put the triangle-voxel pair into buffer. 7. test triangle-voxel pair against ray links   the ray link structure is basically just the index of the ray that it was created from. in the mentioned article they sort by morton code, i couldn't get that working properly. so i just do work twice and "allocate" space for the ray links in step 4, writing the offsets into another 3d texture.   currently i am just trying to get shadows working, and the following picture shows my problem that i have atm. the red area are the pixels with rays that do not intersect any occupied voxels towards the light. the green area are pixels with rays that intersect occupied voxels. the blue area are pixels that are blocked from the light, basically in shadow. the light is somewhere between the player and the sphere, but slightly higher.   there should be shadows cast from the sphere and in the doorway. also most of the room on the right should be in shadow. additionally the blue parts in the picture flicker.   from what i can tell the rays and ray links seem ok. the generated voxel-triangle pairs also contain valid data. i'm pretty sure i make a mistake checking the triangle against the voxels in step 6: http://pastebin.com/jmd5A4bK   other than that i have no clue.    ----------------------------------------------------------------------------------------   i fixed step 6.   still got that flickering, not sure yet how to fix it. and probably step 7 does not test against all ray links, gonna investigate that next.
  6. yeah so basically the problem are the specular reflections.   i made a second 3d texture with 2 mip levels that covers a smaller area and this is currently how it looks. cone traced color * reflectance value   i'm still not sure how the indirect specular fits in with the brdf. do i just (indirect specular * specular) ?   how does voxel cone traced specular reflection compare to other methods, like screen space cone traced reflections etc. ?
  7.   you can see in the picture that the color at the base of the pillar is not correct. as far as i can tell this seems to be a resolution problem, i decreased the grid size that the voxel texture covers and the problem is not as pronounced as before.     is there any way, besides increasing resolution, that i can solve this ?
  8. den_wan

    Problem with tangents (fbx)

    the thing is, i already store everything per vertex when i import the .fbx file. i'm gonna try storing the handedness as well and see if that helps, if not then i'm probably doing something wrong importing.   i tried importing using the new assimp that supports .fbx and it still doesn't work properly.   this is what i get when i apply the tbn matrix on the normal map:   there are still some areas that don't have the right values.   so i made a unit cube in maya and imported it with assimp. i got the following data for n, t, b http://pastebin.com/PLdfd6Qx this is the normal map:   and the following is the resulting nDotL with a light vector of {0, 0, 1}:   as you can see, the top (and right) is brighter than the left/bottom side, but it should have the same brightness as the left.   for example it generates the following values for the vertices on the top side:   normal = {0, 1, 0} tangent = {1, 0, 0} bitangent = {0, 0, -1}   but for nDotL to be correct the bitangent should be {0, 0, 1}   -------------------------------------------   well turns out it's just some problem with the texture.... :D all this work i've done.
  9. den_wan

    Problem with tangents (fbx)

    some triangles have tangents with different handedness, how do i handle that ?
  10. den_wan

    Problem with tangents (fbx)

    ok i guess the pictures in the first post might not show the problem clearly, so here are pictures of diffuse nDotL.   maya generated tangents/bitangents:   self generated tangents/bitangents:   the light comes directly from the front. as you can see the result is partly wrong.   now maya gives you the handedness of the tangent, and i do have some that are left handed, but i don't do anything with that atm and just leave them as they are. when i generate them myself i compute my bitangent with: cross(n, t) * handedness.   i just exported the normal map in object space, and this is what i get:
  11. den_wan

    Problem with tangents (fbx)

    are you sure the tangents are correct ? because on top of the head there is this weird area.
  12. den_wan

    Problem with tangents (fbx)

    What are you displaying? Tangents, or normals? You should compute binormal as cross porduct of tangent and smooth normal, then display to yorself smooth normals and binormals, those should be smooth, tangents are never smooth. Tangent are equal for all three verticies and are of very triangle plane contained.   if you mean the picture, that is the light vector in tangent space.   normals:   tangents:   bitangents:
  13. so i have some issues with bump mapping meshes made in maya. using tangents/bitangents generated by maya or generating them myself gives me pretty much the same result.   here some screenshots showing the light vector (light source is at {0, 50, 50}) in tangent space with tangents from maya and self-generated:     i'm pretty much out of ideas atm.   i generate my tangents/bitangents like described here: http://www.terathon.com/code/tangent.html   just in case here is the code: http://pastebin.com/S5t9EMJ3
  14. den_wan

    Voxel Cone Tracing Problem

    yes i'm using GL_LINEAR_MIPMAP_LINEAR filtering.   i convert my world space position to voxel space like this:   it is basically the same as:   i removed the round() and it does improve some things, but everything is still blocky as hell.   so i had this idea that it does not properly filter the R32UI texture and switched to RGBA16F. it looks much better now, but still some minor issues at the edges for example:
  • 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!