VR模拟枪支打靶,消灭鬼怪,换弹以及上弦等等硬核枪支操作。 使用HTCVive设备,开启SteamVR进行游玩。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
3.7 KiB

3 years ago
version 1.3
The package includes prefabs of mesh effects and demo scenes for pc/mobiles with characters and environment.
------------------------------------------------------------------------------------------------------------------------------------------
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE !!!!
1) Your mesh transform scale should be (1,1,1). Standard particles size relative to mesh scale!
You should change the "fbx scale factor" instead.
2) Unity does NOT supported multiple submeshes with multiple materials to each submesh. 1 submesh = 1 material!
You can not add new material (for example lightning material) to all submeshes!
So, if your model have more then 2 submeshes, then material will be added only for last submesh.
You must use splitted meshes. There is no performance or draw calls difference. But then you can use additional materials for all meshes.
------------------------------------------------------------------------------------------------------------------------------------------
Effect USING:
In editor mode:
1) Just drag&drop prefab to your object. Effect should be included to object as child with zero position and rotation.
2) Set the property "Mesh Object" of script "PSMeshRendererUpdater".
3) Click "Update Mesh Renderer".
Particles and materials will be added to your mesh.
The script "PSMeshRendererUpdater" just update "shape" property of shuriken particles and add new material to mesh.
In runtime mode:
var currentInstance = Instantiate(Effect) as GameObject;
var psUpdater = currentInstance.GetComponent<PSMeshRendererUpdater>();
psUpdater.UpdateMeshEffect(MeshObject);
For SCALING just change transform scale of mesh.
------------------------------------------------------------------------------------------------------------------------------------------
Supported platforms:
PC/Consoles/VR/Mobiles with directx9/11, opengles 2.0/3.0 and gamma/linear color space
All effects tested on Oculus Rift CV1 with single and dual mode rendering and works perfect.
------------------------------------------------------------------------------------------------------------------------------------------
NOTE for PC:
If you want to use posteffect for PC like in the demo:
*) Remove "ME_Bloom.cs" from camera if you used this script before.
1) Download unity free posteffects
https://assetstore.unity.com/packages/essentials/post-processing-stack-83912
2) Add "PostProcessingBehaviour.cs" on main Camera.
3) Set the "PostEffectsProfile" (the path "\Assets\KriptoFX\MeshEffect\PostEffectsProfile.asset")
4) You should turn on "HDR" on main camera for correct posteffects.
If you have forward rendering path (by default in Unity), you need disable antialiasing "edit->project settings->quality->antialiasing"
or turn of "MSAA" on main camera, because HDR does not works with msaa. If you want to use HDR and MSAA then use "post effect msaa".
------------------------------------------------------------------------------------------------------------------------------------------
NOTE for MOBILES:
For correct work on mobiles in your project scene you need:
1) Add script "ME_DistortionAndBloom.cs" on main camera. It's allow you to see correct distortion, soft particles and physical bloom
The mobile bloom posteffect work if mobiles supported HDR textures or supported openGLES 3.0
The distortion and soft particles work on all mobiles.
------------------------------------------------------------------------------------------------------------------------------------------
You can change scale of effect using tranform scale of gameObject.
If you have some questions, you can write me to email "kripto289@gmail.com"