Kamo16

Members
  • Content count

    19
  • Joined

  • Last visited

Community Reputation

102 Neutral

About Kamo16

  • Rank
    Member
  1. I'm working on a project which reads a text file and creates a 3D directed graph from the data. Currently I'm representing the nodes as simple cubes and I have lines drawn between the connected nodes. What I'm missing is a way to identify which node is which. I'd like to have the name of the node represented on (the faces of the cube) or above the cube as text but I'm not sure which is the best way to go about this. It seems that it would be wasteful to render to texture every single node's name and then apply it to all 6 faces of every cube. Is this the best way to do it or is there a better way? Is there any way to render 3D text that I could place above the cubes? Any advice would be appreciated, Thanks.
  2. Alright, thanks for clarifying.
  3. Is this indicating that Stream-Output objects only have the two methods shown there?
  4. I'm working with the TriangleStream template right now in a geometry shader and I'd like to see what other methods are supported aside from Append and RestartStrip, however I can't seem to find any documentation on it at all. Would anyone be able to point me in the right direction? Thanks.
  5. Sample the texture in the pixel shader and simply return the value. If your texture shows up on the object you mapped it to, then it's being fed correctly. Example: [code] float4 diffuse = diffuseMap.Sample(linearSam, pIn.texC); return diffuse;[/code] Where diffuseMap is a texture2D object within your effect file and linearSam is a SamplerState defined in your effect file, and pIn.texC is the texture coordinate fed from the vertex shader.
  6. Getting started with DirectX

    [quote name='Shashwat Rohilla' timestamp='1306736539' post='4817405'] [quote name='ryan20fun' timestamp='1306734882' post='4817396'] [quote name='Shashwat Rohilla' timestamp='1306734346' post='4817394'] I am using Visual Studio 2008, windows 7 64-bit. I downloaded DirectX SDK August 2007 and installed it. When I tried to build a tutorial program, it said "can not open dx3d10d.lib" Please help me why this error is coming. The file is present in the required folder of VS. [/quote] why are you using a SDK that is 4 Years Old ? [/quote] This was one of the few torrents which I got. I asked my friend to download. [b]Please send me the link for some newer version. Or mail me some torrent (if possible) at [/b][email="shashwat.delhi@gmail.com"][b]shashwat.delhi@gmail.com[/b][/email][b]. Is this problem coming because I am using old SDK? [/b]Thank you! [/quote] [url="http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba"]http://www.microsoft...02-438a3ba730ba[/url]
  7. Getting started with DirectX

    [quote name='Shashwat Rohilla' timestamp='1306734346' post='4817394'] I am using Visual Studio 2008, windows 7 64-bit. I downloaded DirectX SDK August 2007 and installed it. When I tried to build a tutorial program, it said "can not open dx3d10d.lib" Please help me why this error is coming. The file is present in the required folder of VS. [/quote] You have to set the include path and the library paths for your project, as well as specify additional dependencies in the linker. To specify the paths, open up VS and start a project (or use an existing sample from the SDK), click on the 'Properties' tab at the top, navigate to 'VC++ directories' and click on the 'Include Directories' row in the window and to the right specify the path to the SDK's include folder. Then click on the 'Library Directories' row and specify the path to the SDK's lib folder. Once you done that, under the VC++ Directories click on Linker beneath it. In the linker category, navigate to the Input option. Select the 'Additional Dependencies' row and in the field to the right enter the library file names you want to use. For example to use DX10, you would want to probably specify d3d10.lib d3dx10d.lib dxerr.lib dxguid.lib dxgi.lib as dependencies. Hope that was clear enough, good luck.
  8. Getting .fx compilation warnings ?

    [quote name='pekarn' timestamp='1306619917' post='4816937'] Have you tried specifying the "treat warnings as errors" flag. I can't remember what it is called but I'm pretty sure it exists. That should give you an error if there's a warning and that would probably fill the error buffer. [/quote] You could use NVIDIA FX Composer, just start a new FX file, hit compile, and it'll output errors and warning for you.
  9. Vertex Shader parameters

    [quote name='Kamo16' timestamp='1306619083' post='4816934'] [quote name='katsh' timestamp='1306618293' post='4816930'] make sure your vertex data contain diffuse value and specular value. it sound like you only have coord and normal data in your vertex buffer. (i mean you just define those 2 element without actual data of those) if you define vertex in direct(in source code) it looks like this SimpleVertex vertices[]= { coord normal duffse specular D3DXVECTOR3( -0.5,-0.5,0),D3DXVECTOR3( 0,0,1), D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), D3DXVECTOR3(-0.5,0.5,0),D3DXVECTOR3( 0,0,1), D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), D3DXVECTOR3( 0.5,-0.5,0),D3DXVECTOR3( 0,0,1),D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), D3DXVECTOR3( 0.5,0.5,0),D3DXVECTOR3( 0,0,1), D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), }; or you load mesh data from outer file such as obj fbx x ..etc you need check if thres is diffuse value and specular value.(with every vertex) [/quote] I have a single function that generates all of the vertices' coordinates as a simple grid and set the y value via y = f(x,z). I then calculate the normals of the vertices via normal averaging, and based on the height of the generated y value, I set the vertex diffuse and specular property. So I'm fairly certain I'm setting all 4 of these properties correctly (the geometry and lighting are correct). It's just when I try to use a variable with DIFFUSE or SPECULAR attached to it, the geometry doesn't render. I'll take your guys' advice and take a look at PIX, although I've never used it before so that should be fun lol. Thanks again for the replies and I welcome any further advice. [/quote] Conclusion: I'm an idiot. As you guys suggested I looked in PIX (not that I had any idea what I was doing with that) but I was clicking around on tabs and noticed my input layout was only showing the first two elements although I defined 4. It then hit me that I probably didn't change the second parameter of CreateInputLayout() to the increased number of elements. Thanks a lot for the help guys, maybe this will help someone else with a similar problem.
  10. Vertex Shader parameters

    [quote name='katsh' timestamp='1306618293' post='4816930'] make sure your vertex data contain diffuse value and specular value. it sound like you only have coord and normal data in your vertex buffer. (i mean you just define those 2 element without actual data of those) if you define vertex in direct(in source code) it looks like this SimpleVertex vertices[]= { coord normal duffse specular D3DXVECTOR3( -0.5,-0.5,0),D3DXVECTOR3( 0,0,1), D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), D3DXVECTOR3(-0.5,0.5,0),D3DXVECTOR3( 0,0,1), D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), D3DXVECTOR3( 0.5,-0.5,0),D3DXVECTOR3( 0,0,1),D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), D3DXVECTOR3( 0.5,0.5,0),D3DXVECTOR3( 0,0,1), D3DXVECTOR4( 0.2,0.3,0.4,1.0),D3DXVECTOR4( 0.5,0.5,0.5,1.0), }; or you load mesh data from outer file such as obj fbx x ..etc you need check if thres is diffuse value and specular value.(with every vertex) [/quote] I have a single function that generates all of the vertices' coordinates as a simple grid and set the y value via y = f(x,z). I then calculate the normals of the vertices via normal averaging, and based on the height of the generated y value, I set the vertex diffuse and specular property. So I'm fairly certain I'm setting all 4 of these properties correctly (the geometry and lighting are correct). It's just when I try to use a variable with DIFFUSE or SPECULAR attached to it, the geometry doesn't render. I'll take your guys' advice and take a look at PIX, although I've never used it before so that should be fun lol. Thanks again for the replies and I welcome any further advice.
  11. Vertex Shader parameters

    [quote name='MJP' timestamp='1306616297' post='4816909'] By "disappears" do you mean that it renders all black, or that it doesn't render at all? Either way, you should try using PIX to get a closer look at what's going on. It can show you the individual values for each vertex in your vertex buffer as well as the outputs from your vertex shader, or you can even step into your vertex shader and debug it. [/quote] Everything that isn't being drawn with vertices still renders, such as the clear color I've set and FPS/MPF text I've drawn. It's as if the DIFFUSE and SPECULAR semantic I attach to variables corrupts the vertex shader somehow. I don't know how else to input the diffuse and specular properties of each vertex without feeding it through the input layout. All of the lighting tutorials I look at simply define global variables for light color and intensity in the effect file and use those in the calculations, which just results in everything being colored the same, obviously an impractical approach. Again any information on this would be greatly appreciated, thanks.
  12. I'm new to HLSL and I'm a little confused on a particular quirk that is occurring in my program. It was my understanding that the parameters to the Vertex shader are the input elements defined in your input layout. For example in my application code I set the input layout as follows... [code] D3D10_INPUT_ELEMENT_DESC Layout[] = { {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"DIFFUSE", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 24, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"SPECULAR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 40, D3D10_INPUT_PER_VERTEX_DATA, 0} }; [/code] In my effect file however, this is the definition of the Vertex Shader I'm using... [code] VSOut VS_1(float4 Norm : NORMAL, float4 Pos : POSITION, float4 diffuse: DIFFUSE, float4 specular: SPECULAR) [/code] I want to have the last two parameters diffuse and specular so that I can calculate lighting based on the properties of the material as well, not just the color of the light and it's intensity. My program runs fine when I only have the first two parameters defined, Norm and Pos, but as soon as I add the additional parameter diffuse: DIFFUSE, my object disappears. I have looked everywhere as to why this might happen but I'm not having any luck. Any advice or insight is highly appreciated.
  13. Thanks a lot for the insight. The trouble with that is I'm interested in Graphics/Engine programming, I've spent about a year now studying it outside of my coursework. I don't have any experience with XNA but I know that it involves shader programming as well. Would that information change anything?
  14. I'm a student interested in game development as a career. Lately I've been working on learning DirectX for a portfolio piece this Summer and it's going well. However, a group of friends of mine at school want to start a team for next years Dream.Build.Play competition and Imagine Cup, which sounds like a lot of fun but both of those would require the use of XNA. So what's the problem? I talked to a game development graduate school technical director and he advised me to steer away from XNA/C# portfolio pieces and go with C++ using DX/OpenGL as it is more industry standard. I feel like I'm in a position where I have to choose to work on a year long project with my friends in XNA or a solo DirectX piece to have a more practical project to showcase. I'd really appreciate some other insight and advice on the subject. Thanks for your time.
  15. [quote name='sdaq' timestamp='1295042893' post='4759034'] [quote name='Kamo16' timestamp='1295033575' post='4758960'] [quote name='exoity' timestamp='1295031810' post='4758947'] The video does not seem to be working on either Firefox (manual install) or Internet Explorer, could you try to upload it to youtube? [/quote] Yea I'll go ahead and do that. If you want to test the game out you can download the zip and run the game.exe inside the directory. [/quote] [url="http://gamasutra.com/blogs/MeganFox/20101229/6591/Portfolio_and_PR_Advice_The_importance_of_YouTube.php"]http://gamasutra.com..._of_YouTube.php[/url] o_0 [/quote] Thanks for the advice, will edit the original post with a youtube link.