Maya Mel Script: vrnNormalifique

Tutorial / 20 May 2020

The short version and an important notice!

This script builds on the idea of having weighted vertex normals and allows the user to "snap" normals to faces to create better looking smoothing for low poly hard surface objects. It does not lock unnecessary vertex normals and does not break hard edges which differentiates it from all other similar scripts out there!
I've made this script some time ago while I still had my Maya license. Due to various reasons (detailed here and here), I have ditched Maya for Blender. At the time of this blog post I do not own a Maya license and since it's illegal to use the Student Version for any commercial work like putting scripts on Gumroad or recording free tutorials on Youtube I cannot take screenshots or do a tutorial on how to use my script. I hope this will change at some point as Maya Indie becomes available worldwide and I buy a subscription.


Special Thanks!

This is a result of more than 5 years of going through different versions and seeing this implemented in different ways in Maya.
Special thanks to AMC Romania, Infinity Ward and more recently Arkane Studios for the projects that required face snapped normals and the inspiration for me to think this script through!


A bit of technical background

(Feel free to skip this section if you're familiar to how weighted normals work)

A couple of years ago Autodesk introduced weighted vertex normals to Maya, paving the way to better vertex normal shading. 

For each vertex in a mesh, the new algorithm would calculate the normal as a weighted average of the surrounding faces' normals. The weighting is done by surface area so the resulting normal will align more with the larger faces.

The advantages are significant for low poly meshes since it reduces the amount of gradients in the shading. These lesser gradients also get reflected in less gradients in baked normal maps which make these normal maps easier to compress and reduce those bad shading artifacts that are caused by the compression algorithm.

The script will align (and lock) the vertex normals of the current selection to the normals of the selected faces. The effect is similar to Maya's weighted normals setting but the resulting normals will be "snapped" rather than just weighted.

This allows for smoother shading on low poly hard surface materials that use bevels. This will also result in cleaner normal map bakes with less gradients which in turn will cause less normal map compression artifacts.


You can download my script here:

https://gum.co/vrnNormalifique

Installation:

1. Copy the files into the script directory, usually:

My Documents/maya/<version>/scripts

2. Restart Maya or execute "rehash" in the Script Editor.


Usage:

Call the function with either commands:

vrnNormalifique(0);

-will set the perimeter normals so that they snap to the current

selected faces

vrnNormalifique(1);

-will set all the normals in the current selection to the average normal

of the entire selection

Bonus commands:

vrnSoftEdge;

-softens edges while keeping custom normals

vrnCopyNormal;

-copies the normal of the current selection

vrnPasteNormal;

-pastes the normal to the current selection


Requirements:

Maya 2017 or newer (might work in previous versions although not tested)


Version History:

v 0.1 alpha

-initial version

-limitation: internal hard edges relative to initial selection are

not preserved

v 0.2 beta

-added vrnSoftEdge procedure which soften edges while preserving custom normals

-rewrote from scratch with new logic based on vrnSoftEdge

v 1

-initial public release

-fixed some bugs

v 1.1

-added bonus vrnCopyNormal and vrnPasteNormal

Good bye Maya! A blog post about Autodesk's licensing absurdities! (continued)

Article / 19 May 2020

This is a farewell to the program that was the base of my work for the last 15 years!

The main reason why I chose to quit using Maya is the changes to Autodesk's licensing policies. I wrote about this about 3 months ago but I was pretty much set I would accept the compromise of getting Maya LT for a year until the whole Indie thing gets cleared up.

But then the virus hit and my prospects for work as a freelance took a nose-dive. It wasn't that I couldn't get work, it's that despite everyone looking for freelancers, less were willing to pay my already low rate. But I digress, maybe I'll write about this in another blog post. I decided to cut my costs, bite the bullet and try using Blender... and I love it. After about two weeks I was working at the same speed as I did in Maya with minimal addons. The short take is modeling is better than Maya, UVs are a bit lacking but with 2-3 addons you can get close enough for light work such as props. For more complex stuff, I'll probably buy RizomUV the first time I need it professionally. Rendering, especially EEVEE real-time is years ahead of Maya. Animation? I'm not an animator so I can't tell you.

My only dilemma were my courses. I used to teach modeling for games in Maya at three institutions: two private and one state owned. They're of course on hold for now due to the pandemic but I still have to think about the future and this is very relevant to the subject of this post.
Since Autodesk's Student license was very permissive, I could teach Maya with the ease of mind knowing I could instruct my students to get Student licenses good for 3 years, enough for them to continue and perfect their craft after finishing the course even if they couldn't get a job right away. I do not condone piracy, so I saw the ease of getting a Student license as a good move by Autodesk to increase the base for potential customers without forcing them into piracy. Kind of Microsoft accepting grey-market Windows 10 licenses for $10.

The main reason there's a demand for Maya is that it's one of the two big programs used in 3d modeling for games, the other one being 3ds Max. For the Politehnica University, teaching Blender is something they would prefer since academia loves Open Source! For the private institutions, my courses are more driven by market forces and since no big studio in Romania uses Blender as their main tool, this puts me at a disadvantage. I could continue to teach Maya though, right? Technically yes but then Autodesk decided to change its Student license by reducing the license period to 1 year and requiring official documentation to have the students prove they are enrolled in an accredited institution. See the problem? (More on this here: https://youtu.be/I129cROtI5w)


Let me put it into fewer words:


If you want to teach Maya you either have to buy a license or work for an accredited institution that has Educational Licenses which are free but not available to everyone.  You also cannot use a Student or Educational version to post tutorials on Youtube (confirmed by Autodesk Support), that is considered commercial use. So Autodesk is putting small teachers like me in the position of buying a license to basically bring more customers to Autodesk. This is easy to justify if you use Maya for work and absorb the costs there but since Maya's Indie license is still a discriminatory piece of garbage, I am basically forced to pay 1800E/year for the "privilege" of teaching students a software that they or their employers will pay the same for a year's subscription if I only want to teach a few courses a year. So, I can either be a full time teacher to justify the costs or a small time teacher so I can also work and justify the cost. Either way, this looks so bad, it kind of makes multi-level marketers look like saints! Yes, mine is an edge case since I'm not using Maya for commercial work anymore but the more than 50 people I teach every year are potential customers for Autodesk so I find it weird that I cannot use a free educational license for teaching.

So my dilemma is not so much a dilemma for me anymore, I'm ditching Maya altogether! I'm not going to teach it anymore and by what I'm hearing from friends and colleagues in Romanian studios, Blender is getting more and more accepted which should drive demand for Blender teaching locally in the future.

So after these months of the ups and downs of switching software and writing blog posts here's where myself and Autodesk are:


Myself:
+ I'm reducing my fixed costs by 1800E/year, the cost of a Maya subscription.
+ I'm learning a new piece of software and diversifying my portfolio. I can now say that I've modeled in Max, Maya and Blender and I know all of them well enough to work with a variety of clients and meet their needs.
- I have to postpone teaching for a while until I adapt my course to Blender.

Autodesk:
- Lost a paying customer.
- Probably lost about 50 potential new customers per year.

As a conclusion, why bother writing this? Because I like Maya and in a market economy you have to speak your mind to be part of the demand. I have expressed all my grievances to Autodesk Support and while the people there were very nice and understanding, I felt that my complaints fell on deaf ears! So I'm making them public on hope this will inspire other people or make it clearer for Autodesk that what they're doing is not good for their customers which means it won't be good for their stakeholders either in the future!

About Autodesk Maya's licensing model (Complete, LT, Indie)

Article / 11 February 2020

I love Maya, I've been using it for about 15 years now. Before that I was a Max user but as soon as I saw Maya's marking menus and the UV editor, I switched in a heart beat.

I worked on multiple AAA titles in Maya, I wrote a bunch of Mel scripts, I taught Maya to students for the last 6 years. I think Maya is the best animation program out there and definitely the most well taught out modeling program when it comes to user interaction. You can basically do everything is just a few marking menus. Nothing comes close and if anyone tells you differently it's because they never used marking menus to their full potential!

About two years ago I went freelance so I had to start purchasing my own subscription. I knew it would be expensive but I felt it was the right thing to do and support the developer. You might find this obvious but from where I'm from, paying for software is not that common, people prefer... alternative methods of obtaining it. Lucky for me, the first version I payed for was 2017 which was chock full of new modelling features with Update 4 bringing a whole to UVing as well. But then 2018, 2019 and now 2020 came out. I'm not saying there aren't any new modelling features but they seem to be too little to justify the yearly price. There were a bunch of animation and under-the-hood improvements that I'm sure animation artists love and that will have a positive impact on the future of Maya's modeling but for the most part, 2017 Update 5 is the last great modeling update. 

While I was getting disappointed with this slow progress, last year I got a call from Autodesk Support and had a chance to talk for quite a bit about how I use Maya and what I think the direction of the program should be. It felt like a genuine conversation and I'm really glad they gave me a chance to speak up. One of my issues was that Maya is a huge program with a ton of features but that there are individual artists and small studios who only use it for certain things and for which the subscription fee is too much. I also complained about how useless Maya LT is without Python scripting. I was told it's an issue a lot of users have and that Autodesk is working on it. Why would Autodesk call me? Well, like I said, here in Romania, paying 2000E/year for a license is almost unheard of so they didn't have many clients to choose from I guess!

Not long after this call I see an announcement for Maya Indie and I'm getting excited!

https://area.autodesk.com/maya-indie/

But then I click on the link and I see that Maya Indie is a pilot program only available in the UK, US, Canada, Australia and New Zealand. This left me disappointed, confused and even a bit offended. I understand that they need to test how many people would switch to Indie and how this would impact their income but I don't understand why exclude areas like Eastern Europe where piracy is rampant and such a drastic reduction in price would get people to buy the license which would otherwise pirate it. I mean, yeah, they would loose the income from people like me, but I'm sure they would more than make up for it with new subscriptions. The offended part comes from the fact that last year, people in the "western" world got a nice price cut for Maya when people from less developed countries got nothing! 2000E or piracy! It's offensive because if I dare to ask the same per hour rate as somebody from the US or UK, I get served the same "but you live in Romania, life's cheaper there, your rate is too high!" So while these "poor souls" who live in a developed country got to keep more of their income, I didn't just because Autodesk is afraid selling cheaper software wouldn't make them more money.

I of course asked Autodesk about this in December last year and they told me they do not have any news about the Maya Indie program. My current subscription expires at the end of February and I'm left with quite a painful dilemma.  Should I extend my subscription for another year and risk overpaying, should I switch to a monthly subscription and pay them more money while expecting Maya Indie to come out?  Thankfully I got a response from Autodesk Support in January stating Maya Indie won't be available world-wide for at least another year! So now I'm forced to either pay 10x more than some of my anglo-saxon colleagues who probably earn at least 4x more than me in one year or accept the limitations of LT.

I don't feel like this type of discriminatory practices should be left without challenge so personally I'm doing the following:
1. I am renouncing my full Maya subscription and promise I will never reactivate it unless it's in the form of Maya Indie and at a decent price.
2. I will purchase a Maya LT for the next year in hopes of being able to live with the crippling omission of Python and plugins.
3. I started a thread on the Maya LT Ideas forum proposing that Autodesk just ditch LT altogether and make Maya Indie available world wide. You can read more here and vote if you think it's something wort pursuing:
https://forums.autodesk.com/t5/maya-lt-ideas/ditch-maya-lt-and-just-make-maya-indie-available-worldwide/idi-p/9307072?fbclid=IwAR2qZp3GuncqkX6g5B_ioqMQchK5wSTfMBWBTs5hFAi_Ay52-8lXB0rWsK8
4. Next year, when the LT license expires, I will only continue to pay Autodesk for Maya Indie and nothing else. If that is not available until then I will just give up LT as well and just switch to Blender. I'm already incorporating it into my pipeline for non-Maya tasks anyway.

Disclaimer:
The image attached to this post is modified by me by adding the green text at the top. Of course this is not Autodesk's opinion on the matter, it is solely mine. I don't think Autodesk's intention is to discriminate but I hope everyone understands how this looks like it to me or other customers in the areas where Indie is not available!

Late edit:
It seems other people have the same complaint as me and are making their voices heard.
Also please consider voting these Ideas:
https://forums.autodesk.com/t5/maya-ideas/make-indie-available-to-more-regions/idi-p/8941295
https://forums.autodesk.com/t5/maya-ideas/request-for-autodesk-to-reconsider-licensing-towards-small/idi-p/8812650


2019 Hum3d Car Render Competition WIP Part 3

General / 08 October 2019

A quick post with the new exo-cage. I think this will be the final design.

I've also changed the engine skid-plate with something more realistic looking made from flat sheet-metal. The front part of the cage has also been simplified to allow the hood to open.

I've added two spare wheels on the roof, I feel like the trunk needed to be left alone, including the ability to be opened despite the cage.

Some of you might be wondering why an exo-cage on a desert truck, those are usually reserved for rock crawlers. Besides looking mighty cool on the Rolls, the cage does a lot to add versatility to the vehicle. So if the sheikh decides to go rock crawling or survive a zombie apocalypse, the car is a few simple changes away from these scenarios. It's not all about the bling!
PS: The chassis is a Toyota truck and the engine is an american V8, all very reliable and easy to fix.

  


  

2019 Hum3d Car Render Competition WIP Part 2

General / 27 September 2019

Just a quick update before the weekend. I've replaced the wheels with some real wheels and tires: Toyota TRD bead-lock rims with Desert Master tires. Texturing for these is just a quick pass with Painter presets, nothing final. I'll add the sidewall graphics and do another texturing pass then. The tire texture needs a lot more love before it starts looking decent.


I'm also playing around with the exo-cage. Below is take two, most likely not final as well. That side-step is something for the sheikh to get into the car, it's retractable to not impede ground clearance while jumping dunes!

I've removed the external fuel tanks and I'm still thinking whether to keep the trunk lid or have the spare visible like in the image below.


2019 Hum3d Car Render Competition WIP Part 1

Work In Progress / 24 September 2019

For this year's Hum3d competition, I'm building this mad Rolls Royce offroader, a proper one not that Cullinan SUV.

I'm using a Rolls Royce Ghost model I built in 2009 before the car was launched. I modeled it using only the spy shots of the camouflaged prototypes available at the time. This was to be published in a magazine but it got plugged the last minute so I was left with a pretty useless model since the car was launched my model is not 100% identical to the production model. I'm also using some offroad wheels and other mechanical parts I've built over the years for a number of personal projects that never got completed. I'm actually happy that I can put these together and use them productively.

This is what I have so far:

Next up will be reworking the exo-cage with better radius curves and more thought put into the way it fits the chassis. The external fuel tanks might go so will the open trunk. Initially I was going to enter this in last year's competition with the post-apocalyptic theme so I wanted to give it a busy silhouette. For this year's theme I'm going more of the crazy sheikh kinda vibe so a decent paint job and no long-range accessories would make more sense.  Here's something similar from the land of outlandish cars: The UAE: https://www.legendaryfinds.com/rainbow-sheikhs-car-collection-might-craziest-car-collection-world/

And yes, this has already been done to some extent:

For the final render I'm thinking jumping over a sand dune with plenty of dust. These are my inspirations:



  

Car Configurator UE4 Prototype

Work In Progress / 12 October 2018



This idea has been going around in my head for a long time so I decided to implement it and properly learn UE4 in the process.

The idea is to make a car configurator with Unreal Engine 4 modding support that would allow easy integration of new models and parts. It's inspired by the old Street Legal Racing game but I'm not planning of going that much into detail with my app. I'm not sure how much into detail I'd go with this to be honest, it all depends on the interest it generates.

So far I've implemented the suspension logic and the wheel size logic. The suspension is dynamic and takes into consideration the ride height as well as wheel sizes to keep a realistic and consistent ride height. 

Next up would be to implement the part customizing logic after which I plan to go public with a release to help test the logic.

When the logic part is ok I will add as much content as I currently have. I have all the necessary models to allow the user to configure any first Dacia Logan sedan with a bunch of tuning parts and wheels.





Dealing with Sketchfab's normal map compression

Tutorial / 06 August 2018

If you've ever tried loading a shiny normal mapped low poly object to Sketchfab, you might have noticed the horrendous compression artifacts you get not in the editor but in the viewer. Worst thing about it is that the editor uses uncompressed textures which are also visible in the viewer after saving and exiting. That's because the compression is not done locally on the user's machine but on Sketchfab's servers. It takes a couple of hours before the textures get compressed, at which point the model transforms and looks pretty bad (1). This means most users don't bother to recheck the textures after compression and are not aware of the quality degradation that occurs.

Here's an example:



To reduce this, you could try forcing the viewer to download the uncompressed textures by appending this to your link (2):

?image_compression=0

So the link for the Chevy Pickup will look like this:

https://sketchfab.com/models/1bcf5ad3f59645ca9693cd76d6c56d0c?image_compression=0

As you can see below, the textures look a lot better. The great news is that you can also append this to the short links and use them when embedding in a Artstation page or blog post!



There's another layer of confusion if you're working with 16 bit images hoping to get around the compression somehow. It's the fact that Sketchfab does not dither the 16 bit image when taking it down to 8 bit before compression. At the time of this article, Sketchfab does not support 16bit normal maps, although they are working on it. So importing 16bit pngs are a no go, there's no quality benefit from uploading these.

Last layer of confusion is for users of Substance Painter. If you work in 16bit and you use Painter to upload directly to Sketchfab, you might have noticed that when exporting with the Sketchfab preset, you get locked out of controlling the texture file format and bit depth:

Although the format reads JPEG, the normal maps are saved in PNG format without compression to avoid dual compression when uploading to Sketchfab. The dithering issue is still there though, Substance Painter does not dither the file when reducing the bitdepth so you get banding artifacts. Here's a comparison between the PNG exported from Painter with no dither and one exported in 16bit and then manually reduced to 8bit with dithering in Photoshop by using Image->Mode->8 Bits/Channel.


So there are two problems here: Sketchfab's normal map compression and the 16bit to 8bit compression issues. Depending on how you work, I would suggest the following depending on your initial normal map bakes:

8 Bit / Channel bakes:

I would advise against working with 8bit bakes but if by any chance you HAVE too or you already have a bunch of assets that were created from start to finish in 8 bit and don't want to rebake, using the ?image_compression=0 trick above will help improve final quality.

16 Bit / Channel bakes:

I advise using 16 bit normal maps for as much of the pipeline as possible and only reduce the textures to 8 bit / channel when the final normal map is completed. This ensures you get the maximum amount of information in your normal maps through-out the texturing process. 


a. Bake the normal map in 16 bit.

I use Marmoset Toolbag 3 for my bakes but most bakers such as Substance Painter and Designer as well as xNormal support 16 bit normal map baking.


b. Texture in 16 bit.

If you're using Painter make sure you're still working in 16 bit. It should be on by default. This will make the generators and filters that use the normal map take advantage of the increased bit depth to create smooth effects.

PS: If you're using Photoshop or any other texturing tool, also make sure to be working with 16 bit normal maps through-out the texturing process.

c. Export the final normal map in a format that supports 16bit.

Here's an example for Substance Painter:


d. Open the normal map in Photoshop and reduce the bit depth. Dithering will be applied automatically:


If you want to get the maximum quality from Sketchfab, you can export using the Substance Painter plugin but then in the Sketchfab editor replace your normal maps with the ones you saved at c. and d. above. Idea taken from this thread (3).

Finally, you want to use the ?image_compression=0 links to share your work!


References and further reading:

(1) https://help.sketchfab.com/hc/en-us/articles/202600873-Materials-and-Textures#textures-processing

(2) https://forum.sketchfab.com/t/image-compression-issues/2839/59

(3) https://forum.sketchfab.com/t/substance-painter-to-sketchfab-a-help-guide-to-normal-maps-and-triangulation/12074/2

Sketchfab model updates: clearcoat and refraction.

General / 03 August 2018

Lately Sketchfab introduced a bunch of cool features like refraction and more recently a clear coat option. Since most of my stuff there benefits from it, I decided to give them all a nice fresh coat of paint.

Here are some of the highlights:

First off, my Dacia got a bit of an upgrade. The geometry got better bevels for better reflections and various tweaks. Texture and shader-wise, it has now got refraction and clear coat as well as an actual license plate.

My other Dacia has been brought up to date with refraction and clearcoat as well:

Now let's add some color into this post: the Chevelle, the Pickup got refraction and clearcoat as well. For these I've used a bit of a trick: the clearcoat uses a custom normal map, which is the clean bake from the high res model as well as a mask to separate the clearcoated areas from the dirt and rust. I did this to simplify the transitional areas between the clearcoated and non-clearcoated areas.


Logo update and portfolio improvements

News / 04 April 2018

Last time I posted about creating a new logo and after some online discussions with some of my more graphic design savvy friends, I ended up doing some minor alterations. I added the small triangle to simplify the silhouette while helping with identifying the initials contained within the logo. That green is Maya's UV icon green btw!


Over the last couple of weeks I've also been working to freshen up the portfolio with some more up-to date renders and more consistent thumbnails. Each project now has icons in the thumbnail to help identify the primary software used.

Most important updates are to the IAR-80 inspired "Planerod" which got upgraded big time. There are UV improvements, new bakes, new lines and rivets as well as more surface details in the form of the usual panel waviness you see on hand built airplanes. Also there's a new Romanian Royal Air Force inspired paint job with one totally-non-period correct pinup and some other easter eggs.  It's a celebration of the centenary of the Great Union between Transylvania and Romania which took place on the 1st of December 1918.

This one also got the same salt flat texture I used in my Scott Robertson truck. Since that's a substance file, I only needed to plug in a new height map for the tire tracks and voila!

Also updated is the MV Agusta Brutale Cafe Racer which got some more subtle textures and improved renders with refraction and GI.

Some of my old works got improved renders as well. You can check them out at the links below: