Unity 3D - Particles suddenly becoming transparent - unity3d

I'm developing a 3D game using Unity3D 4.5.2 (free version, not Pro).
I have used a default Particle System to make a Waterfall. I have placed the Waterfall particle system in the scene in such a way that there is a 2D Sprite of a Mountain behind it.
This is to give an impression to the user that the Waterfall is 'falling' out from the Mountain.
However, after 10 seconds on simulating this waterfall particle system, the particles suddenly become transparent, enabling the user to view the Mountain behind it...have provided screenshots below:
So I would really appreciate if anyone could help me out here, as I've looked at a lot of solutions & fiddled around with all the parameters of the particle system in Inspector but to no avail...

To give you the correct answer for this question, I need see your particle system parameters. But I think something is wrong with "Max Particles" amount or "Color over lifetime". Also check "Start Lifetime", maybe it is too much.

Related

Light Baking Issue

Before I have real-time lighting because of the performance issue, I decided to do light baking for my 3d game.
So I have mark 3d environment as static because it remains on screen always without movement.
Also changed direction light mode to Mixed because I have few moving game objects too.
But after the baking process gets completed, I got this kind of output:
In above, you can see in the above image what happened with my environment after baking and I have also included light settings if you need it.
You have to enable lightmap UVs in your 3d imported model file.
I got this reply from one Unity forum member so exact wording, I am posting here:

How can I use baked lighting on sprites? / How to light up a large area in 2D?

I'm having trouble figuring out how to light up large area(s) of sprites in Unity 2D. My previous knowledge on Unity's lighting is zero.
I first tried using a large amount of point lights and using the "Sprites/Diffuse" material, but about only five would actually render at a time, so I guess there's a limit on that.
Then I tried putting in an area light. That didn't do anything, so that's when I started doing research about baked lighting on sprites (and baked lighting in general). I found stuff like this but I couldn't get it to work either because it's outdated or because I don't know what I'm doing. Other answers I've come across seem to assume that the reader knows anything about lighting in Unity in the first place which, to be honest, I don't. Unity's documentation website had some information on it, but no tutorials that go into how to set up baked lighting.
I've tried a bunch of different combinations of materials (like using the "Standard" shader for the sprites instead of "Sprites/Diffuse", emission, ect.) and I enabled "Baked Global Illumination" in Lighting>Settings.
If baked lighting isn't possible on sprites (or isn't worth the trouble), what are the alternatives?
Edit: I made sure not to have the lights pointing the wrong direction, and I do realise that Unity2D is just like painting onto a piece of paper in Unity3D. I was able to get point lights to work, but only a few at a time. I don't need to do the entire screen at once, I need to do a large specific area at once.
some tips...
working with sprites your in 2d... when you add a light, switch to 3d mode, and rotate to make sure your light is pointed at your objects, and oriented so as not to be on the same plane, or level with them, as this will cast all the light behind them.
if your trying to light up everything on the screen(in camera) attach an area light to the camera at the cameras position, point it where the camera points, and then in the inspector on the right, you can change its variables. intensity, range, width, height etc.
Emissive Texture:
https://www.youtube.com/watch?v=oa6kW5HhRd4
For some reason, I never even thought about going into the asset store. I found this for free, and it looks like it will work: Light2D.

ocean simulation in Blender vs. Unity3D

I want to make an ocean simulation that is physically accurate.
The height and speed of the waves should be controlled by the keyboard at runtime.
In the ocean, there needs to be a boat that either moves along a path or is controlled by the keyboard.
So far I have made this simulation in Blender:
https://youtu.be/LJ6ncxv-k7w
The problems are as follows:
1. There is no collision with the ocean
2. There are no controllers for the boat's movement
3. I am able to control the waves, but not at runtime
I thought about switching to Unity because the user interface is obviously better, as it is a game engine. I do not want to use Blender's game engine as its future is uncertain at this point.
After reviewing the various Unity water simulation plugins, I came to these conclusions:
1. the buoyancy is great in most of them, such as in Aquas and SUIMONO
2. None of them seems to offer a physically realistic collision with the boat.
3. they do offer wave height control, but not much else as far as wave properties go.
4. Some of the plugins can be combined to get closer to satisfactory results.
My question is:
Should I go with Unity completely?
It seems perfect for my user control needs, but the plugins are lacking in the collision aspect. I came across this video, but no tutorial: https://www.youtube.com/watch?v=T0D_vrYm4FQ
Even if there was one, how could I combine it with the plugins?
Is there a way to build the scene in Blender and then import it into Unity?
Would I be able to control the waves and boat after importing them?
Thank you very much for your time and knowledge.
if you really means an ocean, i suggest you to check out NVIDIA WaveWorks. it's a C library and doesn't have an officially integration with Unity3D, but since you go this far for it, i guess maybe you'll have enough courage to trying make it into a useable plugin yourself.

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.

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