• 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

208 Neutral

About StanIAm

  • Rank
  1. Hey I have a problem implementing shadow mapping. For the shadow map I render a 512*512 pixel image from the view of the light. In the final shader I use the gbuffer and the shadow map to do these: float2 projcoord; float mydepth; float lightdepth; float4 lightviewpos = mul(position,LightViewMatrix); lightviewpos = mul(lightviewpos,LightProjectionMatrix); projcoord.x = lightviewpos.x / lightviewpos.w / 2.0f + 0.5f; projcoord.y = -lightviewpos.y / lightviewpos.w / 2.0f + 0.5f; if( (saturate(projcoord.x) == projcoord.x) && (saturate(projcoord.y) == projcoord.y)) { mydepth = rsm_pos.Sample(pointSampler,projcoord).z / rsm_pos.Sample(pointSampler,projcoord).w; lightdepth = lightviewpos.z / lightviewpos.w; lightdepth -= 0.001f; if( lightdepth < mydepth) { return diffuse; } } I don't know why it doesn't work, it seems to be right. Can somebody help me ?  
  2. I got it work, but it still have some artifacts which looks not realy good. Look at the picture: [URL=http://www.directupload.net/file/d/3750/pauqa3vy_jpg.htm][/URL]   Now Iam using a 3x3 depth depth kernel but on some detailed geometry I still have artifacts. Has somebody an idea how to improve that ??
  3. Hey guys Iam trying to combine a lowres indirect illumination texture of 256x256 pixels with a 1024x1024 highres texture. I saw this article here : http://developer.download.nvidia.com/presentations/2010/futuregameon/LouisBavoil_ModernRealTimeRenderingTechniques.pdf   On page 20, a technique from a game is described to combine the lowres particels of the game with the fullres rendering. Well I implemented it the same way, but I don't get a realy good result. I use 4 samples which are defined like this : float2( tex.x - lowres_texel,tex.y ) , float2( tex.x + lowres_texel, tex.y) , float2( tex.x, tex.y + lowres_texel) , float2( tex.x, tex.y - lowres_texel), where tex is the texcoord of the current highres pixel and lowres_texel = 1/256.   Then I going through a for loop and combine the new depthdistance to the highresdepth with the previouse ones and save the index of the sample, which has the nearest depth of all. After that I look if the sample is in the range from 0-3( that would be the 2x2 samples, and  when -1 is sampled only with the standart texcoord tex) and output the color from this sample.    How could I improve it ?? Because in the paper it works realy good  Thanks
  4. Got it, the init UAV Buffer size was to small, now it works :)
  5. Hey guys I have a little blackout right now and I don't know why my code doesn't work. I try to optimize some GI stuff with Reflective Shadow Mapping with Computeshader and lowres filtering. In the first stage a computeshader samples the RSM and create a structured buffer with virtual point lights with the color,position and normal of the VPL. This is done by using 32 * 32 samples with 32 * 32 threads. But it seems in the result, that only the first row on the top of the image is captured and the other not....well this is the problem.   Here is the VPL code: SamplerState samplerType : register( s0 ); Texture2D RSMColor : register( t4 ); Texture2D RSMNormal : register( t5 ); Texture2D RSMPosition : register( t6 ); struct VPL { float4 color; float4 normal; float4 position; }; RWStructuredBuffer<VPL> VPLBuffer : register(u0); #define NUM_X 32 #define NUM_Y 32 [numthreads(NUM_X,NUM_Y,1)] void CSMain(uint3 threadID : SV_GroupThreadID) { VPL tmp; float2 texcoord; texcoord = float2(threadID.xy / 32.0f); tmp.color = RSMColor.SampleLevel(samplerType,texcoord,0); tmp.position = RSMPosition.SampleLevel(samplerType,texcoord,0); tmp.normal = RSMNormal.SampleLevel(samplerType,texcoord,0) ; VPLBuffer[threadID.y * 32 + threadID.x] = tmp; } As you can see the VPLBuffer is filled with the VPL which is sampled using the threadID. The index is made of the two ids and the rowsize. My first idea was, that maybe I can't write to the VPLBuffer in a random order ( for example index 0 then index 10.....) but I'am not sure. Thank you
  6. Hey guys Iam just wondering how to draw lightflare textures in a shader to the brightest specularreflection points. I think they are called anamorhic lightflares, something like that : http://img718.imageshack.us/img718/4577/screenshot0816.jpg   Iam not sure if it is done by just doing it like a bloom shader and just increase the number of samples in the horizontal way....I also saw people doing it with lightflare textures, positioning it to the brightest points of the image but how to do that within a shader ?? Thank you
  7. Hmm thanks for the answers now I got a better view on that stuff but some parts are still to difficult for me. In the paper above (http://www.cs.columbia.edu/~cs4162/slides/spherical-harmonic-lighting.pdf) I don't understand the stuff after the Monte Carlo Estimator. So you said SH "generates" a function that gives back in average the vectors for some input numbers ? And this is done by grabing some Basicfunctions ( I guess they are called coeffecients there ?? ) to store vectors for sphercial coordiates ?? This  reminds me to the hash tables where you have a hash function that gives you a position and thus the content for an input number.   But as I understand SH is only used to save memory. But how LPV would work withozt that Iam not shure how the principle works. I always think about a Volume texture in 3D space where the Start Lightpoints are registered via the RSM and then spread with each LPV iteration through the volume and then get sampled back to the geometry.....  I do not undersdtand that maybe someone can explain it better and particularly the sense of this Geometry Volume. Thanks     PS:agleed thanks for your explanation, one question are you german ? Because I live in Germany and it would be very nice when you could write in german 
  8. Hey guys I have a question about how Light propagation volumes works.Iam not shure what the function of spherical harmonics is because I dont understand what and what for it actually is. Can somebody explain what it is used for ? And also Iam wondering how the Volumen texture of "light" is aligned back to the geometry. Sorry Iam not very advanced in math because of my age.thanks
  9. Hey guys I have a little question. I have a 256*256 texture for my indirect lighting and want to combine it with the full res rendering (1920*1080) that it looks okay. I tried to use a 3x3 gausian Blur but it still looks horrible. Here is the picture with the diffuse light + indirect Light*diffuse texture:   [URL=http://image-upload.de/file/2h8qt7/99d99786fb.jpg][/URL]
  10. But when do I do that ? My first idea was the standart way of indirect lighting with RSM : Create Vector a = reflect( Lightposition - rsm pixel position, rsm pixel normal). Now vector a is the vector which is (maybe) directed to our dest pixel. Now I do nDotL with the dest pixels normal and vector a. Now I have to multiply this float with the rsm color and divide it by the fallof. But I don't realy unterstand what you mean with the binary test. Maybe someone can give me his way of implementing that, because I thing my way is too expensive.
  11. Oh thanks that makes sense. Well the double sided equation was my first idea of doing that. Is there an other way to do that ??
  12. Hey guys I have a little problem in my implementation of indirect illumination via Pixellights and RSM. The Problem is that when I move the light I can "see" the sampling points in the scene and it looks not so good. My implementation method is now: Render the RSM with 8*8 samples with a compute shader in a UAV and then in the final deferred shading pass sum the light influence from all 8*8 samples in each pixel. I use this formula: For one pixel: float3 irradiance = float3(0.0f,0.0f,0.0f); ... for(int i = 0; i < 8*8;i++) { irradiance += diffuse.rgb(the color map) * VPLBuffer[i].color.rgb(the sample color) * (saturate(dot(VPLBuffer[i].normal.xyz,position.xyz - VPLBuffer[i].position.xyz)) * saturate(dot(normal,VPLBuffer[i].position.xyz - position.xyz))) / pow(length(position.xyz - VPLBuffer[i].position.xyz),3); } .... return float4(diff + irradiance,1.0f); When I change the exponent of the pow function to 2 or 1 theflickering goes away, but then the light is reflected by a too big distance and it looks bad.... So how to filter that stuff ?? Here is a video of the problem I have and he/she solves it by an unknown filter. http://www.youtube.com/watch?v=nnZUYg5iToY
  13. Hello I have a little question about the UAVs in directx. I read some explanations about UAVs but there are always 2 types of buffers for input and output in the examples. For my implementation I need a buffer that is only used in the shaders, so I use a pixel or compute shader to write to this buffer and in an other shader I want to read this data from it...so there is no need to manipulate the buffer in my c++ code. The problem is I saw in the tutorials that there are used 2 types of buffers, the StructuredBuffer as a ShaderResource and a RWStructuredBuffer as a UAV ( for output). My question is : why they use 2 buffers ?? Isn't it possible to create in  my c++ code the UAV -> set it to the pixelshader and that write in my first shader to it and then read it in my second pixel shader ??   Something like: //Create UAV ID3D11UnorderedAccessView* uav = .... ... m_pImmediateContext->PSSetUnorderedAccessViews( 0, 1, &m_destDataGPUBufferView, NULL ); Shader one: struct VPL { float3 pos; float3 norm; float3 flux; }; RWStructuredBuffer<VPL> buffer : register( u0 ); ... buffer[0].pos = float3(0.1f,0.5f,0.4f); Shader two: RWStructuredBuffer<VPL> buffer : register( u0 ); float3 pos = buffer[0].pos;
  14. Thank you very much for the answer. Your right it isn't very efficient when I use one 144 samples of a 1024*768 pixel rendered RSM... My idea would be to store the pixellights in an array structure with position/normal/flux so I have not to sample the points every pixel n times and have only a 1D array and only one for loop ( which I think doesn't really inscrease the speed...)  But storing the VPLs in a buffer would be more effecient I think but I have one problem with that. I don'T really know how to do that without a rendertarget...so only with a constantbuffer or any type of buffer. Is there a way to same the array of my pixellightstructure in a buffer and read it like a constant buffer in each frame ??
  15. Hello I have a question to you about some HLSL stuff.I implemented a global illumination compution with RSM and get with the cornell model and a 12*12 lightmap samples for each pixel a framerate of about 60 fps. That means I have to sample 3 textures ( diffuse/flux,position and normal, all R16G16B16A16_FLOAT format ) 144 times per pixel and that makes the computation slow. When I don't sample the textures and give them const values ( just for a test) I get avbout 800 FPS so this is a big difference. Now the question is how can I increase the speed of reading my textures to get a better speed ??