How to make neon light signs in Unity 3D

As part of my game, I was trying to create a whole apartment like environment. I decided to call it a motel instead. So I had to put a sign saying it's a motel(how else would people know right?)

To create the simple glowing text you need text mesh pro. It's available in Asset Store as well as in Unity Package manager.

Inside Unity, go to Window > Package Manager and search for text mesh pro.


Now go to Game Object > 3D Object > Text Mesh Pro Text


Now enter whatever text you want and select distance field shader in text mesh pro inspector tab. See image below.

Once selected you'll be able to see a number of settings under shader and can enable glow from there. I'd recommend playing with numbers here to suit your scene. 

Now that you have your glowing text if you want more you'll notice they seem to be using the same shader which will cause a problem if you want glow signs in different colours. For this, we need to create a duplicate of the font asset we are using and use different font asset for different text signs.


Under the text mesh pro settings you'll find Text Mesh Pro(Script) under that you'll find font asset. 


You can either duplicate a previous font asset or create a new one using a different font. To create a font asset go to Window > Text Mesh Pro > Font Asset Creator.

 
Under Font Asset Creator tab select source font file and generate atlas and don't forget to click on Save Font asset under that.

 

Once the font asset is created you can switch Font Asset in Text Mesh Pro settings and that will use the shader associated with this font asset. 
Just make sure you use a different font asset for every glow text of different shade.




Making Sensor Lights in Unity 3D

Lighting in Unity 3D can some times get tricky. I just spent hours into making sensor lights only to come up with a very obvious solution.
At first, I was using baked maps which were the primary reason for my trouble.

I know it's kind of obvious but I need to state it for anyone who is struggling with the same.

Don't use Baked Lightmaps if you want real-time illumination.

As simple as that. I even considered lighting up the environment by real-time switching different lightmaps. Thanks to the complexity of such task I didn't do it.

Finally, the solution was to use simple point lights. To give the lights better look I used emissive materials.

Here are the results.

    

Here's how I did it.


  • Created an empty Gameobject Light Controller and under that created two small cuboid, LightsOn and LightsOff and a point light called Bulb here.
  • Added a box collider in Light Controller and ticked Is Trigger.
  •  
Here's the script attached to the Light Controller.


public class LightsOn : MonoBehaviour
{
    public GameObject lightOn, lightOff, light;
    private bool lightsOn = false;

    private void OnTriggerEnter(Collider other)
    {
        if(other.tag == "Player" || lightsOn == false)
        {
            lightOn.SetActive(true);
            lightOff.SetActive(false);
            light.SetActive(true);
        }
    }

    private void OnTriggerExit(Collider other)
    {
        if (other.tag == "Player" || lightsOn == true)
        {
                lightOff.SetActive(true);
                lightOn.SetActive(false);
                light.SetActive(false);

        }
    }

}


What this script does is, take checks if the Player enters the trigger collider and enables lightsOn object and bulb(light) and disables lightsOf object and bulb(light) and vice versa.

I also created two emissive materials with the following the property. They're just new material with albedo set to white and HDR Color set to white in lit up light(cuboid object above) and Black in dim light.

 

In case my naming of objects and variables is causing any confusion, there is two sources of light in this, cuboid and a point light. Originally I wanted to just light up the room using cuboid with emissive material but that doesn't work in real time lighting as they need to be baked. So I ended up using a point light to illuminate the room in real time and cuboid with emissive material to make it look better.

Hope this helps anyone looking into sensor lights. In case of any query feel free to comment below.


A sense of accomplishment goes a long way

Recently I came across a video which discussed how one can tackle procrastination by simple means of creating accomplishment. The trick is to "Not Break the Chain".





This works not only for breaking addictions but also habituating good habits. It's not a coincidence that various sources point to the same direction when it comes to learning a new habit.
For instance, The 5 a.m. Club by Robin Sharma has a 66-day challenge to fall into new habits and become more productive. The no-contact rule lasts for 20 days to 90  days depending on how messed up one it. If you're not aware of No-Contact rule, it's a method for regaining you composture after a break up of when things don't work your way in a relationship. It's about going full cold turkey with a person or habit and become a better person through it. When I quit smoking a lot of people on Reddit suggested going 20 days clean and it becomes a little easier afterwards.

Back to the point, I'm using this Don't Break the Chain trick to improve my work habit. I've already wasted a lot of time this year and cannot afford to lose more. I've read numerous books on productivity and bettering my work habits and often find myself circling back to my toxic habits. But I'll not deny how much books have helped me. The transition was slow but it seems to be working. Even though I don't wake up every day a 5 am but I do wake up around 5 am and follow the simple 20-20-20 method mentioned in 5 am Club.
I also practice Deep Work. Any time I sit down to work I make sure I don't get up before at least 3 hours. This has led me to work even 5-6 hours from time to time.

My current Don't Break the Chain rules include work at least 3 hours on the game and write a post (be it whatever) every day.

Things seem to be going upward for now and every time I mark down a tick in my calendar I free myself from any worry for the day.


It's all about creating this small accomplishment that goes a long way I guess.

Eff's Labyrinth Progress Update

Quite a while ago I mentioned about a monologue based game I was working on. Now things got complicated and I kind of overestimated my capabilities. Previously I wanted to make a game that would carry cut scenes with actual videography and vlogs made by me to give an impression of FMV game. That was actually a long shot and to do it all by myself seemed pretty impossible and time-consuming. I managed to waste a lot of time writing script and scenes which I never put to action. Now that I've realised it's better to make many small games than one big game I started working on various projects. Now I've circled back to the same idea but actually made a lot of progress. The map is designed and I'm filling up details in the game.

Now I cannot really share anything that will compromise the whole objective of the game. I'm talking about the level design. I'll take screenshot and post as soon as they are worth showing.
The idea behind the game is to escape the labyrinth. For now, I'm going to call it Eff's Labyrinth unless I come up with a better name.
The main catch in the game would be the narrator with language support unlike you've ever seen. The player will be able to change the narration language anytime they want. There will be three languages. I'm thinking, Hindi, English and Japanese.

There will be minor puzzle games that can unlock doors and get you hints and keys. There will be clues to the map thrown around the map and various witty development scripts here and there.

The game time I'm hoping could go from 1 hour to 3 depending on how complicated things could get. There will be five levels of which I've already designed the layout.


I have played a lot of games so far and to say there's just one game behind the inspiration for making this would be an understatement. I'm inspired by Stanley's Parable, When Darkness Comes, Netflix's Bandersnatch and many platformer games that once in a while strike a creative block in me.

I'm hoping I'll be able to complete the game by the end of this month and hopefully release it by the end of next. A time of one month I'm sparing for testing, creating game data, press kit and releasing on Steam.
I'm following a fairly tight schedule for a few days already and trying my best to not pivot again.



Getting rid of addictions for better performance

Desperate times call for desperate measures.

"I've been worse." 
That's the only line keeping me up. The silver lining. Hope that there's a way out of this block. 
I went full-time game dev over a year ago when I quit my second job. A well-paying job. Why? 
I don't have the correct answer to that. Why am I even writing this on my blog when it's supposed to be part of my diary?
I don't know. To some extent, I feel that since none of my close contacts would be reading any of this I'm free to post anything here without the fear that someone would confront me asking about the meaning of my post.
I'm in a creative block. More like I'm just procrastinating my work doing mildly productive things. Things that won't earn me anything. It's called Shallow Work. 
Thanks to Cal Newport for his book Deep Work that brought me lots of insight. Writing this post is also part of shallow work. I happen to have understood the meaning. So what's stopping me?
Addictions. That's a strong word and I mean it. It's the addictions that keep us from doing the best of the things. To reach the best of ourselves. How?
I think it's because we've been doing certain things, following certain routine for so long and out of instinct that it becomes part of our lives. We don't realise how much a bad habit could be hurting until it's either too late or someone sheds light on it.
I've spent countless hours playing video games and managed to quit that to a satisfying extent in two months. Out of which the first month was full of desperation. How? 
Just went cold turkey. And after a month when I went back to Dota 2, I just quit it after my first game and didn't pick it up for another month. I don't feel any urge to pick that game back. 
At this point, have lots of free time which I directed to reading books. Which seemed like a more productive hobby. But I still lack one thing. 
I haven't paid attention to my work as much as I should have.
Anyway, this log was to trigger some sense in my head. Which I guess it did. Gaming isn't the only addiction I have. Relationship troubles, cigarettes and time wasted on Social Networks play an equally destructive role in killing creativity and motivation. 
I did make some ground rules which I only followed partially. Like not opening social media websites for a certain time, not sharing or engaging in meaningless conversations. But I guess this is the start. 

I'll get there. And then we'll talk about ambitions.

-Abhay Singh





Six books that changed my thought process

A title like 6 books that changed my life would have been a better clickbait(not that I want it to be clickbait) but to be honest I don't yet know if having read all these books will actually bring about a positive change in my life.

Besides all that I read 5 out of these 6 books in about the last 30 days.

Nevertheless, these books did motivate me enough to write a blog post and hopefully continue the habit in the times to come.

If you're just looking for the books and are not interested in my story here's the list,


  1. How to win friends and influence people by Dale Carnegie,
  2. The Subtle Art of Not Giving a F*ck by Mark Manson, 
  3. Fight Club by Chuck Palahniuk, 
  4. 5 a.m. Club by Robin Sharma, 
  5. Deep Work by Cal Newport, 
  6. The Dip by Seth Godin.

I don't know if the order really matters but I have read these books in the order they are mentioned. With an exception of How to win friends and influence people because I often times keep going back to it.
It's by far the most useful and intriguing help book of all the books I've ever read.

Now how did I happen to go about this journey when I was deep under the obligations to earn money. If this little journey doesn't really pay off I have just wasted over two months in the name of finding myself and my true purpose.
Back when this year started I began to work on developing a video game all by my self. I was often stuck with a creative block or just procrastinated. Things were not really working all that great. I have a responsibility. I'm literally running on the loan from my parents which I'm very fortunate of. But at the same time, I have to report my result to my parents who are investing so much into my hobby. I have quit on three jobs since I left college 3 years ago and I don't any source of income as of writing this blog post. It's not that I didn't make any money since I left my job but right now I have depleted all my funds. 
If it weren't the support from my parents I would have been working in some knowledge work job somewhere.
But I'm grateful for all the support I've got. 

All of these books are content rich and covers a lot of part of life. To just grab a book and call it a life changer would undermine others. It is though surprising how many time different self-help content often point to the same things. For example, it's fascinating how the mention of Theodore Roosevelt is common in many of these books. The 90-minute attention grab, the persistence, the indirect Stoic philosophy.

Getting into a habit of reading books also led me to give up an insidious addiction, DOTA 2. Note that I didn't say Gaming. I still enjoy playing video games but DOTA 2 is a whole different level of addiction. I have clocked over 5000 hours in this game and that is nothing compared to the majority of its player base. I'm not saying that DOTA 2 is not a good game to waste your time in, but to look back all the hours spent in this game and to be able to just free a few hours from your daily life by just not playing this game gave me a perspective. A perspective that my time is more valuable at least at this stage of life. When I get an extra one hour added to my every day I can get more things done without having to compromise with the time meant for relaxing. 

I went through a lot of TED Talks, read many articles on Reddit while also reading the books mentioned. And to be able to think more clearly is my reward for all this effort, at least for now. 








CODA Blogger template

I have decided to make some changes to this blog and the pages that run around here. For that reason, I'm moving the content of the Theme Download Page to a blog post.

I have made significant changes to the CODA theme which are not yet reflected in the version available for download below.

I'll soon make it available. Not too soon though. Until then feel free use, modify or distribute the blogger template below.




Follow the instructions for easy usage, click here



CODA Basic 2.1 is free to use the Blogger template. You are free to remove the footer link as well. Will be considered a generosity if you let the footer link remain.

Download











Change Log:

-Added Footer.
-Font changes.
-Removed header navbar background.
- Added Background Color.

- Added Card style for posts.

- Sidebar restructured.

- Non-floating top navigation bar.


Previous Versions:
  • CODA Basic 2.1                              Download
  • CODA Basic 2.0                              Download
  • CODA Basic 1.1                              Download
  • CODA Basic 1.0                              Download
  • CODA Blank                                   Download

Galaxy Fold is here Full Phone Specifications and dimensions

Samsung recently unveiled their new Samsung Galaxy Fold and it's as pretty and innovative as it's price.

The 1,980$ phone will be made available for purchase in April of 2019.



The phone will be featuring 2 AMOLED Display where one of which can be folded is called Dynamic AMOLED Capacitative display.

Samsung Galaxy Fold with the Cover display of 4.6 inch
Samsung Galaxy Fold with Dynamic 7.3 inch screen



Full phone specifications are below.

Dimensions: 17 mm thickness

Size: 7.3 inches, 154.5 cm2

Weight

Display & Resolution: Dynamic AMOLED capacitive touchscreen, 16M colours 1536 x 2152 pixels, 16:10 ratio (~414 ppi density) and Cover display: 4.6 inches HD+ Super AMOLED (21:9)

Chipset: Qualcomm SDM855 Snapdragon 855 (7 nm)

CPU:  Octa-core (1x2.84 GHz Kryo 485 & 3x2.42 GHz Kryo 485 & 4x1.8 GHz Kryo 485)
GPU: Adreno 640
Memory: Internal 512 GB, 12 GB RAM (No external memory card support)

CAMERA: Triple Camera Setup 12 MP, f/1.5-2.4, 26mm (wide), 1/2.55", 1.4µm, Dual Pixel PDAF, OIS
12 MP, f/2.4, 52mm (telephoto), 1/3.6", 1.0µm, AF, OIS, 2x optical zoom
16 MP, f/2.2, 12mm (ultrawide)

Video Recording: [email protected]/60fps
Front Camera: Dual 10 MP, f/2.2, PDAF
8 MP, f/1.9, depth sensor

Cover camera: 10 MP, f/2.2
Features HDR
Video [email protected]

No Headphone Jack - 32-bit/384kHz audio
- Active noise cancellation with dedicated mic
- Dolby Atmos/AKG sound

WLAN: Wi-Fi 802.11 a/b/g/n/ac, dual-band, Wi-Fi Direct, hotspot
Bluetooth: 5.0, A2DP, LE, aptX HD

GPS: Yes, with A-GPS, GLONASS, GALILEO, BDS

NFC: Yes

Radio: No

USB: 3.1, Type-C 1.0 reversible connector

Sensors: Fingerprint (side-mounted), accelerometer, gyro, proximity, compass - ANT+
- Bixby natural language commands and dictation
- Samsung DeX (desktop experience support)

Battery: Non-removable Li-Po 4380 mAh battery
Charging Fast battery charging 18W

Colours available: Space Silver, Cosmos Black, Martian Green, Astro Blue





Speech to Text Applications and how you can make one

Speech to text is one of the best inventions of modern day technology. There are a number of times we want to take notes and doing just a voice note by recording the sound doesn't make it convenient to identify the content with just a look. 
Text to speech to the rescue. Now, you can not only record your voice but actually just convert your voice to text and be saved to your device or cloud storage for easier access. 



There are already many applications out there that do the said job and of course, the best ones are made by notable companies like Google, Microsoft, IBM, Amazon etc.

But then what about all those other Speech to Text applications out there? How are they different?
To put it in simpler words, they're not.
You could get a somewhat better result in one of the application compared to the other and that'll be only because it suits your voice better. And partially because some applications might be using machine learning to improve their word prediction.
But then so are Google and other major companies doing. You cannot possibly get a better result because the other applications are also using the same API in their back-end.

Google, Amazon, IBM and many others provide Text to speech for a very nominal fee.
In case you're developing a text to speech program you might like to look into Watson Speech to Text by IBM, Amazon Transcribe, Cloud Speech-to-Text by Google and Microsoft's Azure Speech Transcription.
Now all these Speech to Text are great and charge a minor fee. If you're looking a for a way to quickly create one Speech to Text application there are many great assets in the Unity Asset Store to give you head start.



Remove all Liked Videos on YouTube

Do you find a need to remove all the video you've ever liked?
 Well, you can do it but let me first be clear here that there is no coming back.
Once you remove all the videos from your Liked Playlist or whatever you call it, it's gone. 



Now if that is clear to you, you may proceed to login to your YouTube account and click on Liked Videos link to the left of your screen.


Step 1. Then click on the Edit button to edit your Liked videos playlist.


From here on you can either manually remove any video from this playlist.
Or if you want to just remove all of these videos follow the following steps.

Step 2. Press F12 on your keyboard and go to the console tab.
Step 3. Copy and paste the following block of code in the console.

var items = $('body').getElementsByClassName("pl-video-edit-remove-liked-video");
for(var i = 0; i < items.length; i++){
items[i].click();
}

Hit enter and the page will refresh. Now if you'll check your liked videos playlist it will be empty.

Again, this is a no rollback action, please proceed with caution and keep in mind once the playlist is empty there is no way to bring back the liked list other than manually liking every video you ever liked before.