SlimDX 11 Setting Multiple Render Targets I'm using SlimDX 11 in my managed Direct3D application. I would like to implement deferred shading. I'm having trouble when I try to set a depth stencil surface and multiple render targets at the same time. Here is my code depth stencil view DepthStencilView dsv GetD3D11DepthStencilView() array of 3 render target views RenderTargetView rtv GetPositionDiffuseEmissiveRenderTargetViewArray() device context DeviceContext context GetD3D11DeviceContext() context.OutputMerger.SetTargets(dsv, rtv) EDIT create depth stencil state context.OutputMerger.DepthStencilState DepthStencilState.FromDescription(GetDevice(), new DepthStencilStateDescription() IsDepthEnabled true, DepthComparison Comparison.Less, DepthWriteMask DepthWriteMask.All, IsStencilEnabled false, StencilReadMask 0xff, StencilWriteMask 0xff, BackFace new DepthStencilOperationDescription() Comparison Comparison.Always, DepthFailOperation StencilOperation.IncrementAndClamp, FailOperation StencilOperation.DecrementAndClamp, PassOperation StencilOperation.Keep , FrontFace new DepthStencilOperationDescription() Comparison Comparison.Always, PassOperation StencilOperation.Keep, DepthFailOperation StencilOperation.IncrementAndClamp, FailOperation StencilOperation.Keep ) clear depth stencil context.ClearDepthStencilView(dsv, DepthStencilClearFlags.Depth, 1.0f, 0) draw as usual ... When I set the depth stencil and render targets all at one time then nothing is rendered to the screen. When I set only the render targets everything renders normally...Why might this occur?


Using DirectWrite to write text on a IDirect3DTexture9 I'm trying to write text using the DirectWrite API on a IDirect3DTexture9. I've heard that people were capable of doing this but I do not see directly how I can glue these two APIs together. It seems I need a IDXGISurface to create a valid ID2D1RenderTarget (with which I can draw the text). I can get this by creating a surface for the Window. But I think the idea is that I use the IDirect3DTexture9 as a surface for the render target so that I can use whatever is drawn on it in my application. I can get the underlying IDirect3DSurface9 from the IDrect3DTexture9 but then I have to convert it somehow to a IDXGISurface and this is where I'm stuck. Does anybody have a clue?


Effect version is unrecognized. This runtime supports fx 5 0 to fx 5 0 I'm reading the "Introduction to 3D game programming with DirectX11" (Frank Luna) and i'm having problems with lighting. I have this error Effect version is unrecognized. This runtime supports fx 5 0 to fx 5 0. When i use the D3DX11CreateEffectFromMemory function i have that error and an exception (this mFX was nullptr) Can you help me? Thanks EDIT I have no D3DCompileFromFile std ifstream fin("Ligthing.fx", std ios binary) fin.seekg(0, std ios base end) int size (int)fin.tellg() fin.seekg(0, std ios base beg) std vector lt char gt compiledShader(size) fin.read( amp compiledShader 0 , size) fin.close() hr D3DX11CreateEffectFromMemory( amp compiledShader 0 , size, ERROR IS HERE 0, device, amp mFX) if (FAILED(hr)) MessageBox(0, L"err", 0, 0)


Clipping wrong results in C DIRECTX 11 Im trying to do some clipping but having some weird results. The triangle is not getting clipped how it should be. Here are some images. The second image is how it should. video of what is happen VIDEO OF WHAT IS HAPPENING What is wrong with my code that is making the triangle wrong way. CLIPPING ALGORITHM ClipVertex( const Vector3 amp end ) float BCend mPlane.Test(end) bool endInside ( BCend gt 0.0f ) if (!mFirstVertex) if one of the points is inside if ( mStartInside endInside ) if the start is inside, just output it if (mStartInside) mClipVertices mNumVertices mStart if one of them is outside, output clip point if ( !(mStartInside amp amp endInside) ) float t Vector3 output if (endInside) t BCend (BCend mBCStart) output end t (end mStart) else t mBCStart (mBCStart BCend) output mStart t (end mStart) mClipVertices mNumVertices output mStart end mBCStart BCend mStartInside endInside mFirstVertex false PLANE EQUATION Plane clipPlane( 1.0f, 0.0f, 0.0f, 0.0f ) In directx 11 in a Left Handed system


How can I check the multisample quality level count? I can check it with ID3D11Device CheckMultisampleQualityLevels(). So to use it I need to create the device D3D11CreateDeviceAndSwapChain(). To call it I need to fill the DXGI SWAP CHAIN DESC which, among others, specifies... the multisample quality level. Vicious circle. Do I have to split D3D11CreateDeviceAndSwapChain() into creating the device and the swap chain separately? Or what?


DX11 Handle Device removed I get the DXGI ERROR DEVICE REMOVED error on some machines. According to this (https msdn.microsoft.com en us windows uwp gaming handling device lost scenarios) MSDN article this can happen and it should be handled by your application. I've managed to recreate the device but I'm unsure how to handle all content. It seems I have to create all vertex buffers and textures again, which essentially means I have to reload almost the entire scene. Is this really the correct way?


Why can't I create an unordered access view of a R32G32B32 UINT buffer? So I'm trying to create an unordered access view for a buffer having with three component elements, but it fails with this warning D3D11 ERROR ID3D11Device CreateUnorderedAccessView The format (0x7, R32G32B32 UINT) cannot be used with a Typed Unordered Access View. STATE CREATION ERROR 2097343 CREATEUNORDEREDACCESSVIEW INVALIDFORMAT . This is my code void test(ID3D11Device dev ctx) D3D11 BUFFER DESC buff desc memset( amp buff desc, 0, sizeof(buff desc)) buff desc.BindFlags D3D11 BIND SHADER RESOURCE D3D11 BIND UNORDERED ACCESS buff desc.ByteWidth 1024 12 buff desc.CPUAccessFlags 0 buff desc.MiscFlags 0 buff desc.StructureByteStride 12 buff desc.Usage D3D11 USAGE DEFAULT ID3D11Buffer buff ptr nullptr dev ctx gt CreateBuffer( amp buff desc, nullptr, amp buff ptr) if (!buff ptr) return D3D11 UNORDERED ACCESS VIEW DESC uav desc uav desc.Format DXGI FORMAT R32G32B32 UINT uav desc.ViewDimension D3D11 UAV DIMENSION BUFFER uav desc.Buffer.FirstElement 0 uav desc.Buffer.Flags 0 uav desc.Buffer.NumElements 1024 ID3D11UnorderedAccessView uav ptr nullptr dev ctx gt CreateUnorderedAccessView(buff ptr, amp uav desc, amp uav ptr) if (!uav ptr) return It fails for any resource with three components (R32G32B32 ), but it works if the resource has 1 2 4 components. So what could be the problem?


Bilinear filtering of output image in Direct3D 11 I'd like to render something at one resolution, but display it in a window at another resolution (e.g. render the scene at 640x480 and stretch it to a 1024x768 window). Simply resizing the window after creation allows this to work however, the image is filtered using nearest neighbor. Is there a way to change the filtering algorithm to e.g. bilinear?


Realtime local reflections of particle system I'm finding my way around CryEngine 3 (through Steam) and want to create a simple effect where a fire on shore is reflected in a body of water. For testing purposes, I've made the water dead calm... (Note Dx11 on 2nd line of debug info) As you can see, the terrain is reflected properly, but the flame particles aren't reflected. It's my understanding that this should be possible. NB I've created an appropriate cubemap for the water environment, although I don't believe it comes into play here. I've seen a number of posts saying Glossiness 50 (or 50 ) and a light specular color are required. I've got 100 and white... And for completeness, the water volume properties... Can someone please tell me what I need to enable to get this working? Thanks.


Why does my game not update unless I'm moving the mouse? I'm pretty confused by what's happening. Now that I've finally put something moving on my screen, I notice it doesn't update unless I move the mouse, or press a key, or trigger other events. Using PIX, the "Frame " counter only goes up when I fire these events. This is all that happens in my game loop while(GetMessage( amp msg, NULL, 0, 0) gt 0 amp amp m isRunning) TranslateMessage( amp msg) DispatchMessage( amp msg) m gameGraphics gt BeginRender() m gameGraphics gt EndRender() BeginRender clears the screen, and EndRender presents to the swap chain. I thought maybe it was a problem with WndProc, but comparing it to other DirectX 11 game WndProcs, I don't see any major differences. I'm pretty confused, never seen this problem before, and I have no idea what causes it. I'm just hoping maybe someone will have some insight on why this might be happening.


Tessellation Texture Coordinates Firstly some info I'm using DirectX 11 , C and I'm a fairly good programmer but new to tessellation and not a master graphics programmer. I'm currently implementing a tessellation system for a terrain model, but i have reached a snag. My current system produces a terrain model from a height map complete with multiple texture coordinates, normals, binormals and tangents for rendering. Now when i was using a simple vertex and pixel shader combination everything worked perfectly but since moving to include a hull and domain shader I'm slightly confused and getting strange results. My terrain is a high detail model but the textured results are very large patches of solid colour. My current setup passes the model data into the vertex shader then through the hull into the domain and then finally into the pixel shader for use in rendering. My only thought is that in my hull shader i pass the information into the domain shader per patch and this is producing the large areas of solid colour because each patch has identical information. Lighting and normal data are also slightly off but not as visibly as texturing. Below is a copy of my hull shader that does not work correctly because i think the way that i am passing the data through is incorrect. If anyone can help me out but suggesting an alternative way to get the required data into the pixel shader? or by showing me the correct way to handle the data in the hull shader id be very thankful! cbuffer TessellationBuffer float tessellationAmount float3 padding struct HullInputType float3 position POSITION float2 tex TEXCOORD0 float3 normal NORMAL float3 tangent TANGENT float3 binormal BINORMAL float2 tex2 TEXCOORD1 struct ConstantOutputType float edges 3 SV TessFactor float inside SV InsideTessFactor struct HullOutputType float3 position POSITION float2 tex TEXCOORD0 float3 normal NORMAL float3 tangent TANGENT float3 binormal BINORMAL float2 tex2 TEXCOORD1 float4 depthPosition TEXCOORD2 ConstantOutputType ColorPatchConstantFunction(InputPatch lt HullInputType, 3 gt inputPatch, uint patchId SV PrimitiveID) ConstantOutputType output output.edges 0 tessellationAmount output.edges 1 tessellationAmount output.edges 2 tessellationAmount output.inside tessellationAmount return output domain("tri") partitioning("integer") outputtopology("triangle cw") outputcontrolpoints(3) patchconstantfunc("ColorPatchConstantFunction") HullOutputType ColorHullShader(InputPatch lt HullInputType, 3 gt patch, uint pointId SV OutputControlPointID, uint patchId SV PrimitiveID) HullOutputType output output.position patch pointId .position output.tex patch pointId .tex output.tex2 patch pointId .tex2 output.normal patch pointId .normal output.tangent patch pointId .tangent output.binormal patch pointId .binormal return output Edited to include the domain shader domain("tri") PixelInputType ColorDomainShader(ConstantOutputType input, float3 uvwCoord SV DomainLocation, const OutputPatch lt HullOutputType, 3 gt patch) float3 vertexPosition PixelInputType output Determine the position of the new vertex. vertexPosition uvwCoord.x patch 0 .position uvwCoord.y patch 1 .position uvwCoord.z patch 2 .position output.position mul(float4(vertexPosition, 1.0f), worldMatrix) output.position mul(output.position, viewMatrix) output.position mul(output.position, projectionMatrix) output.depthPosition output.position output.tex patch 0 .tex output.tex2 patch 0 .tex2 output.normal patch 0 .normal output.tangent patch 0 .tangent output.binormal patch 0 .binormal return output


How can I use a different upscaling method in dx11? I need to upscale images using the 'box' scaling algorithm as the pixel art textures in my game don't scale well with bilinear because of the blur. Either that, or use high res pictures which would be undesirable and inflate the size by many times.


PN TRIANGLES is Bezier Triangles right? JUst wondering the term pn triangles is the same thing as saying bezier triangle patch??


Why specular reflection work only in center of virtual scene? How to calculate this cpecular reflection? HLSL void calculateSpecular( in float4 Normal, in float4 SunLightDir, inout float4 Specular ) Specular specularLevel pow(saturate(dot(reflect(normalize(abs(eyePosition)), Normal), SunLightDir)), specularExponent) in pixel shader float4 Specular float4(0.f,0.f,0.f,1.f) calculateSpecular( input.normal, sunLightDir, Specular ) sunLightDir it's just camera position vec3(0,10,0) in vertex shader output.normal mul( float4( input.normal, 0.f ) , World )


Rendering to specific face of a cubemap I have working omnidirectional shadow maps for point lights. Rendering a shadow map for one point light consists of rendering the scene to 6 separate rendertargets, then send those render target textures (shaderresourceviews) to a pixel shader which will shadow the scene by projective texturing. Switching rendertargets 6 times for each point light however is quite costly, and so does sampling from those in the pixel shader later. My question is how would I access a face of the cubemap to render to? Now I am doing Id3d11devicecontext omsetrendertargets(1,NULL, amp depthtarget) . My depthtarget is a texture2d which is bound to a depthstencil view and a shaderresource which is set up to be a cubemap. Can I even set an individual face to render to or is the process completely different?


Proper vertex buffer use How're you supposed to use vertex buffers? Say you have 500 distinct deformable shapes models in the world (ie you want to be able to change delete vertices from the models somewhat arbitraily as the game progresses). The requires you refresh the vertex buffers in the frames the model has become dirty, at least. So how should you handle your vertex buffer, assuming D3D11 interfaces (so vertex buffers are your only option to draw anything) Store model vertices in CPU RAM. Create one vertex buffer at program start. For each model, copy the vertices into the single vertex buffer, render Create 500 vertex buffers, update each when necessary, render.


How does Direct3D know if a constant buffer is for the vertex or pixel shader? I have a question about constant buffers in directX 11. They really confuse me and after searching on google most sites simply supply sample code without explaining how it works. I am probably overlooking something but, as of now, they appear to me to work by sheer magic. Say I have two constant buffers in an hlsl file struct Light float3 dir float4 ambient float4 diffuse cbuffer cbPerFram Light light cbuffer cbPerObject float4x4 WVP float4x4 World And I create an equivalent buffer in my C program like so Create the buffer to send to the cbuffer in effect file D3D11 BUFFER DESC cbbd ZeroMemory( amp cbbd, sizeof(D3D11 BUFFER DESC)) cbbd.Usage D3D11 USAGE DEFAULT cbPerObject is a struct with same layout as cbPerObject in HLSL file cbbd.ByteWidth sizeof(cbPerObject) cbbd.BindFlags D3D11 BIND CONSTANT BUFFER cbbd.CPUAccessFlags 0 cbbd.MiscFlags 0 hr d3d11Device gt CreateBuffer( amp cbbd, NULL, amp cbPerObjectBuffer) Create the buffer to send to the cbuffer per frame in effect file ZeroMemory( amp cbbd, sizeof(D3D11 BUFFER DESC)) cbbd.Usage D3D11 USAGE DEFAULT cbPerFrame is struct with same layout as in cbPerFrame in effect file cbbd.ByteWidth sizeof(cbPerFrame) cbbd.BindFlags D3D11 BIND CONSTANT BUFFER cbbd.CPUAccessFlags 0 cbbd.MiscFlags 0 And then I update one like this d3d11DevCon gt UpdateSubresource( cbPerObjectBuffer, 0, NULL, amp cbPerObj, 0, 0 ) d3d11DevCon gt VSSetConstantBuffers( 0, 1, amp cbPerObjectBuffer ) hr d3d11Device gt CreateBuffer( amp cbbd, NULL, amp cbPerFrameBuffer) How does directX know which constant buffers in my shader are going to be used for VS and which for PS and which buffers in my codes correspond to which buffers in my hlsl? For example I call VSSetConstantBuffers above and pass the arguments and it automatically knows to throw that stuff in the per object buffer as opposed to trying to put it in the perFrame buffer. As far as I can tell when creating cbPerObjectBuffer, I never explicitly bound it to the cbPerObject buffer in my hlsl. Is slot number dependent on the order the buffers appear in hlsl? The only way I can figure is that the data structures simply define an interface to the buffer memory on the card and it is up to the programmer to use the correct one. For example, I COULD attempt to use cbPerFrame in my vertex shader and indeed the same data can be accessed that way but in order to get correct results you would have to access it using offsets into the light object. Does what I am asking make any sense? lol


FormatMessage not working for HRESULTs returned by Direct3D 11 I am using Windows 7 x64 and Visual Studio 17 (v15.9.7). Say I try to create a swap chain using IDXGIFactory2 CreateSwapChainForHwnd and pass in DXGI SCALING NONE. I will get the following message in debug output (if I have enabled Direct3D debugging) DXGI ERROR IDXGIFactory CreateSwapChain DXGI SCALING NONE is only supported on Win8 and beyond. DXGI SWAP CHAIN DESC SwapChainType ... HWND, BufferDesc DXGI MODE DESC1 Width 816, Height 488, RefreshRate DXGI RATIONAL Numerator 0, Denominator 1 , Format B8G8R8A8 UNORM, ScanlineOrdering ... UNSPECIFIED, Scaling ... UNSPECIFIED, Stereo FALSE , SampleDesc DXGI SAMPLE DESC Count 1, Quality 0 , BufferUsage 0x20, BufferCount 2, OutputWindow 0x0000000000290738, Scaling ... NONE, Windowed TRUE, SwapEffect ... FLIP SEQUENTIAL, AlphaMode ... UNSPECIFIED, Flags 0x0 MISCELLANEOUS ERROR 175 The function returns 0x887a0001 in form of a HRESULT. If I put err,hr in the watch window, I get a nice error message there ERROR MOD NOT FOUND The specified module could not be found. However, if I pass this HRESULT to FormatMessage, it just puts NULL in the output and returns 0. err,hr helpfully informs me that the new error is ERROR MR MID NOT FOUND The system cannot find message text for message number 0x 1 in the message file for 2. My questions are Why is FormatMessage not giving me right error string (the one starting with ERROR MOD NOT FOUND...)? Where is Visual Studio getting these pretty error strings from? Can I get them too? Who do I pay? PS. I am using the Windows 10 SDK version of DX11, not the older DirectX SDK version. Thus, I can't really link to dxerr.lib either. This is the code that is used to print the error message LPTSTR error text NULL FormatMessage(FORMAT MESSAGE FROM SYSTEM FORMAT MESSAGE ALLOCATE BUFFER FORMAT MESSAGE IGNORE INSERTS, NULL, hr, MAKELANGID(LANG NEUTRAL, SUBLANG DEFAULT), (LPTSTR) amp error text, 0, NULL)


How can I prevent other applications from interrupting my game's exclusive fullscreen mode? I am developing a game using D3D 11. When I got a pop up message from a chat client (HipChat), my game's full screen mode is disabled because IDXGISwapChain Present returns DXGI STATUS OCCLUDED. How can I avoid or prevent this? I don't want my game's exclusive full screen access interrupted.


Swapping out Vertex Buffer Necessary for Terrain LOD? I am using Directx 11 to try and implement terrain level of detail. I am trying the idea represented in this tutorial http www.rastertek.com tertut18.html Which is split your terrain into nodes, and render different quality nodes depending on how far away they are from you. Each of my nodes has its own vertex buffer (bad idea?), however I am trying to map unmap when I swap out a particular node for its higher quality version. I noticed that unless my vertex buffer is the size of the high quality version, then surrounding nodes gets affected, I believe this is to be expected since I am essentially overwriting memory in the vertex buffers of the other nodes. So is the only way to go about map umap is to make each node have the space for the high quality terrain? If so, then I can't do map unmap because I run out of memory. What's another approach then? Making a new vertex buffer with the desired size whenever I swap? Won't this be too slow?


IsoSurface Normals Texture Coords Problems(DX11 SharpDX) Hi and thanks for your time! So over the past few days I have been playing with isosurface construction from volume textures, I have it running on the cpu and all is well from a "just got it working" stand point eg. surface reconstruction works and I have my really cool voxel mesh drawing. I have based my code(converted to VB.net) on Paul Bourke's work here Polygonising a scalar field and like I said it works well apart from the fact that my normals are wrong and I have these strange fully black on both sides triangles, I think I'm doing my normals wrong but the way they are now is the beast I can get, I tried a few ways to build the normals and this one is the only way I could get smooth normals. Here you can see how my normals are wrong, green should be up, gray dark should be unlit and the hay'ish colour is the lit side. I have tried to flip and invert them but as you can see they are not wrong all the same way. HLSL Normals 1st try float3x3 cotangent frame(float3 N, float3 p, float2 uv) get edge vectors of the pixel triangle float3 dp1 ddx(p) float3 dp2 ddy(p) float2 duv1 ddx(uv) float2 duv2 ddy(uv) solve the linear system float3 dp2perp cross(dp2, N) float3 dp1perp cross(N, dp1) float3 T dp2perp duv1.x dp1perp duv2.x float3 B dp2perp duv1.y dp1perp duv2.y construct a scale invariant frame float invmax sqrt(max(dot(T, T), dot(B, B))) return float3x3(T invmax, B invmax, N) HLSL Normals 2nd try NormalData CalcWS Normal(float2 WS TexCoord, float3 WS Pos) NormalData dout float3 dp1 ddx(WS Pos) float3 dp2 ddy(WS Pos) float2 duv1 ddx(WS TexCoord) float2 duv2 ddy(WS TexCoord) float3x3 M float3x3(dp1, dp2, cross(dp1, dp2)) float2x3 inverseM float2x3(cross(M 1 , M 2 ), cross(M 2 , M 0 )) float3 t mul(float2(duv1.x, duv2.x), inverseM) float3 b mul(float2(duv1.y, duv2.y), inverseM) float3 normal normalize(cross(normalize(b), normalize(t))) dout.Normal normal dout.Tang t dout.BiTang b return dout Heres is how I'm doing it now, takes a vertex and then samples the volume texture VB.net Private Function vGetNormal(fX As Single, fY As Single, fZ As Single, fScale As Single) As Vector3 Dim rfNormal As Vector3 rfNormal.X fSample1(fX fScale, fY, fZ) fSample1(fX fScale, fY, fZ) rfNormal.Y fSample1(fX, fY fScale, fZ) fSample1(fX, fY fScale, fZ) rfNormal.Z fSample1(fX, fY, fZ fScale) fSample1(fX, fY, fZ fScale) Return Vector3.Normalize(rfNormal) End Function Private Function vGetNormal(fX As Single, fY As Single, fZ As Single, fScale As Vector3) As Vector3 Dim rfNormal As Vector3 rfNormal.X fSample1(fX fScale.X, fY, fZ) fSample1(fX fScale.X, fY, fZ) rfNormal.Y fSample1(fX, fY fScale.Y, fZ) fSample1(fX, fY fScale.Y, fZ) rfNormal.Z fSample1(fX, fY, fZ fScale.Z) fSample1(fX, fY, fZ fScale.Z) Return Vector3.Normalize(rfNormal) End Function Volume sampling code VB.net Public Function GetVolumeData( pos As Vector3) As Half Dim x2 As Single Math.Abs(( pos.X CellsPerPatch 32) Mod mWidth) Dim y2 As Single Math.Abs(( pos.Y CellsPerPatch 8) Mod mDepth) Dim z2 As Single Math.Abs(( pos.Z CellsPerPatch 32) Mod mHeight) Return mScalars(CInt(Math.Truncate(x2)) (CInt(Math.Truncate(z2)) mWidth) (CInt(Math.Truncate(y2) mWidth mWidth))) End Function The rest of the isosurface construction code is just a copy convert paste of Paul Bourke's c code. Just to makes sure everyone knows what I'm asking Can anyone tell me what I'm doing wrong? Is it a problem with my normals or the isosurface stuffs or both? All of the above is just so u have some context, I'm happy to post more code if ppl need to see it EDIT Black squares come from having no depth info at that point so my deferred render hates those spots, this is leading back to maybe a problem with the surface reconstruction? But why its only happening in those spots, one would think that it would happen everywhere?


Why isn't my cbuffer updating? I am really frustrated because my cbufer isn't updating. This is my VS cbuffer MatrixBuffer register(b0) float4x4 worldViewProj struct VertexIn float4 Pos POSITION float4 Color COLOR struct PixelIn float4 PosH SV POSITION float4 Color COLOR PixelIn VS (VertexIn vin) PixelIn vout vin.Pos.w 1.0f vout.PosH mul(vin.Pos, worldViewProj) vout.Color vin.Color return vout PixelIn VS1(VertexIn vin) PixelIn vout vin.Pos.w 1.0f vout.PosH vin.Pos vout.Color vin.Color return vout When using VS1 it draws correctly, but when using VS it doesn't draw anything? Here is my CBUFFER update code bool Game UpdateShaders() HRESULT result D3D11 MAPPED SUBRESOURCE mappedResource MatrixBufferType dataPtr worldViewProjM worldM viewM projM worldViewProjM XMMatrixTranspose(worldViewProjM) result md3dDeviceContext gt Map(mMatrixBuffer, 0, D3D11 MAP WRITE DISCARD, 0, amp mappedResource) if (FAILED(result)) MessageBoxW(mMainWnd, L"FAOE ", 0, 0) return false dataPtr (MatrixBufferType )mappedResource.pData dataPtr gt worldViewProj worldViewProjM md3dDeviceContext gt Unmap(mMatrixBuffer, 0) int NBuffers 0 md3dDeviceContext gt VSSetConstantBuffers(0, 1, amp mMatrixBuffer) md3dDeviceContext gt PSSetConstantBuffers(0, 1, amp mMatrixBuffer) return true Here is my MATRIXBUFFERTYPE struct struct MatrixBufferType XMMATRIX worldViewProj This is called after I clear my depth stencil view and render target view. Does somebody know why my CBUFFER isn't updating? Thanks in advance.


How would I implement render scaling in a DX11 game? I would like to implement render scaling that could render a scene at a certain of the window resolution. How would I do this? I've tried resizing a number of things, then resizing them up or down to match the window size but I've never gotten it to work.


Frame timer does not show time I am currently using DirectX11 and MFC. The top of the window should tell me how long it takes to render the cube (in seconds). At the moment the cube is rendered but when I try to work out how many seconds it took to render the cube I keep getting 0 on the top of the window. This cannot be right. Help please? This is my Ondraw function void CLearningVisualCView OnDraw(CDC pDC) I want the OnDraw function to create the cube.. CString TimerReports TODO add draw code for native data here CLearningVisualCDoc pDoc GetDocument() ASSERT VALID(pDoc) if (!pDoc) return Timer.GetStartTime() Render() This renders the cube Timer.GetEndTime() The counts stopwatch ends. Timer.DeltaCountDifference(Timer.StartTime, Timer.EndTime) Timer.GetSecondsPerCount() Timer.FrameTime(Timer.DeltaCounts, Timer.SecondsPerCount) TimerReports.Format( T(" .100I64d"), Timer.Time) TimerReports.Format( T(" .5I64d"), Timer.FrameTime(Timer.DeltaCounts, Timer.SecondsPerCount)) This converts the DeltaCountDifference into a CString. It has 5 d.p. AfxGetMainWnd() gt SetWindowText(TimerReports) This displays my count difference to the top of the window. This is my Timer class include "stdafx.h" include "GameTimer.h" GameTimer GameTimer() QueryPerformanceFrequency((LARGE INTEGER ) amp countsPerSec) SecondsPerCount 1.0 (double)countsPerSec GameTimer GameTimer() int64 GameTimer GetStartTime() QueryPerformanceCounter((LARGE INTEGER ) amp StartTime) return StartTime int64 GameTimer GetEndTime() QueryPerformanceCounter((LARGE INTEGER ) amp EndTime) return EndTime The int64 amp are references. We will link them to the StartTime and the EndTime in the CLearningVisualCView OnDraw(). This is done by adding them as arguments. int64 GameTimer DeltaCountDifference( int64 amp TimeA, int64 amp TimeB) int64 DeltaCounts TimeB TimeA return DeltaCounts float GameTimer GetSecondsPerCount() QueryPerformanceFrequency((LARGE INTEGER ) amp CountsPerSecond) SecondsPerCount 1 CountsPerSecond return SecondsPerCount int64 GameTimer FrameTime( int64 amp TheDeltaCounts, float amp SecsPerCount) Time TheDeltaCounts SecsPerCount return Time


Unused constant buffers in shaders If you define a constant buffer in a shader, for example cbuffer test register(c2) float4x4 data But never actually use the data in the shader, does that incur any runtime cost at all? It's convenient for me to do this but not at the cost of slowing runtime performance at all. When I time it I don't see any difference...


Texture coordinate into texel form? How do I convert a texture coordinate, like 1,0 into a texel form(a single value?). Like in the image below, what is the value of Q22 in texel? I'm in directx 11.


How do I deal with timeout detection and recovery in D3D? What is exactly measured when checking TDR in Windows? What do I need to do in my D3D11 app to tell TDR that long rendering is okay? I've already split the workload into smaller batches, but how do I tell TDR when this batch begins and when it ends? I know that IDXGISwapChain Present method will do this for me, but is it the only way? Is ID3D11DeviceContext Flush method doing the same thing?


Depth Stencil buffer mandatory? If I disable depth and stencil buffering, do I have to create and set the depth stencil buffer?


Full screen quad in the HLSL Directx 11 I want to create a full screen Triangle Quad so I can blur the box that is the quad I made. I want to do this in the vertex buffer. I tried this code struct VSQuadOut float4 position SV POSITION float2 uv TEXCOORD outputs a full screen triangle with screen space coordinates input three empty vertices VSQuadOut VSQuad( uint vertexID SV VertexID ) VSQuadOut result result.uv float2((vertexID lt lt 1) amp 2, vertexID amp 2) result.position float4(result.uv float2(2.0f, 2.0f) float2( 1.0f, 1.0f), 0.0f, 1.0f) return result I want something like this Any ideas?


How to create a native windows menu ribbon for a DirectX 11 app I need to create menu items on top of my DX11 windowed app similar to most windowed applications (File, Edit, etc...). How can I achieve this ? There is a hMenu handle to pass to the DirectX window creation function but I have no idea how to create this object. Additionnaly I'd like to have 1 or several ribbons under the window menu with icons to trigger functionnality. EDIT My menu is all good now and I chose to implement a windows ribbon, but I'm still having problems at creating the ribbon. Here is a screenshot of my app. The green color is the Direct3D clear color I would like my ribbon to display under the menu (and eventually remove the menu after that). My ribbon code being LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) PAINTSTRUCT paintStruct HDC hDC switch (message) case WM CREATE if (!SetupMenus(hwnd)) MessageBox(nullptr, TEXT("Failed to setup GUI."), TEXT("Error"), MB OK) ... bool SetupMenus(HWND hwnd) Create the menu ... Create the ribbon IUIFramework pFramework NULL HRESULT hr CoCreateInstance(CLSID UIRibbonFramework, NULL, CLSCTX INPROC SERVER, IID PPV ARGS( amp pFramework)) if (FAILED(hr)) std cerr lt lt "Fail 1" lt lt std endl hr pFramework gt Initialize(hwnd, IUIApp) if (FAILED(hr)) std cerr lt lt "Fail 2" lt lt std endl outputs Fail 1. Why can't I create the ribbon ?


How do I use threads together with DirectX11? I have only found the documents on MSDN http msdn.microsoft.com en us library windows desktop ff476884(v vs.85).aspx Although it doesn't say anything about creating them, it mentions that device is thread safe while device context is not. Does the framework use threads by itself (if driver supports it) when it thinks it's more optimal? Or do we have to use some external library like BOOST to play around with threads?


Update DXGI swapchain sample count without recreating swapchain in full screen mode I'm implementing the ability to tweak graphics settings in my application at runtime (resolution, refresh rate, v sync, multisampling). It is possible to update the resolution, format and refresh rate using IDXGISwapChain ResizeTarget and IDXGISwapChain ResizeBuffers. However, I cannot find any way to update the swapchain's sampling(count and quality) in the same way. The only option I have is to go to windowed mode using IDXGISwapChain SetFullscreenState, then release the swapchain, recreate the swapchain with a new DXGI SWAP CHAIN DESC, and then go back to fullscreen again. (Didn't mention releasing and recreating back buffer and depth stencil since it is a must do).I am willing to stay at full screen mode before and after the settings are applied.


ID3D11Device CreateInputLayout Encoded Signature size doesn't match specified size I get STATE CREATION ERROR 161 CREATEINPUTLAYOUT UNPARSEABLEINPUTSIGNATURE with the following code Vertex data struct VertexData XMFLOAT3 v XMFLOAT2 vt XMFLOAT3 vn ... Create the input layout vertex shader. D3D11 INPUT ELEMENT DESC vertexLayoutDesc "V", 0, DXGI FORMAT R32G32B32 FLOAT, 0, offsetof(VertexData, v), D3D11 INPUT PER VERTEX DATA, 0 , "VT", 0, DXGI FORMAT R32G32 FLOAT, 0, offsetof(VertexData, vt), D3D11 INPUT PER VERTEX DATA, 0 , "VN", 0, DXGI FORMAT R32G32B32 FLOAT, 0, offsetof(VertexData, vn), D3D11 INPUT PER VERTEX DATA, 0 HRESULT hr g d3dDevice gt CreateInputLayout(vertexLayoutDesc, countof(vertexLayoutDesc), geomVertexShaderBlob gt GetBufferPointer(), geomPixelShaderBlob gt GetBufferSize(), amp g d3dInputLayout) And wannabe matching HLSL code struct Input float3 v V float2 vt VT float3 vn VN struct Output float4 color COLOR float4 position SV POSITION Output main(Input input) ... I can't spot the mismatch and what exactly the error message is pointing to. Weird thing I have very similar input layout and shaders that work perfectly fine, but this one doesn't.


DirectX 11 Mouse Picking Problem I'm trying to do mouse picking and actually it works but when I scale the object and click that point on the image it picks wrong one, this happens only after scaling an object and I'm sure matrices are correct, any idea? DirectX XMFLOAT4X4 projection DirectX XMStoreFloat4x4( amp projection, Graphics projectionMatrix) float viewX ((2.0f Input GetMouseX()) MainWindow GetDisplayResolution().width 1.0f) projection(0,0) float viewY (1.0f (2.0f Input GetMouseY()) MainWindow GetDisplayResolution().height) projection(1,1) DirectX XMMATRIX inverseMV DirectX XMMatrixInverse(nullptr,DirectX XMMatrixTranspose(entity gt Renderer gt MV Matrix)) MV is column order DirectX XMVECTOR rayOrigin DirectX XMVector3TransformCoord(DirectX XMVectorSet(0.0f,0.0f,0.0f,1.0f), inverseMV) DirectX XMVECTOR rayDirection DirectX XMVector3Normalize(DirectX XMVector3TransformNormal(DirectX XMVectorSet(viewX, viewY, 1.0f, 0.0f), inverseMV)) for (const auto amp subMesh entity gt Renderer gt mesh gt GetSubMeshes()) float distance 0.0f if (subMesh.AABB.Intersects(rayOrigin, rayDirection, distance)) for (unsigned int i 0 i lt subMesh.GetIndexCount() i 3) DirectX XMVECTOR p1 DirectX XMLoadFloat3( amp subMesh.positions subMesh.indices i ) DirectX XMVECTOR p2 DirectX XMLoadFloat3( amp subMesh.positions subMesh.indices i 1 ) DirectX XMVECTOR p3 DirectX XMLoadFloat3( amp subMesh.positions subMesh.indices i 2 ) if (DirectX TriangleTests Intersects(rayOrigin, rayDirection, p1, p2, p3, distance) amp amp distance lt minDistance) minDistance distance pickedEntity entity


Can state setting warnings be ignored? If I am running DirectX 11 in debug mode (D3D11 CREATE DEVICE DEBUG), I am constantly getting these warnings D3D11 WARNING ID3D11DeviceContext OMSetRenderTargets Resource being set to OM DepthStencil is still bound on input! STATE SETTING WARNING 9 DEVICE OMSETRENDERTARGETS HAZARD D3D11 WARNING ID3D11DeviceContext OMSetRenderTargets AndUnorderedAccessViews Forcing PS shader resource slot 6 to NULL. STATE SETTING WARNING 7 DEVICE PSSETSHADERRESOURCES HAZARD It is because I am setting a resource as a render target while it is currently bound to the PS. However, my rendering flow is set up such as it relies on the api to force the resource slot to null, and it works. Is there any reason I should be bothered with these warnings or I can rely on the api to enforce this every time? I only tested on 2 GPU s Intel HD 3000 and Nvidia GT525m.


Making a parenting system Each Entity can have one parent and any number of children. They have a position vector and a quaternion orientation. I know that I can make objects look like they're in a hierarchy by multiplying parent transforms all the way to the root, but how to I get the canonical coordinates out of those transformations? I need to have the real position of every Entity in the world in order to update their bounding meshes. I would like to keep my drawing code for everything as just this XMMATRIX transform XMMatrixRotationQuaternion(orientation) transform XMMatrixMultiply(transform, XMMatrixTranslation(position)) transform XMMatrixMultiply(world, transform) model gt Draw(context, states, transform, view, projection) Eg. without relying on visual tricks to get the hierarchy looking right, so no multiplications with parent transforms while rendering. How do I properly change a child's position and orientation with respect to the parent?


HLSL Shader Optimilation with MAD(m,a,d) I understand that the expression x m a d is most efficiently written as x mad(m,a,d) because at the assembly level only one instruction is needed rather than a multiply and add separately. My question regards optimally writing this expression x m a. Should this be written as x mad(m,a,x) or x m a? The difference is too subtle to profile but I'm wondering if anyone can see the difference at the assembly level. (I don't know how to view the assembly code.)


How can I calculate DeltaTime in seconds? Here is how I've been trying to implement delta time based on different internet resources. var startTime Number getTimer() game.Update(deltaTime) deltaTime Number(getTimer() startTime) 0.001 My issue with this is it doesn't seem to be giving me accurate timing. The main update shows the frame time at 0.001 and when reinitializing the level it goes to 0.002. I'm using dt else where for a timer and later on time based physics so I would like it to work as expected. I must be missing something silly.


Dynamic entities using classes and objects I'm trying to create a program which involves the creation of several characters entities. At the moment I have a Base Entity class an Entities class and a Main class. I can handle one entity alright, however I am trying to create each one editable through a standard function call. Main Class http pastebin.com AjgEBSke Entity Class http pastebin.com 5y2wD3Qc BaseEntity Class http pastebin.com VfqRgeng I feel a little confused on how to dynamically call and edit each specific character without limiting myself to lots of 'if' statements. I have tried to restart this project several times... Basically I'm creating a private object in a class. That class will be used to talk to that private object, Save, load and edit etc. Then in a seperate Entities class I create an instance of that object, this is where I think im getting caught up. As far as I know, I need to handle everything I want to do in that entity in this entity class. I give the entity object an ID, and a default name which I want to be able edit later. I also want to eventually be able to call that entity from other classes to 'draw' it, have it return the values I need to draw it, Name, body type etc (other variables in the object). I have managed to interact with a specific instance of the object class by checking if the String is equal to an objects ID and then doing something, this however I feel is not dynamic and I'll just get into a bigger mess. Ideally I think I want to be able to enter the object's class' instance name as a string and have it handle everything. Sorry this has been rather long, if you know of any articles or information on how I'd learn to create dynamic entities to do what I need to do, that'd be great. Im probably looking more for an explanation of the concept of what I'm trying to do as i've only just really sketched up this code. So this code might be a little pointless at the momemnt. Ive attempted it a few times, trying to set things up better each time, however ultimately fail when I try to make things behave dynamically. If i'm going about this completely the wrong way then please tell me as I'm still learning and don't want to get into the habit of doing things badly.


Setting up speedtests in Actionscript 3 for an entire game I'm very new to this so please forgive the questions possibly ill stated nature. Firstly is this even a valid way to speedtest public function L1() tree.x 200 tree.y 200 tree.healthPoints 0 addChild(tree) var myTimer Timer new Timer(100,60) myTimer.addEventListener(TimerEvent.TIMER,someFunction) myTimer.start() addEventListener(Event.ENTER FRAME, speedTest) function someFunction(event TimerEvent) t public function speedTest (e Event) if (tree ! null) do tree.healthPoints 1 while (tree.healthPoints lt 10000) tree.healthPoints 0 trace (t) Secondly I want to actually speed test the entire game somehow to check if adding new features or rewriting current features actually optimizes the game or not. What are some ways to do this?


What is the best toolchain for ActionScript3 social networks game development? I'm new to flash and web development too. But I have some background in c c Qt python. So, I want to know, what is the best toolchain for quickest dive into. My task is to write a game for facebook.com vkontakte.ru. I already have the design doc, great artist and game designer, so, the coding is the only stumbling block we met. There are no significant obstacles at server side, but, since we have not much time, I decided to ask some help on suitable toolchain definition. I think, that web services (maybe WCF) are perfect for the backend, so, some of them should transfer JSON ed data from to client, incapsulate game logic, and... here is the place I stuck. What next, what should I learn, what tools toolsets will provide learing productivity curve that meat least action principle. Maybe I'm on the wrong way and missing some basic and obvious (for web devs) things... I do not know, so, any advices will be highly appreciated. Yes, this is the copy of my question on SO, but it seems, that here is the really proper place to post it.


Best practice for organizing storing character monster data in an RPG? Synopsis Attempting to build a cross platform RPG app in Adobe Flash Builder and am trying to figure out the best class hierarchy and the best way to store the static data used to build each of the individual "hero" and "monster" types. My programming experience, particularly in AS3, is embarrassingly small. My ultra alpha method is to include a " class" object in the constructor for each instance. The class, in turn, is a static Object pulled from a class created specifically for that purpose, so things look something like this Character.as package public class Character extends Sprite public var strength int etc. public function Character( class Object) strength class. strength etc. MonsterClasses.as package public final class MonsterClasses extends Object public static const Monster1 Object strength 50, etc. etc. Some other class in which characters monsters are created. Create a new instance of Character var myMonster new Character(MonsterClasses.Monster1) Another option I've toyed with is the idea of making each character class monster type its own subclass of Character, but I'm not sure if it would be efficient or even make sense considering that these classes would only be used to store variables and would add no new methods. On the other hand, it would make creating instances as simple as var myMonster new Monster1 and potentially cut down on the overhead of having to read a class containing the data for, at a conservative preliminary estimate, over 150 monsters just to fish out the one monster I want (assuming, and I really have no idea, that such a thing might cause any kind of slowdown in execution). But long story short, I want a system that's both efficient at compile time and easy to work with during coding. Should I stick with what I've got or try a different method? As a subquestion, I'm also assuming here that the best way to store data that will be bundled with the final game and not read externally is simply to declare everything in AS3. Seems to me that if I used, say, XML or JSON I'd have to use the associated AS3 classes and methods to pull in the data, parse it, and convert it to AS3 object(s) anyway, so it would be inefficient. Right?


Bullet Manager Class I'm making a game in AS3, and it's a rather simple shooting game because I'm original. Anyway, probably the most subjective question here yet what is the best way to implement bullets in my game? Would it be smarter to make a universal bullet manager class on the game that handles all the bullet related data or have every entity that has bullets (players, enemies) have this sort of 'bullet manager'? Make a level wide bullet manager or bullet manager for each entity? Oh, and a side question I actually have an enemy manager class. How would I check for collisions from the aforementioned bullet manager class.


how to draw a dashed curved line to a point in as3? How can I draw a dashed curved line to a x,y point in as3? Basically I'm creating a game where you have a turret, and I want the arc the turret would fire a projectile along to be displayed as a dashed dotted line along the arc to wherever the mouse x,y is. Ideally it would use the drawing API, rather than using any bitmap manipulation.


Animating Tile with Blitting taking up Memory I am trying to animate a specific tile in my 2d Array, using blitting. The animation consists of three different 16x16 sprites in a tilesheet. Now that works perfect with the code below. BUT it's causing memory leakage. Every second the FlashPlayer is taking up 140 kb more in memory. What part of the following code could possibly cause the leak The variable Rectangle finds where on the 2d array we should clear the pixels Fillrect follows up by setting alpha 0 at that spot before we copy in nxt Sprite Tiletype is a variable that holds what kind of tile the next tile in animation is (from tileSheet) drawTile() gets Sprite from tilesheet and copyPixels it into right position on canvas public function animateSprite() void tileGround.bitmapData.lock() if(anmArray 0 .tileType gt 42) anmArray 0 .tileType 40 frameCount 0 var rect Rectangle new Rectangle(anmArray 0 .xtile ts, anmArray 0 .ytile ts, ts, ts) tileGround.bitmapData.fillRect(rect, 0) anmArray 0 .tileType 40 frameCount drawTile(anmArray 0 .tileType, anmArray 0 .xtile, anmArray 0 .ytile) frameCount tileGround.bitmapData.unlock() public function drawTile(spriteType int, xt int, yt int) void var tileSprite Bitmap getImageFromSheet(spriteType, ts) var rec Rectangle new Rectangle(0, 0, ts, ts) var pt Point new Point(xt ts, yt ts) tileGround.bitmapData.copyPixels(tileSprite.bitmapData, rec, pt, null, null, true) public function getImageFromSheet(spriteType int, size int) Bitmap var sheetColumns int tSheet.width ts var col int spriteType sheetColumns var row int Math.floor(spriteType sheetColumns) var rec Rectangle new Rectangle(col ts, row ts, size, size) var pt Point new Point(0,0) var correctTile Bitmap new Bitmap(new BitmapData(size, size, false, 0)) correctTile.bitmapData.copyPixels(tSheet, rec, pt, null, null, true) return correctTile


What is a good approach for making a relationship between the HUD and Environment? What is an elegant common way to build a relationship between the game scene environment world and the HUD that usually sits on top of it? I have thought about this for a while, and though there are ways to accomplish this that are easy to implement, they always seem to expose too much unrelated information between the two, or end up being too coupled. An example of this that I have used in the past would be to simply pass reference from the HUD to the Environment and vice versa (which is obviously not a good apporach for many reasons, especially when aiming for low coupling). What I want to end up with is a clean, uncoupled way to do things like From the HUD reference and manipulate objects within the environment, change the state of the Environment itself. From the environment update the HUD to reflect the current state of the environment. Maybe passing reference between the two is the way to go about this, but I feel like there's some pattern that I am missing for this type of task. Any insights into past experience and implementations concerning this type of problem would be very helpful.


Air AS3 Desktop Detecting wrong screen resolution and coordinate offset I have an issue with developing an Air desktop app using FlashDevelop in ActionScript 3.0 I'm pretty much new to all this, but I think I made all I should and am wondering if this could be some bug outside my code. My screen and desktop composition is as follows 1x Surface pro 3 with Multitouch 2160x1440 screen on the left (Identified as Screen 1) 1x Dell P2314T Multitouch with 1920x1080 screen in the middle (Identified as Screen 2) 1x Dell P2314T Multitouch with 1920x1080 screen on the right (Identified as Screen 3) When I run Air app with fullscreen mode with stage.displayState StageDisplayState.FULL SCREEN stage.scaleMode StageScaleMode.NO SCALE I get it on the Surface's screen on fullscreen, it being the windows Main display. If I trace the stage.nativeWindow.width and stage.nativeWindow.height I get the correct resolution. Now since I wanted the app to run on the 23" screen, I set Screen 2 to be the Main display in windows. Now AIR app is ran on the screen 2 by default, thus reporting the stage width and height being 1920 and 1080. However, the child sprites I have on stage with coordinate x 0 are outside my screen area! They are not visible on the screen on the left, but simply hidden like they're outside of the stage. If I put first child x offset to 120 (half of the difference between 1920 and 2160 screen widths), it's positioned approx on the left edge. To see better what's going on, I went to screen resolution manager and disabled the internal Surface's screen completely ("Don't show desktop on this screen", thus leaving me with 2x 1920x1080 screens only. If I run the code now, the stage.nativeWindow.width and height are reporting resolution of 2160x1440 that's screen 1, which is disabled and has no image on it at all. The Sprite x offset issue remains the same, being 120 in minus. The code is completely clear, having stage with single sprite and quad drawn. public class Main extends Sprite static public var instance Main public function Main() instance this Multitouch.inputMode MultitouchInputMode.TOUCH POINT stage.displayState StageDisplayState.FULL SCREEN stage.scaleMode StageScaleMode.NO SCALE stage.nativeWindow.alwaysInFront true trace( String(stage.nativeWindow.x) ' y ' String(stage.nativeWindow.y) ' size h ' String(stage.nativeWindow.height) ' w ' String(stage.nativeWindow.width) ) init() private function init() void frame new Sprite frame.x 120 frame.y 450 addChild(frame) trace('frame x ' frame.x) What could possibly cause such error? Could someone confirm whether this error is reproducible? Thanks! Edit 1 Ok, seems like the failed offset was fixed adding the stage align property in main stage.align StageAlign.TOP LEFT I'm still interested to know why the runtime default align happens using scree 1 instead of main's resolution, and therefore fails to be correct though! The magic about wrong resolution still stays the same, and can't be reproduced using two different screens (AOC 1920x1080 and Dell 1920x1200) in same composition, using same settings. Weird...


Drawing simulator Tracking mouse movement I was wondering what would be the logic behind coding a drawing simulator like the one on this website https www.mdbg.net chindict chindict.php?page chardict amp cdcanoce 0 amp cdqchi The paintbrush tool when you click it, once you start drawing strokes that a similar to what a character is, it will automatically bring out a list of characters that leads toward what you are drawing. Once you are finished, the correct character will show up. To my idea, I think that a set of coordinates are set already and once the mouse coordinates passes through these points, then from there it will detect and provide all the possibilities and narrows it even further. I think this is very complex but what would be the right path correct way to go about programming this concept?


AS3 Using singletons for sound managers Is it necessarily a bad thing to use a singleton for a sound manager? I am having a really tough time determining whether or not I should go ahead and use a singleton (which is easy it works) or if I am shooting myself in the foot by deviating away from good OOP principles (since a singleton is basically a glorified single instance global variable of sorts).


Workflow with Flash Pro CS6 and FlashDevelop Using fla and swc to store assets I am using this tutorial http www.flashdevelop.org wikidocs index.php?title AS3 FlexAndFlashCS3Workflow In the past older versions of Flash Pro I was able to complete these steps right click on the symbol in the Library panel, select "Linkage..." dialog, check "Export for ActionScript" and fill in the symbol name (ie. MySymbol design or assets.MySymbol design), do not change the base class (ie. flash.display.MovieClip). Right now, I am stuck at that part. Any hints? What I wish to do is Use fla for the artist to store assets. Publish to swc Extract the assets in FlashDevelop by creating an instance of their class. ... How is this done in CS6? To clear things up, this is what I see when I right click a Flash symbol


Looking for a good actionscript 3 book I've been looking for a book on actionscript3 development, but while there's tons of books out there, nobody seems to want to recommend any specific one. One book I've been pointed towards is the cookbook by o'reilly, but it, like most books out there, seems to be based on the assumption that I'm using flexbuilder or flash. Instead, I'm "just" using flashdevelop, or the free SDK directly. I've also been told to just go with the api reference and live with it. I could do that, I suppose, but I'd rather have a book that gives me the big picture. Kind of like with cocoa, there's the hillegrass' book, or the red book of OpenGL. So, what would be the actionscript3 book out there?


Blitting in AS3 with anti aliasing? What would be the fastest method for doing anti aliasing for a flash game that is drawn via blitting to a BitmapObject? A method I thought of would be to make games stage smaller than the BitmapObject that the game is drawn to, and then somehow shrink it to the size of the stage. Would that method work? If so what would be the fastest and highest quality to shrink the bitmap? Or would there be a completely different way to do it?


How can I disable the forward back buttons in AS3? How can I disable the Flash player forward and back button in AS3? These buttons make it possible to cheat in my game by moving from level to level.


Nape physics Moving a body Hey I'm currently getting started with physics engines and I set up a body (box shaped) which represents my character. Question Which methods can I use to move a Nape.Body aka my char? I tried so far to manipulate the velocity, addLocalForce Impulse but I don't know which method is the best for moving a character.


Is there any way to change the layering of objects in Actionscript 3 without altering the run order? I'm making a simple platformer in Adobe Animate, and I need the player to be layered in front of the stage because of a gimmick in the game. Unfortunately, whenever I change the layering order, it also seems to change the order that AS3 runs the instances. Is there any way to change the layering order without affecting the instance order, or vice versa? I'm only just starting with programming, so please bear in mind that I probably won't understand many of the technical terms. Thanks in advance!


In AS3, is it necessary to remove the children from a parent who is also being removed? My point is this addChild(parentMC) parentMC.addChild(child1) parentMC.addChild(child2) If I want to then remove parentMC from the current container, is it necessary to also remove child1 and child2 from parentMC in order to properly clean up? Or is that handled automatically through removing parentMC?


Enemy collision detection with movie clips I have created multiple movieclips with animations within them. It is an obstacle avoidance game and I cannot seem to be able to get my enemies to contact my playableCharacter. The enemies I have created are each embedded on certain levels of my game. I have created an array, enemiesArray to have each of my enemies placed within it. Here is the code for that step 1 make sure array exists if(enemiesArray! null amp amp enemiesArray.length! 0) step 2 check all enemies against villain for(var i int 0 i lt enemiesArray.length i ) step 3 check for collision if(villain.hitTestObject(enemiesArray i )) step 4 do stuff trace("HIT!") removeChild(enemiesArray i ) enemiesArray.splice(i,1) removeChild(villain) villain null What I am unsure of is whether or not my enemiesArray is actually holding the movieclips I have suggested. If it was, this code would be tracing back a "HIT" for every time I ran into an enemy and would kill my character. It is not doing that however. I am thinking I have to push my movieclips into my array but I don't know how to do that or where for that matter. Any and all help would be much appreciated.


Export information to a custom file type from Air So I have an engine (air application) that basically (for now) is loading some windows on the screen stage, and you can drag them around. And later on, I'll be able to add other objects onto the stage. How would I export any kind of information (like co ordinates or sizes of windows) out of my application to an external custom file. And then I would use that file to reload a previous project if I were to re load the engine. I'm working in AS3 Air and in FlashDevelop. Thanks for the help and time. If anymore information is needed please let me know. Cheers.


How can I output multiple sprite sheets from a single .fla? I have to produce out three sprite sheets of differing sizes. To do so, I have three different .fla source files. Obviously maintaining three files takes more time than maintaining one is there some way that I can use one .fla and produce three differently sized sprite sheets?


How can I make a character walk on uneven walls in a 2D platformer? I want to have a playable character who can "walk" on an organic surface at any angle, including sideways and upside down. By "organic" levels with slanted and curved features instead of straight lines at 90 degree angles. I'm currently working in AS3 (moderate amateur experience) and using Nape (pretty much a newbie) for basic gravity based physics, to which this walking mechanic will be an obvious exception. Is there a procedural way to do this kind of walk mechanic, perhaps using Nape constraints? Or would it be best to create explicit walking "paths" following the contours of the level surfaces and use them to constrain the walking movement?


How to change Alt Drag and Shift Drag shortcut in Unreal Engine? As a 3DS Max user, the ALT SHIFT commands are reversed in Unreal, and for the life of me, I cannot easily switch between these differences. I always try to copy an asset by Shift Click Dragging it, and end up panning with it instead. The alt key is supposed to deselect, and instead it duplicates in Unreal. I've looked everywhere in the General Keyboard Shortcut settings and don't see those keybinds.


In unreal engine, what's the difference among "set global time dilation" and "set current time dilation" and "set custom time dilation"? what's the different effect of these three functions, thanks!


How to change the value of variable from actor Y by the blueprint of actor X? I have a project, and it has 1 NPC (actor X), 2 target points and 1 tower (actor Y). Image of components in level These rose arrows demonstrate part of the NPCs path. I added a Event Begin Overlap in the blueprint of the NPC so that when it collides with the tower it loses 10 of life every second Image of print of variable life When the NPC gets 0 life, it goes to the next target point. But I would like to know how to also modify the life of the tower by the same blueprint (NPC). The code is already in my mind, it is kind of obvious to speak the truth. "Code" of NPC blueprint I do not want to have to create a new Event Begin Overlap on the blueprint of the tower. And I think using the blueprint level would not be a good idea. One of the links below indicated something like Blueprint Interface, but I'd like to know if I can do what I want for the NPCs own blueprint. Links https forums.unrealengine.com international brazil 89438 pegar vari C3 A1vel de outro blueprint https answers.unrealengine.com questions 21386 communication between 2 blueprints.html?sort oldest https answers.unrealengine.com questions 24773 how to call a blueprint variable from another blue.html https docs.unrealengine.com en us Engine Blueprints UserGuide Types Interface


How can I fix texture clipping in Unreal 4? I made a small project testing out mini maps, it worked fine, I left it alone for a few months and reopened the project, and now I'm getting this I'm not even sure what to call this kind of issue other than clipping. Also note, a sprite representing the player model is supposed to be at the center of the mini map, but now it doesn't show. I hadn't made any changes to the project since I last worked on it, and when I check the camera I'm using for the mini map, the pointer is definitely visible in the Blueprint. The project was made in 4.13. Though as I took that screenshot, everything else that should be visible disappeared, so the mini map no longer is showing the floors and walls. This feels like a graphics problem. Anyone know where I can start fixing this? SOLVED It was a rendering shader problem. Project settings platform mac rendering Max Metal Shader Standard to Target "Metal v1.1"


How to spawn objects and control the content in each spawn I'm using unreal engine and would like to spawn multiple actors and control the text in each spawned actor. How can this be achieved in unreal engine?


Read actor instance's text variable for widget when triggered on different objects What I'm trying to do (a 'long story version' is linked in comment below) (and another user example is hyperlinked in comment below i couldn't post over 8 images and or links in this first comment ) (there are other similar user questions elsewhere I know) Short story I'm trying to make a widget that is triggered by an actor blueprint, and I want the widget to display different text that reflects the public variable text edits I make in the editor. My latest progress includes actors that are titled somewhat according to the hyperlinked user case above so, I have a quot door trigger quot and a quot doorWidget quot . I have altered the pin connections so much that I am just going to copy and paste all my screen shots below. I got to change text asset DoorName by making a public variable called quot name, quot as you'll see. I can make the trigger show this text on screen and have it disappear when the user leaves the trigger actor, BUT EVERY INSTANCE ALSO SHOWS THIS TEXT VALUE, EVEN THOUGH I CHANGE IT In the screenshots (some in comment following too) you'll see the text quot 3 quot appear on screen, and it does this for all three of the dummy boxes I made notice how the second box is supposed to show quot dd quot (I was just typing random filler content). ALL HELP SO APPRECIATED!!!!! Thank you!!!


Cannot add key in matinee for static meshes (UE4) My problem is the following I was trying to make a sliding door based on a video tutorial, I had the static mesh, which was the door itself, and I added a Matinee for that door, so I went 'Add New Empty Group Add Movement Track', so I had the door with a movement track, but when I tried to add a key, I couldn't. This was the error message "Nothing to keyframe, or selected object can't be keyframed on this type of track." And I only get this message when I try to add keys in the movement track of a static mesh. When it's a camera, everything is fine. Any idea why this is happening, and how I can solve this? Thanks for your help


How to convert Unreal Engine 4 spline to a bezier curve? I have read the source code of USplineComponent and found that for a curve in Unreal, the result is calculated via FMath CubicInterp Performs a cubic interpolation param P end points param T tangent directions at end points param Alpha distance along spline return Interpolated value template lt class T, class U gt static FORCEINLINE DEBUGGABLE T CubicInterp( const T amp P0, const T amp T0, const T amp P1, const T amp T1, const U amp A ) const float A2 A A const float A3 A2 A return (T) (((2 A3) (3 A2) 1) P0) ((A3 (2 A2) A) T0) ((A3 A2) T1) ((( 2 A3) (3 A2)) P1) You can follow the logic in USplineComponent Draw to be convinced. And the calculation approach above is the same as the cubic hermite spline boldsymbol p (t) (2t 3 3t 2 1) boldsymbol p 0 (t 3 2t 2 t) boldsymbol m 0 ( 2t 3 3t 2) boldsymbol p 1 (t 3 t 2) boldsymbol m 1 Then the problem becomes how to convert a cubic hermite spline to a bezier curve. I have tried several conversion methods on SO https stackoverflow.com a 1099357 3427520 https stackoverflow.com a 42587252 3427520 https stackoverflow.com a 42590480 3427520 But all failed to get a correct bezier curve as USD that can be correctly rendered by Houdini. But what I have been worrying most is that USplineComponet is not a cubic hermite spline. I'm not sure since I knew few about curve math, even after reading some introduction of curve wiki, PDFs and articles. The bezier curve data to USD bezier basis curve procedure may also fail, I don't have a solution to verify converted bezier curve is correct (can generate the same shape in UE4) or not.


How to find the client's monitor valid refresh rates with Unreal Blueprints? I am making a settings menu. This includes a combo box where you can change the refresh rate setting. How do I find out the maximum allowable refresh rate of the current user's monitor, using Blueprints?


Lightmap not working? So I've been exporting and re exporting my mesh from Blender and importing it into UE4 over and over again. For some reason, even after I've generated the light map in Blender, renamed both UV maps, re applied the UV maps, baked the textures, then changed the Light Map resolution in UE4 to 512, the Light Map Coordinate to 1, and built the lighting, my mesh is still black and I can't figure out why since I've tried literally everything I could find in my research. In the image below, the left mesh is what it's supposed to look like, and the right mesh is what it looks like after building the lighting. Please help me with this, thank you.


Use ramp and steps meshes as actual ramp in unreal engine 4.26 Is it possible to use a ramp mesh as an actual ramp in UE4? It seems that the system create a rectangle box around the ramp o the character does not climb the ramp, it is over it like on a box. I know that we can use landscape ramp's generator, but it's one more step that could be avoid. thanks guys!


How to get UE4 to correctly put my bundle identifier for iOS projects? Each time I create a new project UE4 adds a generic bundle identifier to the iOS platform settings, that I always have to change to com.myname. PROJECT NAME in order to be able to run the newly created project. So, I wonder how can I make UE4 to correctly auto detect this field from the picked provisioning profile. I was thinking something like putting BUNDLE IDENTIFIER (including the square brackets) but the editor crashes when I put that in the bundle identifier field.


HUD Text not displaying drawing I am trying to use blueprints to display my character's speed using a HUD, but for some reason the text is not displaying. What am I doing wrong? I am using the First Person template.


Adding 2 sounds to 1 asset I've got a sound looping from the start of the game, working exactly as I need it to. What I need is a second sound to alert the player that they have located the hidden object (the first sound is a locator sound to help them go in the right direction). My problem is that when I add the second sound to the object, there seems to be no change. Is there a way to add this second sound to go off when the player gets within the attenuation sphere? I don't want it to shut off the first sound though, just make the sound over it. That way if the player wanders away, they know where to go back to because the first sound will still be playing.


Custom event doesn't update blueprint variables Here's what I have To sum it up calling the OnInteract event (which comes from an interface) prints the 'Proceed' variable. Clicking Fire sets the variable to true and prints it. 'Proceed' is false by default. The problem is that the OnInteract event always prints 'false', even if the Fire event has been called. The Fire event correctly prints 'true', but if I call the OnInteract event later, it still prints 'false', even though logically the variable should be 'true'. No outside entity is changing the variable. If I set the default value of the variable to 'true', it prints 'true'. The entire project is just the First Person template, a single blueprint actor whose entire event graph is what you see in the screenshot, and an outside entity calling the OnInteract event when I press the button. Curiously, if I ditch the OnInteract event completely and replace it with InputAction Jump, the code works as expected and prints 'true'. What's going on? This is so simple, and yet it has me beat.


How do I add custom data to a ListView widget in Unreal? I have a UserWidget object with a ListView in it. How do I add objects add and custom data to them, such as names?


Radial circle placement of meshes How to place 10 static meshes in circular pattern so they are equaly aligned from the center ?


UE4 Want my landscape to be unlit BUT catch shadows from objects Here is my problem, I have a landscape that was created through photogrametry. I already has strong shadows on it's diffuse texture so I don't want it to be affected by my virtual sun. What I do want though is for objects added in my scene to receive shadows from the landscape, and for the objects to cast shadows onto the landscape. To do that I matched my virtual sun as close as I could with the shadows on the diffuse texture of the landscape. How do I keep my landscape unlit yet able to receive and cast shadows from and to other objects?


Setting object O2 to have the same geometric relation to P2 as O1 has to P1 I'm trying to place Object O2 with the same relation to P2 that O1 has to P1, like shown in the picture below. This is a problem that I'm facing trying to implement portals in Unreal Engine 4, where O1 is the player camera P1 is a portal O2 is a second camera, used to render the scene from the perspective of the other portal P2 is the portal linked to P1 Get the player position in relation to this portal and project it in relation to the linked portal FMatrix NewCameraWorldMatrix LinkedPortal gt GetTransform().ToMatrixWithScale() GetTransform().ToMatrixWithScale().Inverse() PlayerCamera gt GetComponentTransform().ToMatrixWithScale() FTransform NewCameraWorldTransform FTransform(NewCameraWorldMatrix) PortalCameraAnchor gt SetWorldLocationAndRotation(NewCameraWorldTransform.GetTranslation(), NewCameraWorldTransform.GetRotation()) However, the above code is not solving the problem I presented and I can't figure out why. Any ideas on what may be the issue? Note I've wrapped the PortalCamera with an Anchor since the PortalCamera must have a specific relative orientation at all times and using SetWorldLocationAndRotation directly on it would mess up its rotation. Note I have these logs (one per portal) which might be useful LogTemp Warning LogTemp Warning GetTransform().ToMatrixWithScale().Inverse() 1 2.38419e 07 0 0 2.38419e 07 1 0 0 0 0 1 0 1410 1570 420 1 LogTemp Warning LinkedPortal gt GetTransform().ToMatrixWithScale() 1 0 0 0 0 1 0 0 0 0 1 0 820 1410 420.238 1 LogTemp Warning PlayerCamera gt GetComponentTransform().ToMatrixWithScale() 0.572059 0.791792 0.214041 0 0.810578 0.585631 0 0 0.125349 0.173497 0.976825 0 372.749 65.9088 332.374 1 LogTemp Warning NewCameraWorldMatrix 0.572059 0.791793 0.214042 0 0.810578 0.585631 5.10315e 08 0 0.125349 0.173497 0.976825 0 767.052 3445.01 144.706 1 LogTemp Warning NewCameraWorldTransform.GetTranslation() X 767.052 Y 3445.011 Z 144.706 LogTemp Warning NewCameraWorldTransform.GetRotation() X 0.095848404 Y 0.048997864 Z 0.885227978 W 0.452530354 LogTemp Warning LogTemp Warning GetTransform().ToMatrixWithScale().Inverse() 1 0 0 0 0 1 0 0 0 0 1 0 820 1410 420.238 1 LogTemp Warning LinkedPortal gt GetTransform().ToMatrixWithScale() 1 2.38419e 07 0 0 2.38419e 07 1 0 0 0 0 1 0 1410 1570 420 1 LogTemp Warning PlayerCamera gt GetComponentTransform().ToMatrixWithScale() 0.572059 0.791792 0.214041 0 0.810578 0.585631 0 0 0.125349 0.173497 0.976825 0 372.749 65.9088 332.374 1 LogTemp Warning NewCameraWorldMatrix 0.572059 0.791792 0.214041 0 0.810577 0.585631 5.10314e 08 0 0.125349 0.173497 0.976825 0 767.11 3444.93 145.171 1 LogTemp Warning NewCameraWorldTransform.GetTranslation() X 767.110 Y 3444.927 Z 145.171 LogTemp Warning NewCameraWorldTransform.GetRotation() X 0.095848396 Y 0.048997886 Z 0.885228097 W 0.452530175 LogTemp Warning


Selecting Hiding is broken for Perspective but works for Orphographics views. Why? I'm learning Unreal4. Got a problem with selecting, focusing and hiding objects. Focusing Issue Focusing have to be done separatly for perspective view and ortho view. Why it is so? Example If I select an object in perspective view and focus on it (key F) everything works only for perspective view, but at the same time in ortho view no focusing occurs. So inorder to focus on the object in the ortho plales too I have repeat the whole process again find object in orpho plane, select it, click F and only then focusing happens in all ortho view planes. In perspective view quot Show only selected quot does not work, but works in ortho views The same issue with quot Show all actors quot . Please, I need help. Thnaks. P.S. Damn, it looks like I'm in some kind of a mode (for the lack of a better word). I mean in my clicking around, i've clicked ON some mode and now this selection hiding thing works buggy...


Unreal Engine Niagara Particle Velocity Based on Density of Particles? Goal Simulation of particles where each particle moves to the direction with the highest density out of candidate directions. I'm not sure how to do the following operations using UE Niagara. How to look at the positions of other particles within a Niagara Emitter. I know how to access to the position of other emitters using event handlers. How to read the positions of particles that are in a certain region in the 3D space (eg. within the bounding box of (0,0,0) (1,1,1)) efficiently. Please feel free to suggest any other features within UE, but I think Niagara is the way to go.


How to use X,Y, and Z instead of Pitch, Roll and Yaw I'm learning Unreal engine, and I'm rather disappointed because it uses pitch roll and yaw instead of the standard x, y, and z that I'm used to. Is there any way to convert this easily, or is there a preference, or do I have to get used to using y,z,x, instead of x,y,z.


Where do I have to put actions when the game state changes I ve just started to learn Unreal Engine implementing a clone version of Atari s Pong game. I m thinking about where to put the code to change the state of the game. I have an enum in the GameState class to manage when the game hasn t started, or when we are playing the game. In case when someone scores I decided that I have to stop the ball and move it to its initial position. My problem comes here because I don t know where to put the code to do that on GameMode class or on GameState class. Where do I have to put that code?


Destroy multiple actors by pressing a button I'm making a simple project to learn Unreal Engine. I have 50 actors (blueprints) and at the start a function will loop 5 times and spawn 5 of the 50 actors randomly. How can I destroy the actors by pressing a button, irrespective of which of the 50 actors are spawned?


Unable Compile Unreal Project into .Exe File I'm new to Unreal Engine and I've been looking for an answer online but I don't understand why the project I just started on is unable to compile. I only used the default blueprints. The error logs are below. UATHelper Packaging (Windows (64 bit)) Running AutomationTool... UATHelper Packaging (Windows (64 bit)) Parsing command line ScriptsForProject C Users belmo OneDrive Documents GitHub EscapeFromDarksidePenitentiary EscapeFromDarkSide EscapeFromDarkSide.uproject BuildCookRun nocompileeditor installed nop4 project C Users belmo OneDrive Documents GitHub EscapeFromDarksidePenitentiary EscapeFromDarkSide EscapeFromDa rkSide.uproject cook stage archive archivedirectory C Users belmo OneDrive Documents GitHub EscapeFromDarksidePenitentiary EscapeFromDarkSide package ue4exe quot C Program Files Epic Games UE 4.26 Engine Binaries Win64 UE4Editor Cmd.exe quot ddc InstalledDerivedDataBackendGraph pak prereqs nodebuginfo targetplatform Win64 clientconfig Development utf8 output UATHelper Packaging (Windows (64 bit)) Setting up ProjectParams for C Users belmo OneDrive Documents GitHub EscapeFromDarksidePenitentiary EscapeFromDarkSide EscapeFromDarkSide.uproject UATHelper Packaging (Windows (64 bit)) COOK COMMAND STARTED UATHelper Packaging (Windows (64 bit)) Running UE4Editor Cook for project C Users belmo OneDrive Documents GitHub EscapeFromDarksidePenitentiary EscapeFromDarkSide EscapeFromDarkSide.uproject UATHelper Packaging (Windows (64 bit)) ERROR Cook failed. UATHelper Packaging (Windows (64 bit)) (see C Users belmo AppData Roaming Unreal Engine AutomationTool Logs C Program Files Epic Games UE 4.26 Log.txt for full exception trace) PackagingResults Error Cook failed. UATHelper Packaging (Windows (64 bit)) AutomationTool exiting with ExitCode 25 (Error UnknownCookFailure) UATHelper Packaging (Windows (64 bit)) BUILD FAILED PackagingResults Error Unknown Cook Failure LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogEditorViewport Clicking on Actor (LMB) StaticMeshActor (Cube11) LogSlate Window 'Output Log' being destroyed LogSlate Window 'Output Log' being destroyed LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogD3D11RHI CreateSwapChainForHwnd failed with result 'DXGI ERROR INVALID CALL' (0x887A0001), falling back to legacy CreateSwapChain. LogEditorViewport Clicking on Actor (LMB) StaticMeshActor (Cube11)


What is the correct way to make an Installed Build? I am trying to use the Automation tool, following the documentation. To create an Installed Build Run the Installed Build Script by invoking the AutomationTool with the following command line, replacing PLATFORM with either Win64 or Mac. BuildGraph target quot Make Installed Build PLATFORM quot script Engine Build InstalledEngineBuild.xml clean However, I am getting this error. ERROR Target 'Make Installed Build Win64 ' is not in graph I am not sure what I should put as the platform. I searched the config file, but don't see any specified platforms.


For Visual Studio Community 2017, 'Unreal Engine Installer' option is not available On Visual Studio Community Installer, I cannot find 'Unreal Engine Installer' under 'Desktop Developemtn with C ' 'Optional'. According to the tutorials I am learning, the 'Unreal Engine Installer' should be availbl.e I have Visual Studio installed on 'C ' and Unreal installed on 'H ' can this be the problem?


How can I expose material parameters in the Unreal level editor? Is there a way to expose material parameters in Unreal 4 so that they are accessible from the level editor? As far as I know, I can only do this through the Material Editor, but I wish to do it more fluently. E.g. to edit a color for the currently selected object in a level


Blueprint script executed on tick but not on construction Below, on event tick, I am initializing a map of images once, which works fine (remember we are in a graph for a widget blueprint here). Z Cursor Images is the map of the images. The keys in the map are an enum, and I am adding first an image for the default cursor, and then an image for when the player is targeting an object that she can pick up. Now, when I do the same in the construction script (Event Construct), it does not throw an error but later I cannot access the textures from the map. IsValid returns false for them... So why is the map filled on tick but not on Event Construct? And how do I solve this?


Correct use of AttachActorToActor ue4 I'm trying to stick some blocks together, but frankly I have no idea what I'm doing. I spawn 2 blocks during run time, and if they have an on hit event they're supposed to stick to each other. It struck me that I'm not even sure if that's what attach does, and maybe it has some completely different meaning. with the following blueprints, I'm getting all sorts of errors like quot already attached quot and quot can't attach actor to actor, already attached quot https imgur.com a 16Zz2eS Any help appreciated


Is there a way to assign a texture to a button and resize it in the Unreal Engine? I'm attempting to create a main menu for my game and have followed an easy tutorial to do so. The tutorial doesn't cover assigning textures or images to buttons, so I set out to do this myself. Assigning the image to the button (I have a 'normal', 'hover', and 'clicked' texture) was rather easy, but the images don't fit. Using the 'Image Size' options don't do anything at all and I've got no idea on how to change the image without going back into Photoshop or GIMP and just redoing the whole image to fit the button size. Is there any way to actually change the size of the image inside the button in Unreal? Or do I just have to suck it up and re do it?


Deactivate VS warning "Macro in skipped region" Since the UE4 API relies heavily on macros outside of function bodies, the IntelliSense function (not the compiler!) of Visual Studio 2017 throws a lot of warnings with update 15.7, also visible in the scroll area. Is there a possibility in the Visual Studio settings to deactivate such kind of warnings? The option to deactivate IntelliSense Tools Options Text Editor C C Advanced Disable IntelliSense will disable those warnings. However I don't want to renounce IntelliSense completely. Maybe Visual Studio offers more fine grain control over IntelliSense via its GUI or some settings file to disable only those macro warnings? EDIT The Visual Studio team recommends using a .hint file to register macros as workaround. However maintaining a separate macro list is not the way to go. You can also vote there that the VS Team works on that.


How to enable treat warnings as errors in Unreal Engine 4.24? I've had little luck googling and it takes about an hour to build the engine (which I have to do if I'm to test if it works), so guessing is a bit time consuming. I've seen advice to add the ' WX' flag to .target.cs, as well to one of the functions in VCToolChain.cs, but I wasn't able to make it work. Has anyone here enabled this and knows how it works? I don't think it matters, but I've been using VS2017.


Displacement map to create terrain I am trying to figure out the best way to create a procedurally generated terrain at runtime in Unreal Engine 4. For the moment, my idea is to generate a heightmap and apply it to a plane as a displacement map, since it sounds a lot simpler than trying to procedurally generate a mesh. Is it how it is generally done? And if not, will I run into issues by doing it this way?


Recreating Common "Glowing Pillar" Effect in UE4 I've noticed a common "glowing pillar beacon" effect in a few games lately (Overwatch, Fortnite, etc). The effect provides a translucent glowing beam pointing upwards that tapers off towards the top and fades out. I'm attempting to recreate the effect and was wondering if this is some form of particle emitter and what is involved in the effect? Thanks! Examples


How can I add these bones to my meta human? Or is there a way I can make virtual bones count when retargetting? Paid for animations thinking they would be fine and they mostly are but... the hands are using these IK bones that I do not have. Is there a way I can add the bones to my meta skeleton within unreal? I tried creating virtual bones but they dont seem to come up in the retarget manager ( Also, I can only seem to add one virtual bone to the root whereas both the foot and hand IK root bones are parented to the root bone here. Any help would be massively appreciated!


Floor is moving faster than ball above it , and it causes ball to fall off the map. UE4 I am creating a game ( following Udemy lesson on Marble run) which is basically a maze and ball and we move ball my rotating floor on x or y axis through obstacles . Floor movement is linked on Mouse values. BP My problem is if I move my mouse too fast ball comes below floor and drops. I know there could be multiple hacks to solve this . but I am looking for best solution ( professional solution) I am a newbie so please bear with me ) Below is screenshot of ball below maze


Can I combine 2 UnrealEngine forks? I am using Daz Gen 8 characters and clothes in my project. After I read this I decided to use a fork of UE4 which uses Dual Quaternion Skinning. Basically if you use Daz characters under UE4, they going to distort better if you use DQS, which UE4 doesn't support by default. You can get the DQS modded engine from here. I compiled it and I managed to get all my stuff from my original project to a DQS one. No problem. But I also need a soft body and a clothing solution in the project. 4.25 has a clothing solution and it does work fine, but there is no soft body, that I know about... So there are a few options Vico Dynamics from the Marketplace using a Flex branch of UE4 if you know any more please please let me know Tested Vico, and it works fine for simple meshes, up to 20k poligons. Over that the editor becomes unresponsive... But this works with my modded DQS engine. The latest version of an UE4 branch with Flex is 4.22. I could get this compiled and running. I would like to know if I can merge the 2 repositiories (4.22 DQS and Flex) into one, and source build it... What software or workflow do you recommend to do merge these big branches of UE4? I guess there will be quite a few conflicts, because Flex distorts the mesh in it's own way, so does the DQS version of Unreal...


Why Are Some Foreign Characters Not Displaying Properly I am localizing a game for the first time and I'm noticing some characters are not displaying properly. Most are fine but there is a small handful that are not correct. For example on a loading screen I display the word Loading. In German I'm displaying L dt. The character is not displayed as , instead isn't displayed as shown in the image. I'm running in a standalone game. I packaged a development build to see if the problem was there too but it seem localizing is not working when I package it but I can tackle that problem later unless there is a known issues with this. To change languages I am calling Set Current Culture in blueprints.


Unreal Engine Ubuntu Failed to import video, unknown file extension I've been reading tutorials and guides on getting video file playback in Unreal. I have media player materials created and textures. I'm having issues importing video files to Content Movies directory. When I use the import manager the files don't show. Drag and drop says its an unknown file extension for MP4, MWV, and other formats I tried like AVI even though I know AVI is not supported. So I wonder if maybe I'm missing a plugin for Unreal 4.8 4.9 in Linux?


What is the equivalent node in UE4 for Blender's Musgrave Node? I'm trying to recreate Poliigon's non tiling nodes https www.youtube.com watch?v VgtSL5ZpYc, in UE4, and the only thing so far I don't see the equivalent to is the Musgrave node https docs.blender.org manual en latest render shader nodes textures musgrave.html, though UE4 has Perlin 3D Noise nodes, I don't see octave control described here https docs.unrealengine.com en US Engine Rendering Materials ExpressionReference Vector index.html Is there a way to accomplish this? I assume so, UE4 cannot not have it... unless they already have a non tiling node function already, and I don't know about it.


Unreal Engine Size on Disk I want to install Unreal Engine 4 from the epic game launcher but I have the following problem If I want to install the engine after about 50 it says I don't have enough space on my disk, and if I look up how much space the folder took it says 75 GB is that normal?


Where do I have to put actions when the game state changes I ve just started to learn Unreal Engine implementing a clone version of Atari s Pong game. I m thinking about where to put the code to change the state of the game. I have an enum in the GameState class to manage when the game hasn t started, or when we are playing the game. In case when someone scores I decided that I have to stop the ball and move it to its initial position. My problem comes here because I don t know where to put the code to do that on GameMode class or on GameState class. Where do I have to put that code?


Switch from left click to right click to make character walk in the Top Down Example, in UE4? When creating a new project in the Unreal Engine 4, you can choose to create a project already with some added features and things (Top Down Example) This project has a character (which I changed its appearance) and it moves around the map when I click the left mouse button I looked at the blueprints of the project, but I did not identify where the command is that makes the character walk, so I'd like it to walk when I right click. Alls blueprints of project M Cursor Decal TopDownCharacter TopDownController TopDownGameMode The circled blocks of reds are the ones I suspected could be where I should make the modification, but no information on them gave me the certainty that that was where I was supposed to change. I still do not create projects in C programming mode, because I do not have Visual Studio 2017. Some links from websites where I spent before coming here and that can help you to help me https docs.unrealengine.com en us Engine Blueprints https www.youtube.com watch?v EFXMW UEDco The video is 2015, so although it's good, I did not take it so well, because I know that with all this time that has already happened, a lot is different. Sorry for any translation errors, I'm not English speaker.


What does rebuilding the .vcxproj file do? I'm having the same problem this user had. The solution is confusing me, because all I want to do is comment out the code I added that caused the compiler crash, get Unreal to accept it and stop crashing, but he sounds like he is rebuilding the whole engine, and I just have one crashing project. I tried commenting out the code and saving the visual studio project, but it didn't change anything. What is his solution doing?


UE4 storing complex actors in Game Instance I want to make a game where I can hold tools in my hand and inventory. Obviously I want to pass them between levels and maybe even game sessions. Question is, how would I do that? With simple variables like amount of money or HP, all I do is store a variable in the Game Instance. But what about, for example, a tool that has more data, like the class type, durability, maybe value? Even worse, whole array of them? The way I use that in game is, there's an actor representing the tool. But even if I store array of those in the game instance, the actors get destroyed while changing level and the array just points empty memory. I could just spawn new ones by using the class type but that is not enough for me. My idea is to create something... maybe a struct, that would hold the information and then recreate the inventory item actors according to the data in the struct. My questions What are other ways to do it? and Is there something fundamentally wrong with the way I'm storing the items in my inventory now?


Textures on grass not showing on android I'm using assets from InfinityBladeGrassLands, and used SM Plains Grass01 for some foliage on my landscape. In editor, the foliage looks like this But when building for andoroid, this is what shows up What's the problem here? Edit I manually added an instance of the grass to the viewport, and that one is showing fine in android, but still the rest added using Foliage tool are not.


Nonsense error in the overlap between 2 warriors and a tower I have a project where 1 warrior is generated every 5 seconds. This warrior as it is generated tries to follow a path that contains 4 target points. Between the target point 1 and the target point 2 there is a tower. Then the warrior is going to meet the target point 2, but as soon as he hits the tower, he fails to reach the target point 2 and goes to meet it until it is destroyed. The part of the code circled in pink was to be executed only after the destruction of the tower (when the life of the tower reaches 0), which does not happen, but the worst thing is that when it executes, it does not execute completely, the tower is not destroyed, but the warrior moves toward target point 2. Result in game Look that the impression occurs for the two warriors. Maybe the message log will help I decrease the delay time of the loop to 0.1 and as there is no time for the second warrior to overlap the tower along with the first warrior, everything works correctly. The problem occurs when more than one warrior reaches the tower simultaneously.


increasing speed of sound as player approaches I am trying to create a sound that increases in speed as the player gets closer to the object. The sound is just a single 'ping' and will increase in frequency as we approach, once we are on top of it, it should play a different sound. I can't seem to get it to work. Here is what I've done in blueprints I'm not extremely experienced with Blueprints and I have almost no experience with working with sound in it. From my understanding, the blueprint should be measuring the distance between the object and the player, dividing it by .5, and then returning the sound at that speed. Currently, I'm getting no sound whatsoever.


How to use X,Y, and Z instead of Pitch, Roll and Yaw I'm learning Unreal engine, and I'm rather disappointed because it uses pitch roll and yaw instead of the standard x, y, and z that I'm used to. Is there any way to convert this easily, or is there a preference, or do I have to get used to using y,z,x, instead of x,y,z.


What is the correct way to make an Installed Build? I am trying to use the Automation tool, following the documentation. To create an Installed Build Run the Installed Build Script by invoking the AutomationTool with the following command line, replacing PLATFORM with either Win64 or Mac. BuildGraph target quot Make Installed Build PLATFORM quot script Engine Build InstalledEngineBuild.xml clean However, I am getting this error. ERROR Target 'Make Installed Build Win64 ' is not in graph I am not sure what I should put as the platform. I searched the config file, but don't see any specified platforms.


I want to drop a platform after I land on it I want to disable z axis translation lock 2 seconds after my player hits the object in question. I am using Unreal 4. Been slamming my head against it for a week and a half, please save this newb. I just noticed this is the iteration where I enabled gravity instead of disabling z lock... the intended result is be the same for both of these UPDATE now the thing drops but it doesnt wait for the timer UPDATE! I DID IT!


Unreal Engine 4 DefaultInput.ini mappings not showing in editor The mappings from DefaultInput.ini are not showing up in the editor. I had originally added them in the editor project settings, but it lost the mappings except for 2 of them Jump and Reset VR. They still show up in the DefaultInput.ini file. How do I get the editor to recover them (or read them from the .ini file?


Create a instance of a C class within a blueprint I'd like to create an instance of a C class in a blueprint. That's my current approach, but the instance is None. Why?