- Home /
Buoy lights at sea
Hello everyone, I need to simulate buoy lights at sea, at night. Spot lights with halo doesn't do the trick because navigation lights don't illuminate other things but must be seen from a long distance. I have tried simple cubes with self-illuminating shader and enable on/off the renderer to simulate the light blinking characteristics but ... it needs to be a big cube to be seen from a distance and ... it becomes too big when getting close.
Do you have an idea on how this could be simulated the best realistic way? The first-person is on a ship that moves close and far away from the lights. Some lights must have a range up to a couple of nautical miles (about 4 km).
Cheers,
Michel
Answer by whydoidoit · Jan 27, 2013 at 10:50 AM
I think you self illuminating material was the right idea. How about you add a script which makes the size of the glowing thing reduce as you approach it.
var size = Mathf.Lerp(minSize, maxSize, (Vector3.Distance(light.transform.position, player.transform.position)-50)/200);
light.transform.localScale = new Vector3(size,size,size);
This would give you a light that was the same size for the last 50 metres and was at its biggest size above 250 metres.
Or you could make a big sphere with a transparent self illu$$anonymous$$ated material and the same color, then flash that but make the alpha decrease as you approach.
Hum, that's an interesting idea! Thanks mate. I think it will work best if I use the square of the distance; that will do a fading with distance. I will have to use a mesh, anyway, because some of those lights are sector lights, showing white when in the correct sector and red or green when outside it.
Cheers,
$$anonymous$$ichel
Ah well, if you want to have a look, here is how I have come so far: http://home.online.no/~michel/Seagull/ECDIS.html Yes, it is a Flash compilation. With time, it will become online CBT for seafarers with subjects like, the IALA buoyage system, the COLREG regulation, EDCIS simulation, and perhaps, mooring and ship to ship operations. Any comment would be much appreciated! ;-)
Your answer
Follow this Question
Related Questions
Position-dependent lens flare scale? 3 Answers
Point lights disabled after 10 000 units 1 Answer
Day Night Cycle sun fade 1 Answer