(Unity3D) When the Camera is in a object, Camera will stop rendering the object - unity3d

I'm using unity 2018.4.14f1 personal (I don't use 2019 or 2020 because it lags my computer)
I'm using the Unity Standard Assets Player Prefab and Cinemachine Freelook for the camera. I have some water, and when my player walks into it, its fine. However, when the camera comes into the water, it stops rendering the water. Is there anyway I can fix it?
Update: I've somewhat got it working, however its hollow when your inside. Is there anyway to fix that?
Video : https://easyupload.io/2b0p3a
(I'm quite a noob so if you need any screenshots please ask.)

The problem here is that the water will only rendered when looking from the outside as the normalized are modeled so. The program renders outs objects that it thinks is not in view. You can load the model into a 3d program and then copy and invert the model to allow your camera to see the water, or I believe there are some shader option to stop this optimization. You can also look in this Reddit thread.

Related

Why is the Motion Blur post processing effect not working in Unity (mac)?

I just can't seem to get motion blur to work in my Unity game. I have added the Post Processing package, created a custom layer for it, added a Post Process Layer to my camera, a Post Process Volume object to my scene and I've linked them together using a dedicated layer. I've also added the effects I want to the Post Processing Profile.
I'm pretty sure I've done this all correctly as I have successfully added many post processing effects, including Bloom, Vignette, Depth of Field and Lens Distortion. These work fine. But when I add Motion Blur, despite turning the Sample Count to maximum, there simply doesn't seem to be a difference.
My scene is very simple at the moment, containing only a sphere with its normals inverted, centred around a user-controlled camera - the standard '360 Degree Photo' setup, basically. There are no lights and I am using a bright white ambient light to illuminate everything equally and optimally. The render pipeline is the default one for 3D games.
I have tried both spinning the camera AND spinning the sphere using the mouse. Neither seems to result in any appreciable blur. Anyone know why this is not working?
Unity Version: 2020.3.3f1 (Personal)
Computer: 2013 iMac

Unity 3D : Simple model make lag on mobile

I have checked Google or the Unity Community but no answers to my specific question.
Description of the problem
I am creating a simple game for Android in Low Poly Style and I want to optimize it for this platform. All of my models are made with Blender and there working fine.
I also created a simple house, made of cube with Blender but when the player is near the house, the game lag ! So I decided to make this house with some cube in Unity 3D, to see if it is lagging:
Blue = the player, Red AND yellow = the direction where the player looks
And surprise, the game lag too! And really. I don't know why. As you can see, this is a very simple house. When the player is front of the door and can see the inside house (yellow arrow), the game lag but when the player rotate the camera to see other part of the environment (red arrow), no lag.
Attempt of resolution
I decreased the number of vertices, faces and edges for all of my Blender models including my house but this house is already lagging.
I decrease the side view of the camera player.
I checked the occlusion culling but there is nothing to do.
I recreated a new Blender file for my house but the problem is always here
I also exported my mesh in .obj/.fbx but the lag is always here
My question
What is wrong with Blender/Unity ? What can I do ?
EDIT
Here is a video of my problem. As you can see, when the player see the house, it is lagging but when the house is not visible in the camera player, pfuit, no lag: Link
Profiler
Here is the profile when I play the game on mobile:
Red part -> Player see the environnement, Yellow part -> Player look at the house. I can see in the overview screen the "Graphics.PresentAndSync" increase of 10-15% when the player sees the house. I will check that in detail.
(Posted on behalf of the OP).
I have made the update of Unity 3D to the last version 5.5.2f1 and that solve my problem. I will check if others solutions can be found to this problem and give you a feedback asap but this update make clearly the difference.
Many thanks to all of you :)
To find the real cause of the lag, you should profile your app on Android. See Android part of Profiler window for more details.

scripted camera movement in cinema 4d to unity3d?

I have a scene in cinema 4d, with a camera that moves through the scene. I was hoping that I could just import the entire cinema4d file into unity3d and I could just magically press play, and the scene would just.. work--camera movement and all.
Well, maybe life is not that easy. Is it even possible to import a camera from cinema into unity?
It would be nice not to have to re-program the camera in unity.
Do I have any options?
The answer is no, there is no "concept of" a camera path you can import to Unity. There is nothing whatsoever like that. (Don't forget, it's a game engine - not an animation or "filmmaking" system really.)
Fortunately this is a relatively common problem.
The solution is just that you put "any old thing" (say, a white cube) there and import that animation. Then in Unity it's trivial to just child the camera to that "marker".
You can google many examples,
http://answers.unity3d.com/answers/20413/view.html
try googling say "import camera move to Unity3d"
BTW I'm sure you're aware of this .. "Unity does not import Point Level Animations (PLA) at the moment. Use Bone-based animations instead." Doco
Another more hackish workaround;
I have once made a scene in Cinema4D which I wanted to use in Unity3d. I ended up employing MOCCA to export the camera's positions and rotation-values on it's keyframes and ended up using coding on the Unity end of things to animate the camera, based on an xml-file.
However, not having used Cinema4D in a bit; I can't remember for sure if MOCCA is still available? If memory serves me right it got replaced with something...

FPS character full body or Hands Unity 3d

I am making an First Person Shooter game using unity 3D, which will be multiplayer in future. So i want to use a full body for my FPS.
I am getting problem in placing camera for my FPS body. When i use only hands it works great.
Can any one tell which approach i should use for this .
1. Should i use two camera one form showing only hands and player weapon and one for showing the rest of view.
2. OR any other way.
I am using unity3d engine for my game development
Just draw the hands because unless your game allows you to look down and see your feet, a whole body approach might be a bit of a waste on computer resources.

AR Overlay Accuracy in Google Project Tango

I am experimenting with overlaying augmented reality objects over a pass-through image from the rear camera in Unity.
Has anyone experimented with overlaying objects with accurate tracking? I've tweaked the movement scale to get somewhat decent results but rotation is still not accurate and drift is a big issue.
I've had good luck with the augmented reality sample that ships with the latest tango. in my experience it does work the way you speculated where if you add items to the unity scene they are synced to motion detected by the device.
I believe the tracking and syncing function have improved since you asked this question originally because I've noticed an improvement since I got my tango devkit a month or so ago. there was an update a week or so later, with an immediate improvement.
I have found that some scenes track better than others, it seems to help for there to be additional scenery for it to track. in my workspace, a fairly cluttered apartment, it tracks well but in the neighboring identical apartment unit which is currently vacant and empty, it does not track as well. that could also be a product of the blinds hanging up in my unit that are not hanging up in the vacant unit, filtering out additional infrared.
I'm experimenting with placing 3D objects over the real time input from the Tango color camera.
One problem here is that the hardware color camera 'point' in a (strange) direction. I wasn't able to get the direction vector from the api until now. Your virtual camera for rendering the scene needs this rotation to render 3D objects properly.
There are augmented reality examples of Tango's Unity plugin:
https://developers.google.com/tango/apis/unity/unity-simple-ar
They solve this problem with a matrix that rotates the 3d camera.
It can be found in the Unity script "TangoARPoseController" (C#) that, when attached to a unity camera, rotates it so that it looks at the scene in the right direction. The matrix is obtained in the method "SetCameraExtrinsics" of that script.
Unfortunately, when I apply the matrix to my unity scene it does not produce a perfect overlay (actually it's quiet bad). But I have other sources of position input which may be the problem here.
However, until now I'm not sure if the matrix used in the examples is good enough for accurate ar overlays. Maybe it is just suitable for demonstration purposes. But it should be a good starting point for further investigation.
Are we talking about displaying the 'webcam' in the background as opposed to a skybox ?
Take a look at my GhostHunter repo. It includes a shader and a script for displaying the rear facing camera 'behind' the gameplay objects (like the skybox). It should be useable with Tango and it is better than the 'display on a mesh' technique I`ve seen others used.
https://github.com/NVentimiglia/Augmented-Reality-Ghost-Hunter