Closed LVutner closed 5 years ago
Hi @MonoLityczny I am not exact sure about SDK, but you can use ogf data changer tool to assign any shander to any mesh on model. Also, models_lense_scope is not a part of shaders.xr. It is lua based shander. You can grab it from OGSE Resources repo: https://github.com/OGSR/OGSR-Engine/tree/main/Game/Resources_SoC_1.0006/gamedata/shaders/r2/models_lense_scope.ps https://github.com/OGSR/OGSR-Engine/tree/main/Game/Resources_SoC_1.0006/gamedata/shaders/r2/models_lense_scope.s
Can you show me that OGF Data Changer? I cannot find it.
Hi. It still doesnt work. I was able to change shader name even with notapad++ (glass_stalker_refl has the same number of characters) but on loading screen the game crashes with log:
[error]Expression : FATAL ERROR [error]Function : CResourceManager::_GetBlender [error]File : c:\projects\ogsr-engine\ogsr_engine\xr_3da\resourcemanager.cpp [error]Line : 46 [error]Description : Shader 'models\models_lense_scope' not found in library.
I am using the newest version of ogsr engine with models_lense_scope shaders files included in gamedata\shaders\r2
Did you clean shader cache after you add models_lense_scope ?
I've just tried. I deleted all files in Documents\Stalker-SHOC\logs\shader_cache folder, but it doesnt help, still the same error. Also, models_lense_scope didnt appear in shader_cache folder.
Then you add it in a wrong way. I use all shaders from ogse-resources and all works good - I see compiled models_lense_scope.ps and models can use it
Where do you see compiled models_lense_scope.ps ? In shaders chache ? NVM - I uneccesarily added models/ in shader path while it should be only models_lense_scope Thanks anyway.
Another issue - looks like horizontal rotation is mirrored in scope view: https://youtu.be/g9n-E7t3eJ0
You need to rotate lense meshe to fix this.
It helped, thanks :-)
@romanpopulik So all good now? Can I close this issue?
Just last thing. What is the relation between scope_zoom_factor and scope_lense_fov_factor ? I mean, in example, when I set scope_zoom_factor to value with no zoom at all (it's 90 with hud_fov 50) which value should I use for scope_lense_fov_factor to get 4x zoom ?
Btw - great job with this feature. I finished SVD and it works like a charm.
There is not correlation between scope_lense_fov_factor and scope_zoom_factor But, scope_lense_fov_factor depend on actual user fov and sometimes it requer some testing to find correct value. Also, it is good idea to use scope_inertion_factor with scope_lense_fov_factor to limit mouse speed when use lense.
Ah, I see. Thanks for the info. If you I could help with anything, I'll gladly do this.
Hello. I wanted to ask about adding 3D Scopes to model. I did a one sample model, and added models_lense shader to model with notepad++ but where's shaders.xr? I want to do it with SDK. Thanks.