Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

125 Neutral

About Sobe118

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

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

  1. Thank you, there seem to be a few good solutions that have been suggested. Currently testing scalability of my app so I borrowed a 32GB card. Interesting issues arrise when going beyond the normal case. Learned a bunch.
  2. I broke up the render items into two sets as an initial solution, made two resources of about 3.8GB, and it works. Just a bit more logic needed to handle when render counts fluctuate 0-max. I plan to experiment more with the 4GB limit when I have time.
  3. Vinterberg, eventually it would matter but I don't think it would for this specific error from CreateCommittedResource. It gives an error when allocating a size greater than 2^32, so I have been testing with just a little over that value. Which is still several GB less than the current GPU card I am using. Also, I am watching my GPU with nvidia-smi so I can see live memory usage.
  4. Hello Hodgman, When checking D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT MaxGPUVirtualAddressBitsPerResource = 40 MaxGPUVirtualAddressBitsPerProcess = 40 I'm attempting to allocate about 5-12GB so 40 bits would be enough for that. ------------ I will probably use a multiple heap or related method as a workaround later. But still interested if there is a way to allocate >4 GB.
  5. I tried searching "graphics memory manager" and couldn't find any listed limits. On this page, I found the "Max Primitive Count" (The simplest primitive is a collection of points in a 3D coordinate system). So that limitation might be connected to buffers/resources? https://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx Thanks for the tip.
  6. I am rendering a large number of objects for a simulation. Each object has instance data and the size of the instance data * number of objects is greater than 4GB. CreateCommittedResource is giving me: E_OUTOFMEMORY Ran out of memory. My PC has 128GB (only 8% ish used prior to testing this), I am running the DirectX app as x64. <Creating a CPU sided resource so GPU ram doesn't matter here, but using Titan X cards if that's a question> Simplified code test that recreates the issue (inserted the code into Microsofts D3D12HelloWorld): unsigned long long int siz = pow(2, 32) + 1024; D3D12_FEATURE_DATA_D3D12_OPTIONS options; //MaxGPUVirtualAddressBitsPerResource = 40 m_device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &options, sizeof(options)); HRESULT oops = m_device->CreateCommittedResource( &CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_UPLOAD), D3D12_HEAP_FLAG_NONE, &CD3DX12_RESOURCE_DESC::Buffer(siz), D3D12_RESOURCE_STATE_GENERIC_READ, nullptr, IID_PPV_ARGS(&m_vertexBuffer)); if (oops != S_OK) { printf("Uh Oh"); } I tried enabling "above 4G" in the bios, which didn't do anything. I also tested using malloc to allocate a > 4G array, that worked in the app without issue. Are there more options or build setup that needs to be done? (Using Visual Studio 2015) *Other approaches to solving this are welcome too. I thought about splitting up the set of items to render into a couple of sets with a size < 4G each but would rather have one set of objects. Thank you.
  7. Sobe118

    Rotational Matrix confusion

    Thanks, that was the right part to look at for the issue.  For my coordinate system the code below created the correct visual appearance (objects are symmetrical on one plane though) rotationRadians = atan2f(unitVector.z, unitVector.x); rotationRadians = atan2f(unitVector.x, -unitVector.z); rotationRadians = atan2f(-unitVector.x, unitVector.z);
  8. I'm having issues with rotating 3D objects towards a location.  As a test I tried to rotate every object towards the origin.    The main part of the code is below along with a resulting image. (fyi my unit system is not standard, x-horazantal, z-depth(vertical from this images perspective), y-up(towards camera)   When the objects are positioned towards a point the flat surface points towards the target, looks perpendicular. The red lines drawn show when the objects point at the center correctly. If I add PI/2 to the rotation then the diagonals point at the center.    The resulting image should form a layered ring like design of  aligned objects.  But it seems to create a series of 4 hyperbolas.    I'm guessing I made a simple error.  float3 origin = {0.0f, 0.0f, 0.0f}; float3 unitVector = normalize(make_float3(origin.x-object.x, origin.y-object.y, origin.z-object.z)); //x,z are the surface plain : y is vertical : atan2f returns -PI to PI float rotationRadians = atan2f(unitVector.x, unitVector.z); XMMATRIX rotateMat = XMMATRIX( cosf(rotationRadians), 0.0f, sinf(rotationRadians), 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, -sinf(rotationRadians), 0.0f, cosf(rotationRadians), 0.0f, 0.0f, 0.0f, 0.0f, 1.0f);
  9. That would be sad   I found a little more.  NVAPI is NVIDIA's core software development kit. I think this is what can help mange SLI.  Also found a site that said the screen must be set to full screen. Windowed doesn't work with SLI (good to know... usually run games in windowed) Currently hoping SLI magically works when I figure out how to switch to full screen.  http://www.geeks3d.com/20101209/tips-how-to-enable-sli-and-crossfire-support-for-opengl-applications/   Not quite related but, I found Alt-Enter is the standard way to go full screen but doesn't work if remote software like Teamviewer is active. (Testing using a remote computer, looks like I will need to go to the computer) Still looking into it. 
  10. I am looking for exmple code that uses SLI with DirectX11 So far I have found:    Seems like a good reference and fairly up to date http://developer.download.nvidia.com/whitepapers/2011/SLI_Best_Practices_2011_Feb.pdf Old SLI example code for DX9, outdated and difficult to compile. (main issue is not directly applicable to my problem because I use DX11) http://developer.download.nvidia.com/SDK/9.5/Samples/samples.html#slibestpract   I'm sure I could figure out what I need from the first link, but it seems like a waist to re-code everything from scratch if it has already been done.  Is anyone aware of a DirectX 11 example code that demonstrates various SLI usages?  As a side note: I know in certain situations there is no benefit from SLI depending on what is the bottleneck. Does instancing, like millions of objects, work well with SLI?      Thanks
  11. Sobe118

    Moving around a sphere with quaternions

    I got the code working. I don't intend on using this code for my final program. Like you said it is not so efficient, but was a good way to learn about all this.    float3 up = make_float3(loc[0], loc[1], loc[2]); up = normalize(up); float4 q1 = {up.x, up.y, up.z, 0};   //Turn, yaxis of quat is up-vector of object float turnSpeed = 2.0f * 3.14159265359f / 180.0f; float3 yaxis = {0, 0, 0}; yaxis.x = 2.0f * (q1.x*q1.y + q1.w*q1.z); yaxis.y = 1.0f - 2.0f * (q1.x*q1.x + q1.z*q1.z); yaxis.z = 2.0f * (q1.y*q1.z - q1.w*q1.x); float4 yq = quatFromVectAngel(yaxis, turnSpeed); q1 = multiplyQuat(q1, yq);   float zSpeed = 2.0f * 3.14159265359f / 180.0f; float3 zaxis = {0, 0, 0}; zaxis.x = 2.0f * (q1.x*q1.z - q1.w*q1.y); zaxis.y = 2.0f * (q1.y*q1.z + q1.w*q1.x); zaxis.z = 1.0f - 2.0f * (q1.x*q1.x + q1.y*q1.y); float4 zq = quatFromVectAngel(zaxis, zSpeed); q1 = multiplyQuat(q1, zq);   float walkSpeed = 2.0f * 3.14159265359f / 180.0f; float3 xaxis = {0, 0, 0}; xaxis.x = 1.0f - 2.0f * (q1.y*q1.y + q1.z*q1.z); xaxis.y = 2.0f * (q1.x*q1.y - q1.w*q1.z); xaxis.z = 2.0f * (q1.x*q1.z + q1.w*q1.y); float4 xq = quatFromVectAngel(xaxis, walkSpeed); float4 r = multiplyQuat(q1, xq);
  12. Sobe118

    Moving around a sphere with quaternions

    I just used pos because Olof did, I wanted to be consistent.    float4 multiplyQuat(float4 k, float4 q)  {  float4 n; n.w = k.w*q.w - k.x*q.x - k.y*q.y - k.z*q.z; n.x = k.w*q.x + k.x*q.w + k.y*q.z - k.z*q.y; n.y = k.w*q.y + k.y*q.w + k.z*q.x - k.x*q.z; n.z = k.w*q.z + k.z*q.w + k.x*q.y - k.y*q.x; return n; } I think I see the issue I am not using any matrix in the calculations. I only convert it to a matrix for rendering and never really save that value outside of directX buffers
  13. Sobe118

    Moving around a sphere with quaternions

    Still a bit confused if pos.yaxis() returns the y value of pos, that is just a single value.  Then the single value is used to set a Vec3?  Doses the y pos magically end up in vec3's y?  Or does vec3 look like {pos.y, pos.y, pos.y} I further expanded the code (not working for me):   float3 yaxis = {0, pos.y, 0}; float4 yq = quatFromVectAngel(yaxis, turnSpeed); pos = multiplyQuat(pos, yq);   float3 xaxis = {pos.x, 0, 0}; float4 xq = quatFromVectAngel(xaxis, walkSpeed); float4 result = multiplyQuat(pos, xq);   ----------------------------------------------------------------------- This code is working for me to make a nice slightly off-set rotation. But when using the code below the movement from the objects perspective is not clear.    float4 q2 = quatFromVectAngel(make_float3(0, 1, 0.4f), angleRadian); float4 r = multiplyQuat(pos, q2);
  14. Sobe118

    Moving around a sphere with quaternions

    Maybe I'm not sure how to use quaternions. I assumed the "target" was there the object was going to or looking at.  The object is rotating around the origin, not going to it or looking at it.  What I have is a movement vector in relation to the object x,y,z. But z is always zero because that would be moving away or towards the origin.  Then I have a location vector from the origin to the objects center.    How do I change the location vector based on the movement vector that is from the perspective of the object. 
  15. I am trying to move a object around a sphere.  The object has its own rotation and forward speed. Then it also has its location.  The location can be used for the creation of the first quaternion but, I do not know how to make the target quaternion from the objects rotation and forward speed.    Almost all of the examples for this type of math are for a camera looking at the origin.  I cant figure out how to convert these examples. Because my object doesn't have a target that it is looking at. 
  • 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!