發表文章

UE4 Ray Tracing 初探

圖片
Ray tracing (光跡追蹤) Ray tracing 官方介紹 UE4的Ray tracing(後簡稱RT),分為"Ray Tracer" & "Path Tracer"兩部分,Ray Tracer用於計算彈跳後光線渲染之最終像素顏色,Path Tracer作為其配套工具,漸進式生成"地面真實資訊參考" (Ground Truth),由於其公正客觀的特性,適合與ray tracing比較,便於美術與程式疊代修改參考。 System Requirements Operating System : Windows 10 RS5 (Build 1809) or later GPU : NVIDIA RTX and some GTX series cards with DXR support using the latest device drivers. [ detail ] Unreal Engine Version : 4.22 or Later Enabling DX12 and Ray Tracing Project Settings > Platforms >Windows > Default RHI = DirectX 12 Project Settings > Engine > Rendering > Ray Tracing = true Ray tracing priority [importance level] (效果與成本綜合考量) r.RayTracing.Reflections [4] r.RayTracing.Shadows [3] r.RayTracing.Translucency [3] r.RayTracing.GlobalIllumination [3] r.RayTracing.AmbientOcclusion [3] r.RayTracing.StochasticRectLight [2] r.RayTracing.SkyLight [2] r.RayTracing.InstancedStaticMeshes [1] r.RayTracing.Landscape...

UE4 Pixel Streaming 使用懶人包

Pixel streaming 前置準備 Prerequisites Check your OS and hardware Supported Graphics Hardware NVIDIA Hardware-Accelerated Video Encoding (NVENC) AMD Advanced Media Framework (AMF) Supported Operating Systems Windows 8, Windows 10 Supported Client Browsers Google Chrome, Mozilla Firefox, Apple Safari Install node.js UE4 Setup Enabled plugin - pixel streaming Packaging unreal engine application Create a link and add launch parameters -AudioMixer -PixelStreamingIP=localhost -PixelStreamingPort=8888, and run it Run ...\Engine\Source\Programs\PixelStreaming\WebServers\SignallingWebServer\run.bat Open a web browser and navigate to http://127.0.0.1 connect to signaling server 使用UE4.24版本 延伸研究 Pixel Streaming 官方介紹 UE4像素流應用在公有雲上的快速部署指南

HP Reverb & Oculus Rift S 停用睡眠功能

圖片
  VR顯示器都帶有自動睡眠功能來避免螢幕老化 (burn-in),但這對開發者或是展示時有很大的困擾,當VR顯示器進入睡眠模式後,體驗內容會造成畫面嚴重延遲,若在多人連線下則會造成伺服器與客戶端失去同步,在甦醒後還有機率會發生VR顯示器需要重新定位的問題。 -------------------- HP Reverb (適用其他windows mixed reality體系頭盔)  Enable Screen Saver Mode - 啟用螢幕保護模式  此模式將停用睡眠模式,頭盔閒置時會關閉螢幕,但不會失去控制,直到重新戴上頭盔時螢幕會恢復顯示。 reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Holographic /v ScreensaverModeEnabled /t REG_DWORD /d 1  // 1 to enable screen saver mode  // 0 to disable screen saver mode  // Windows version 1903 or newer  Set Idle Timer Duration To Default - 設定休眠間隔時間 (預設15分鐘) reg add HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Holographic /v IdleTimerDuration /t REG_DWORD /d 900000  // Warning: Changing this idle timer to longer than the default can lead to Screen burn-in on Mixed Reality Headsets  // The Mixed Reality Portal idle timer specified in milliseconds Oculus Rift S  OculusCompatCheck.exe - 相容性測試  // C:\Program Files\Oculus\Support\oculus-compat  OculusDebugTool.exe - 除錯工具 (...

UE4中實現OPC UA Client來控制PLC

緣由與介紹    OPC Foundation    OPC (Open Platform Communications)    OPC UA 實作參考    Labview控制PLC使用OPC   商業授權方案 -  LabView  +  LabVIEW OPC UA Toolkit    Qt OPC UA open62541實現 (OPC UA C++ Library)    open62541 - github    open62541 - documentation -------------------------------------------------- 專案說明 本案硬體需與UE4連動,使用OPC來管理,透過PLC去控制,將open62541 (OPC UA C++  Library) 整理成UE4 plugin,可直接在UE4中直接使用 blueprint function library 呼叫方法來讀取、寫入PLC中的數值。   硬體端負責工作:硬體與相關感測器整合、PLC串接與控制、建立OPC Server   軟體端負責工作:建立OPC Client並整合至UE4,可讀取/寫入PLC中的數值 已實現方法   UA Client Connect   UA Client ReadValueAttribute   UA Client WriteValueAttribute   UA Client Disconnect

開放源碼授權類型簡介與選擇

圖片
Yuren Ju發表了關於開放源碼授權的系列文 開放源碼授權概觀(上) 開放源碼授權概觀(下) 文中用淺顯易懂重點摘錄的方式來說明各授權的差異,能夠快速瞭解各授權限制,判斷自己該怎麼選擇與使用。 不同授權的嚴謹程度 圖片出自於 AMIS “ 如果是我個人的開源專案,通常會採用最鬆散的 MIT 授權,讓使用者可以自由的使用,要開源要閉源都可以,並沒有太多的限制。 如果是公司的開源專案,則會選擇定義較為詳實的 Apache 2.0 授權,跟 MIT 授權相同也允許被授權人開源或閉源使用,但在著作權規範的較為仔細,同時也規範了專利權。而因為每個國家的著作權法律都有所不同,詳細的授權也比較容易跨國使用,不會因為不同國家的預設著作權行為造成一些差異。 但如果公司的專案有引用到任何 LGPL 的授權時,我們通常都會採用 LGPL 授權,原因是因為 golang 專案通常都採用靜態連結的方式,授權為 LGPL 會讓情況比較單純一些。 ” 快速簡易選擇建議 段落引用自  AMIS

Logitech G29 control mapping in UE4 (using Raw Input Plugin)

Logitech G29 control mapping in UE4 (using Raw Input Plugin) https://docs.unrealengine.com/zh-CN/Gameplay/Input/RawInput/index.html Logitech G29 Vendor ID : 0x046D Product ID : 0xC24F Logitech Wheel (方向盤) :   axis properties index = 1   offset = -0.5   scale = 3.0 Logitech Brake Pedal (煞車) :   axis properties index = 3   inverted = true   offset = 1.0   scale = -2.0 Logitech Accelerator Pedal (油門) :   axis properties index = 4   inverted = true   offset = 1.0 Logitech POV (十字鍵) :   axis properties index = 0   scale = 0.875

Windows10 版本1607後可啟用支援長路徑檔名 (Maximum Path Length Limitation)

在Windows中一般情況下最大路徑長度被限制在260個字元,Windows 10 版本1607後開始可以啟用支援長路徑。 啟用長路徑: Win + S鍵,輸入regedit,執行登錄編輯程式 找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled 並設定為1 為了使系統順利套用此設定建議重新啟動電腦,因為某些程序可能在設置之前已經啟動 // 在UE4開發中,偶爾會發生路徑過長導致打包失敗的情況,若系統版本支援,可嘗試使用此方法來改善 細節詳見 Microsoft Windows Dev Center - Naming Files, Paths, and Namespaces