• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

167 Neutral

About thmfrnk

  • Rank
  1. Hi,   I'm wondering how to use one of the current available VR tools like HTC Vive in own applications. Unfortunately the websites and explanations are not really clear for me. I always found stuff for Unity, Unreal and Steam but is there no simple SDK for to use in own applications? I've done several business realtime 3D applications where I would like to integrate a VR Support. Is there someone could help or already haves expirience with thoose tools?   Thx, Thomas
  2. // Get Picking Ray from Camera Public Function GetPickingRay(sp As Vector2) As Ray Dim v1 As Vector3 Dim v2 As Vector3 Dim vp as Matrix = GetViewProjMatrixFromCamera() Dim Point As Vector3 = New Vector3(sp.X, sp.Y, 0) v1 = Vector3.Unproject(Point, Viewport.X, Viewport.Y, Viewport.Width, Viewport.Height, Viewport.MinZ, Viewport.MaxZ, vp) Point.Z = 1 v2 = Vector3.Unproject(Point, Viewport.X, Viewport.Y, Viewport.Width, Viewport.Height, Viewport.MinZ, Viewport.MaxZ, vp) Dim Loc As Vector3 = v1 Dim Dir As Vector3 = Vector3.Normalize(v2 - v1) Return New Ray(Loc, Dir) End Function ... // Get Ray at Mouse Position Private Function GetTransformedRay(MousePos As Vector2, worldMat As Matrix, Editor As TEditor) As Ray Dim cRay As Ray = Editor.MyView.Camera.GetPickingRay(MousePos) Dim InvMat As Matrix = Matrix.Invert(worldMat) Return New Ray(Vector3.TransformCoordinate(cRay.Position, InvMat), Vector3.TransformNormal(cRay.Direction, InvMat)) End Function Here some Code, how I am doing ray picking an object. Using the GetTransformRay function you will get the Ray in ObjectSpace for the Object you want to test.
  3. Hey,   I am looking for a way to store my Texture-Pool in a more efficient way. Actually I simply use the Texture2D.ToFile option from SlimDX and save it as a DDS. Unfortunatly it does not give an option to save it as a compressed DDS file, so it ends up in very big files. So what would be the fasted way to store it as compressed DDS files? I am using DX11..   THX, Thomas
  4. DX12

    The biggest Pro for SlimDX by my opinion is, that it works fine with VB.NET. SharpDX does not support VB.NET because they messsed up some case sensitive exports. Another big point are projects which are already done in SlimDX. So @promit, pleeeeaasse continue your great work! :rolleyes:
  5. Hey,   I was wondering if someone ever tested if there is a performance difference between using an UAV to write in a second texture while rendering in another target or simply using an MRT. In some cases it could be easy using an UAV, especually if you want to write in specual conditions without struggeling with blending.   Cheers,  Thomas
  6. DX11

    mhh this is really frustrating, because I am bound to slimdx and there is no dx12. But the strange thing is, that its already possible for PhysX to move this to the second card and I don't think that PhysX is moving all the data back to CPU.
  7. Hi,   I am working actually on my compute shader based fluid simulation and I thought to power it up by testing two GTX980 in SLI. Finally I noticed that there is no benefit because he's using only one GPU. However I think it could be possible by using two DX11 devices bound to booth adapters. In that case the first could run the rest of my application (deferred lighting stuff and others) and the second one haves enough power for my phyisics. So my questions are: Is that possible? I think I would need some kind of device independend buffers to share the result of the physics.   Does everyone have some expirience here?   Thx, Thomas
  8. Hi _void_   thank you for your answer. I got it working like you suggested and its workling like a charm. BUT the problem I have now is the Grid-Size. I need to cover an 3D area of about 200x200x20m (and bigger) and to be fast enough I need a cell size of 10cm. In that case my lookup table (where I store the first and last Index of my sorted IndexList), would be about 6GB. Of course only 2% of cells would be filled so a lot of wasted storeage. I know DX12 comes with VolumeTiledRessouces, but I need to stay on DX11. Any idea?   thx, Thomas
  9. Sorry I am not that math pro, but I need to get it work for vector 3 positions and 32bit indices. I would appreciate any code examples ;)
  10. Hello,   I try to implement an SPH Fluid Simulation based on DirectX 11 Sample from the SDK. I got the N² working, but the Grid/Sort is hard to understand for me. In the example (done by Matthias Müller an Scott Le Grand) from DirectX, the Grid is limited to a 16bit hash so "only" 64K particles. But I need at min 32-Bit and way bigger grid.   Here some code of the sample, where he's constructing the Grid. I've no idea what he's doing here and how to extend it to 32bit..   EDIT: And I also need to extend this to 3D positions, as my fluid is not 2D like in the Demo. //-------------------------------------------------------------------------------------- // Grid Construction //-------------------------------------------------------------------------------------- // For simplicity, this sample uses a 16-bit hash based on the grid cell and // a 16-bit particle ID to keep track of the particles while sorting // This imposes a limitation of 64K particles and 256x256 grid work // You could extended the implementation to support large scenarios by using a uint2 float2 GridCalculateCell(float2 position) { return clamp(position * g_vGridDim.xy + g_vGridDim.zw, float2(0, 0), float2(255, 255)); } unsigned int GridConstuctKey(uint2 xy) { // Bit pack [-----UNUSED-----][----Y---][----X---] // 16-bit 8-bit 8-bit return dot(xy.yx, uint2(256, 1)); } unsigned int GridConstuctKeyValuePair(uint2 xy, uint value) { // Bit pack [----Y---][----X---][-----VALUE------] // 8-bit 8-bit 16-bit return dot(uint3(xy.yx, value), uint3(256*256*256, 256*256, 1)); } unsigned int GridGetKey(unsigned int keyvaluepair) { return (keyvaluepair >> 16); } unsigned int GridGetValue(unsigned int keyvaluepair) { return (keyvaluepair & 0xFFFF); } //-------------------------------------------------------------------------------------- // Build Grid //-------------------------------------------------------------------------------------- [numthreads(SIMULATION_BLOCK_SIZE, 1, 1)] void BuildGridCS( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { const unsigned int P_ID = DTid.x; // Particle ID to operate on float2 position = ParticlesRO[P_ID].position; float2 grid_xy = GridCalculateCell( position ); GridRW[P_ID] = GridConstuctKeyValuePair((uint2)grid_xy, P_ID); } //-------------------------------------------------------------------------------------- // Build Grid Indices //-------------------------------------------------------------------------------------- [numthreads(SIMULATION_BLOCK_SIZE, 1, 1)] void ClearGridIndicesCS( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { GridIndicesRW[DTid.x] = uint2(0, 0); } [numthreads(SIMULATION_BLOCK_SIZE, 1, 1)] void BuildGridIndicesCS( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex ) { const unsigned int G_ID = DTid.x; // Grid ID to operate on unsigned int G_ID_PREV = (G_ID == 0)? g_iNumParticles : G_ID; G_ID_PREV--; unsigned int G_ID_NEXT = G_ID + 1; if (G_ID_NEXT == g_iNumParticles) { G_ID_NEXT = 0; } unsigned int cell = GridGetKey( GridRO[G_ID] ); unsigned int cell_prev = GridGetKey( GridRO[G_ID_PREV] ); unsigned int cell_next = GridGetKey( GridRO[G_ID_NEXT] ); if (cell != cell_prev) { // I'm the start of a cell GridIndicesRW[cell].x = G_ID; } if (cell != cell_next) { // I'm the end of a cell GridIndicesRW[cell].y = G_ID + 1; } } Is there someone could help me here?   Thanks in advance, Thomas
  11. Hi,   I'm looking for a way to give my users the option to use automatically generated UV coords instead of UVs delivered by imported meshes. So something equal like in Cinema 4D where you can choose between UVW, Cubic, Cylindric, Spherical, etc.. mapping. Finally I want to generate the UVs based on vertex positions and normals. I think this should be possible in Vertex or Geometry shader, but I've no idea actually. I know the result would not be always perfect for non-convex meshes, but most cases are for simple boxes, spheres or planes.   Any help, links or codes are appreciated.   Thanks, Thomas
  12. Oh fu** ... sorry guys. I was calling the dispatch(8, 8, 0) instead of (8, 8, 1) DirectX gives me millions of warnings for each pice of shit, why not in this case.. this took me the whole day..
  13. Hi,   I'm getting crazy actually. I simply try to write to a texture using a Compute Shader. I've tried lots of formats but the texture keeps black. Is there anything I forgot?   Here some code:   This is how I create Texture, SRV and UAV Dim TexDex As New Texture2DDescription TexDex.Format = DXGI.Format.R16G16B16A16_Float TexDex.ArraySize = 1 TexDex.BindFlags = BindFlags.ShaderResource Or BindFlags.UnorderedAccess TexDex.Height = View.Camera.Viewport.Height TexDex.Width = View.Camera.Viewport.Width TexDex.MipLevels = 1 TexDex.Usage = ResourceUsage.Default TexDex.SampleDescription = New DXGI.SampleDescription(1, 0) TexDex.CpuAccessFlags = CpuAccessFlags.None LitBuffer = New Texture2D(MyEngine.Device, TexDex) LitBuffer.DebugName = "TestBuffer" Dim SRV As New ShaderResourceViewDescription SRV.ArraySize = 1 SRV.Format = DXGI.Format.R16G16B16A16_Float SRV.Dimension = ShaderResourceViewDimension.Texture2D SRV.MipLevels = 1 LitBuffer_SRV = New ShaderResourceView(MyEngine.Device, LitBuffer, SRV) Dim UAV As New UnorderedAccessViewDescription UAV.Dimension = UnorderedAccessViewDimension.Texture2D UAV.FirstElement = 0 UAV.Format = DXGI.Format.R16G16B16A16_Float UAV.ElementCount = TexDex.Width * TexDex.Height LitBuffer_UAV = New UnorderedAccessView(MyEngine.Device, LitBuffer, UAV) and here my simple Compute Shader (I just want to write 255x255 pixels) so I dispatch him with 8x8x1 groups RWTexture2D<float4> LitTexture : register ( u0 ); [numthreads(32, 32, 1)] void RenderLight( uint3 localIdx : SV_GroupThreadID, uint3 groupIdx : SV_GroupID, uint3 globalIdx : SV_DispatchThreadID ) { LitTexture[globalIdx.xy] = float4(1.0f, 1.0f, 0.0f, 1.0f); } what I'm doing wrong?  
  14. Yes I have the Position (vec) and Rotation (quaternion) available but its also not easy to "fade" them synchronous. I think what I want is called WeightedAverage Interpolation: http://sol.gfxile.net/interpolation/   or here http://www.gizma.com/easing/   Of course breaking this down on a easy-to-use "ApprochMatrix" function would be ideal, because this can be used also for other cool stuff.
  15. Hi,   In my editors I always try to keep the camera movements as smooth as possible. Now I try to get this done by interpolating the ViewMatrix. I want that my Camera should follow my mouse interactions with a small delay (don't know how to explain in english). So finally I have an ViewMatrix (will be used for rendering) and ViewMatrixTo (the target matrix he should fade to).   My first idea was to simply interpolate each component of the matrix with a function like this: Public Shared Sub ApproachTo(ByRef Value As Single, ByVal ValueTo As Single, ByVal Delay As Single, Optional MinDiff As Single = 0.01!) Value = (Delay * (Value - ValueTo)) + ValueTo If Math.Abs(ValueTo - Value) < MinDiff Then Value = ValueTo End Sub Public Shared Sub ApproachMatrix(ByRef MatIn As Matrix, ByVal MatrixTo As Matrix, ByVal Delay As Single) For c As Integer = 0 To 3 For r As Integer = 0 To 3 ApproachTo(MatIn.Item(c, r), MatrixTo.Item(c, r), Delay, 0.00001) Next Next End Sub This is working, but it produces distortions because I think its a linear interpolation and the rotation/position components needs to be interpolated in a spherical way? I already found some slerp functions on quaternions and vectors but I don't really have a "factor", I only have a CurrMatrix and ToMatrix and every frame he should approach this matrix.