How to parent Qt widget with maya – Windows

Hello All,

This a very small issue mostly windows people come across while using Qt.

Basically If you have created a widget in designer(assuming person knows how to use Qt Designer),

converted with command line or from inside of maya to python (ui to py) – output_2.py

to inherit the output_2.py class in another class.

Please check the below approach and this should come in handy.

Non-Parented version of ui

import sys
sys.path.append("D:\\All_Projs\\Qt_Designer_Proj\\ui_to_maya_testing")
from output_2 import Ui_Form
from PySide2 import QtWidgets
from PySide2 import QtGui

class Trial(QtWidgets.QWidget):
    def __init__(self):
        super(Trial, self).__init__()
        self.ui = Ui_Form()
        self.ui.setupUi(self)

window = Trial()
window.show()
2 tabs for non parented ui (in the bottom)

Parented version of ui

from PySide2 import QtCore, QtGui, QtWidgets
import sys
sys.path.append("D:\\All_Projs\\Qt_Designer_Proj\\ui_to_maya_testing\\")
from output_2 import Ui_Form
import maya.OpenMayaUI as omui
from shiboken2 import wrapInstance


ptr = omui.MQtUtil.mainWindow()
ptr_instance = wrapInstance(long(ptr), QtWidgets.QWidget)


class Widget(QtWidgets.QWidget):
    def __init__(self, parent=None):
        super(Widget, self).__init__(parent)
        
        self.setParent(ptr_instance)
        self.setWindowFlags(QtCore.Qt.Window)
        
        self.ui = Ui_Form()
        self.ui.setupUi(self)
        
        

def main():
    app = Widget()
    app.show()

main()
no tabs for non parented ui (in the bottom)

This is one of the approach that i am aware of, i had read it on a site, but I lost the site. If you have any other approach do let me know.

Have a Qt day.

Maya: userSetup – execute commands whenever Maya startsup

Hello All,

I was setting up userSetup the mel edition in my company and I instantly realized it was not a trivial task. And the below video covers most of the heavy duty, please check it out.

Since the world has moved on to Python, we should have an example of python as well. Maya docs was kind enough for not giving any info on either of them(Well you’ll get my rant once you watch the above video lol).

Maya userSetup.mel ticket

to check the path from userSetup.mel is being executed

whatIs userSetup.mel
// Result: Script found in: C:/Users/ADMIN/OneDrive/Documents/maya/2020/scripts/userSetup.mel // 

whatIs command wont help in finding userSetup.py

#command can help you find yours scripts directory
print cmds.internalVar(userAppDir=True)

#save below script in userSetup.py to the path that you get from above command.
import maya.cmds as cmds
def dosomething():
    cmds.grid(spacing=100)
cmds.evalDeferred('dosomething()')
print("this is a test")

Maya userSetup.py – where to place the file?

In windows 10 – “C:\Users\ADMIN\OneDrive\Documents\maya\2020\scripts\userSetup.py”

grid spacing changed to 100

Give it a try.

Unreal: Heads to Foot to Cm

Hello All,

Keeping it short this time.

Table of Contents

Dcc used to execute the tasks
Heads and Cubes in Unreal for RTS Reference
Brevity Resources

Dcc used to execute the tasks

Maya2020, Unreal 4.26.2

Plugins: Perforce VCS-P4V, P4GT for Maya, Unreal 3dTextBeta

Brief Context

Maya is a 3d software I used to create cubes Intentionally

Unreal for testing the camera distance for each character height

Perforce – P4V – version control system for home work or if one wants to share depot with multiple artists(haven’t tried yet ) is by far one of the amazing tool.

P4GT for Maya is from P4V family, will help you save your increments in the depot

for more details — https://community.perforce.com/s/article/2552

Unreal 3dTextBeta is a text plugin for text(lol)

Heads and Cubes in Unreal for RTS Reference

Some great examples

World or warcraft

Rise of Nations

Age of empires

Fieldrunners

FrostPunk

Dota

etc.

Brevity Resources

You’ll find my verbose work – My Trello Board

How to Create 7ft in DCC instead in Unreal

Unreal and Maya unit setup = cm

how to create 8heads in maya for reference
create 7ft cube in maya
to create 7ft cube– change the unit setup in maya to foot, adjust 7ft height in cube settings.(or directly convert foot to cm from google)
change back the maya unit setup to cm
now the foot has changed to cm in cube settings
to get the sphere radius from 7ft — divide the cm by 2 — 7ft = 213.36cm
213.36cm/2 = 106.68cm
apply 106.68cm in the sphere radius(this is a base value, after this divide by 8)
for 8 spheres — 106.68cm/8 =13.335
increase the cube height subdivisions to 8

now unreal
as per unreal — mannequin model is considered as base height
that is 6ft approx or 180cm
https://www.worldofleveldesign.com/categories/ue4/ue4-guide-to-scale-dimensions.php

reference notes
https://www.worldofleveldesign.com/categories/ue4/my-system-project-set-up-mayalt-maya-ue4.php
https://github.com/Allar/ue5-style-guide
https://blog.kongregate.com/design-tips-for-in-game-character-proportions/
https://sciencing.com/calculate-circular-area-7411839.html
https://www.youtube.com/watch?v=QCdFBzUwoF0
https://www.creativecomicart.com/measuring-human-proportion.html
https://www.restaurantnorman.com/how-tall-is-8-heads-high/

How to snap gizmo to polygon face in maya

http://patrickvfx.blogspot.com/2016/09/finding-centre-position-of-polygon-face.html
https://groups.google.com/g/python_inside_maya/c/UoMVxr0deVo/m/OJ2K8IpevxQJ
https://mayastation.typepad.com/maya-station/2009/11/where-is-the-center-of-a-polygon.html

Well this is it for today people. Have a great weekend!!

Unreal:Perforce installation and cloud services Azure

Hello Guys,

Today we’ll install Perforce and setup Azure for home use!!. This is just a test setup to understand the process, even I don’t know most of terminologies but lets learn. Please don’t do it blindly I request, as I have updated the page while I was attempting the installation(multiple times, don’t rely on images). Please read all the notes. All the best. cheers!!

Table of Contents

P4D

P4ROOT

Disk Allocation

Install Perforce P4V

Perforce SSL Setup

P4V Initiating

Microsoft Azure

Azure CLI

Resource Group CLI

Virtual Network CLI

Some Doubts(verbose)

Credentials

Resources

Install Perforce P4D

(directly from website)

What is Helix Core (P4D) Server?

Helix Core (P4D) is version control for accelerated development. It securely versions all digital content – even large files – in a single repository. And it scales for large teams, handles thousands of daily transactions, and delivers files quickly to remote users.

Download link

https://www.perforce.com/downloads/helix-core-p4d

Provide your Family and Platform and you can proceed with download.

Installer

As per few videos, They recommend to save everything in C drive

But if you have a small C drive you can opt for any other drive.

Set P4ROOT where ever you want

P4D root directory — please read the below info from docs and choose for yourself.

Because all Helix server files are stored by default beneath the server root, the contents of the server root can grow over time.

note: P4ROOT directory should be kept in c drive it causes some issues while manually creating new servers for example Perforce2

https://www.perforce.com/manuals/p4sag/Content/P4SAG/install.unix.create_root.html

Disk Allocation

https://www.perforce.com/manuals/p4sag/Content/P4SAG/install-disk-space-allocation.html

Server- localhost:1666

User Name- ADMIN (or any name)

Text Editing Application- notepad(or any)

I had raised a ticket because i was getting an error of Typemap not changed so please keep it notepad only.

(note: Normally, with editors like Notepad, vi, or similar, the command stays ‘connected’ to the editor session)

Install Perforce P4V

once you set the localhost:1666 in the previous setup, the P4V will directly pick it up

Server- localhost:1666

User Name- ADMIN (it should be same as P4D)

Text Editing Application- (it should be same as P4D)

https://www.perforce.com/video-tutorials/vcs/how-install-your-helix-core-server-client-windows-10

Please check the below places

ctrl+R
services.msc
#look for Helix Core Server

ctrl+shift+esc
services Tab
# look for Perforce
You think its done, Perforce is just getting started

Now that everything is setup, lets secure the line.

Perforce SSL Setup

Below text is directly from perforce

https://community.perforce.com/s/article/2596

Open up a Windows command prompt by right-clicking on the Windows Command Prompt icon and selecting “Run as”; select “Administrator”. “Run as”; select “Administrator”

https://www.perforce.com/manuals/cmdref/Content/CmdRef/P4SSLDIR.html

mkdir C:\SSLKEYS

Ensure this directory is accessible by the user who runs the Perforce service:

(note: Please put double inverted commas )

p4 set P4SSLDIR="C:\SSLKEYS"
p4d -Gc
p4 set -S Perforce P4SSLDIR="C:\SSLKEYS" 
p4 set -S Perforce P4PORT=ssl::1666
p4 -p 1666 admin stop 
net start perforce
p4 set P4PORT=ssl:localhost:1666
p4 info 

look for Server encryption: encrypted in the info

P4V Initiating

Server- ssl:localhost:1666
User Name- ADMIN (it should be same as P4D)

OK the above dialog box.

This is where it gets more dirty

Microsoft Azure

At its core, Azure is a public cloud computing platform.

Microsoft Azure is a cloud platform for storing your work, you need a pack to let your perforce account recognize and sync your work to cloud.

One will receive a mail once you mention your mail id in the perforce page(download and install p4d and p4v)

You’ll have to pick a subscription it is mandatory. Please choose as per your requirement or if you are a student go for student benefits. For list of active products with subscriptions please read below page. Its a good reference page.

https://dev.to/azure/azure-free-account-is-it-really-free-53cb

after you are subscribed please go through below page, it is all that I am explaining just follow you’ll do good.

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure

or if you have more money pay-as-you-go!!

Subscription page will be displayed fill in your details its quite simple and you’ll receive 200$ roughly Rs.14000+ depending on the currency rate at the time.(just a heads up any one using HDFC debit card check if your name is mentioned on the card if not, please prefer another card). No need to worry even if the subscription is collecting your details upfront, you’ll be prompted later if you want to upgrade with payment, it wont auto deduct from your account. cheers!!(unfortunately i did not take snaps of the subscription page) for more details https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/avoid-charges-free-account

for perforce enhanced studio pack please name the resource group as

perforce-vcs-development

(Note: when you are logging in freshly second time, go to your profile symbol top right corner, click once and you’ll find Azure Portal, that is how you can go to the portal page of Azure)

Download Azure CLI

From here onwards I’ll be logging in through CLI(command line). I have few reasons.

Since i have been working in Linux for a while, I feel really comfortable in CLI(plus it looks cool if somebody is watching, lol). Azure CLI is same as the Website interface. Whatever details I’ll show you through CLI those exact details can be filled on the Website. Don’t Worry if something goes wrong, you can delete anytime you want. For people those who are not a CLI fans or inexperienced for them I’ll link the page where Azure docs have explained with Website Slides in docs. ALL THE BEST. Here it comes.

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli

Download from the above link. It will be installed in C drive for windows 10 users by default(that sucks).

you can login in azure through command line()

az login

(Note: If you use a cloud shell, it will create a resourcegroup, read about it(resource group))

Resource Group CLI

A resource group is a container that holds related resources for an Azure solution — VNet enables many types of Azure resources, such as Azure Virtual Machines (VM)

image ref_1

image_ref_2

How to Create a Resource Group — Slides

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal#create-resource-groups

Please read below — resource group reference names list

Please avoid same name. But the name mentioned in the image is the name suggested by perforce. please check the https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure

You can skip creating tags and create it. If you have reached till here be kind to your body and drink some water.

CLI

az group create --name perforce-prod-dev --location centralindia
# to delete
az group delete --name perforce-prod-dev

Virtual Network CLI

Azure Virtual Network (VNet) is the fundamental building block for your private network in Azure
to understand the network block please see the image on this link

image_ref_1

How to Create a VirtualNetwork — Slides

https://docs.microsoft.com/en-us/azure/virtual-network/quick-create-portal#create-a-virtual-network

az network vnet create -g perforce-prod-dev -n vnet-prod-centralindia-001 --address-prefix 10.0.0.0/16 \
    --subnet-name snet-prod-centralindia-001 --subnet-prefix 10.0.0.0/24

What is a NetworkWatcherRG?

https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-create#delete-a-network-watcher-in-the-portal

(Not an expert on this, but i have used while exploring git(it is a one time thing), always had a love-hate relation with it. But perforce has asked it so I’ll do it. SSH helps you communicate between remote servers)

An SSH key is an access credential for the SSH (secure shell) network protocol. This authenticated and encrypted secure network protocol is used for remote communication between machines on an unsecured open network. SSH is used for remote file transfer, network management, and remote operating system access.

How to Create a SSHKey — Slides

https://www.atlassian.com/git/tutorials/git-ssh

https://docs.microsoft.com/en-us/azure/virtual-machines/ssh-keys-portal#generate-new-keys

note: Before you select any location please check if the cloud machines(VM) are available for that location or else you’ll have to redo this step.

az group create --location centralindia --name "mySshPublicKey" 
az sshkey create --location "centralindia" --resource-group "SSHKeyRG" --name "mySshPublicKey"

Virtual Machines

Please follow the page exactly, I would recommend this part to be done on azure platform as you’ll have to see the machines you need for work/cloud.

Please provide perforce-vcs-development as your resource group for virtual machines

note: If you plan to purchase please begin working or you will lose the credits provided by azure in no time

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal

Some Doubts(verbose)

Once you complete the creation you’ll notice below image

Since i did not do all the above steps in a single day, I created and deployed the perforce-studio-pack at later stage(In case you don’t have the studio pack, please go to Microsoft Azure studio pack part above in the page). What I mean there is no hard and fast rule to deploy this pack. just for the record.

for perforce enhanced studio pack please name the resource group as

perforce-vcs-development

If you have reached till here give yourself a pat on the back. take a break drink some tea or coffee.

lets go ahead

Credentials

Everything is explained very well in the below link

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-62321

Now go ahead with this link, Its pretty self explanatory

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-61476

But if you come across this error

Connect to server failed; check $P4PORT.
connect: public or pirvate IP:1666: WSAETIMEDOUT, A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Please go to this page and look for — How do I resolve a timeout when trying to log into P4V?

https://www.perforce.com/resources/vcs/cloud-version-control-guide#deployment

But if you still have doubt’s like i had

Go to Azure Portal

Search Virtual Machines

Azure virtual machines and if you notice i did not take location-central india, as the machines were not available in that part of the country. So choose wisely.

Select First Machine

Select Networking

Check the Source Column

There might be something 1.1.1.1/32, This needs to be updated to your ip address.

Go to https://whatismyipaddress.com/

Copy the ip address, replace every value which is related to TCP, as in the above image.

Check the second machine do the same.

(note: One will have to change the ip address everyday as the ip address are dynamic)

Now attempt this once again

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-62321

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure#tab-panel-61476

and once done Start dancing and incase if you still face the issue please raise a ticket to, and then dance.

helix-cloud-support@perforce.com

support@perforce.com

https://www.perforce.com/support/request-support

a reference video with cloud

I wanted to show a bit more about the perforce workspaces and depot but unfortunately I ran out of credits. Probably I’ll write perforce post independently. I have learnt a lot through this setup. You’ll have creative freedom for your work. Stop saving your file in an old fashioned way. Try the perforce way. Give it a try its worth it.

Configure Less. Create More. — Perforce.

Resources

Best Practice, it might show you to fill a form, please do it and go ahead it is a good read.

https://www.perforce.com/resources/vcs/version-control-best-practices-game-development#success

Helix Core with Unreal

https://www.perforce.com/blog/vcs/how-use-unreal-engine-4-perforce

How to purge the data from depot

https://community.perforce.com/s/article/6823

Types of Depots

https://github-wiki-see.page/m/codewaregames/UnrealGameSync/wiki/Creating-Perforce-Depots

https://github.com/codewaregames/UnrealGameSync/wiki/Creating-Perforce-Depots#creating-single-depot-type-local

Microsoft Azure

https://www.perforce.com/products/helix-core/install-enhanced-studio-pack-azure

https://www.perforce.com/blog/vcs/what-microsoft-azure-cloud

Azure-What is resource manager

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/overview

Unreal + Perforce proxy server

https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/UsingPerforce/

resource group reference names list

https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming

unreal+perforce info’s

https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/SourceControl/Perforce/

http://www.rebz.org/2012/10/perforce-in-the-cloud-free/

https://allarsblog.com/2017/04/05/populating-perforce-with-an-unreal-engine-source-build/

https://vilbeyli.github.io/How-to-Setup-a-Perforce-Workflow-Automate-Distribute-UE4-Builds/#introduction

workspaces

https://community.perforce.com/s/article/1230

https://articles.assembla.com/en/articles/748195-perforce-version-control-with-ue4-assembla

https://stackoverflow.com/questions/17356666/perforce-p4w-error-files-not-in-client-view

SuccintSave: Organizing your work

Hello Guys,

In India we are a tad bit confused when it comes to beginning the work or executing the task.

oh wait it meant

mc escher

we don’t know from where to begin.

So the first step is to save your work in dir, with valid details.

Purpose – My Proj

Why do you need conventions to organize your work?

my proj(still months away from executing)

Guys i am working on a proj for myself like i did with controller storage. so the files I created needs to be structured and organized.

Because i am not going to be working on just 5 or 10 files, there are going to be files, folders, stages, references, output, and i cannot keep naming them final_output, final_output2,………… I don’t want to remain confused like my fellows in the above gif.

So Lets for once and for all create a folder structure and move on with life.(i am not sure if that will happen lol)

So i stumbled across this guys blog for creating a folder structure for reference.

https://uxdesign.cc/a-systematic-approach-for-managing-project-folder-structures-4e2e553cad00

seriously top notch.

So I started to dig_deeper into the matter on google(of course) and came across some studies worth mentioning

University of Aberdeen

https://www.abdn.ac.uk/staffnet/documents/policy-zone-information-policies/File%20Naming%20Conventions%20July%202017.pdf

The University of Edinburgh

https://www.ed.ac.uk/records-management/guidance/records/practical-guidance/naming-conventions

Penn Library(recommended, latest update on conventions, and i am also going to follow this setup with slight tweaks)

https://guides.library.upenn.edu/datamgmt/fileorg

SIA(no not the Australian singer-songwriter)

https://www2.staffingindustry.com/Editorial/Archived-Blog-Posts/Adam-Pode-s-Blog/Probably-the-best-file-naming-convention-ever

Stanford University(without stanford we cannot complete the list)

https://library.stanford.edu/research/data-management-services/data-best-practices/best-practices-file-naming

you can search a lot of material on google regarding this more than i did feel free.

Prototype

Still using the tool only for myself, not using any Database. But is quite helpful to keep my work organized

Guys before i go further bragging about my incomplete tool

Screentogif is used to record the above gif below is the link(an open source tool)

https://www.screentogif.com/

Now about the tool

This tool is meant for people those who want to save their files in organized manner for any software

You can rename one file as well.

This tool is currently not connected to any DCC, still in the planning stage.

The size of the tool is more due to the package/modules being used

One can provide their own types like i did for myself in the tool–rig, model, etc.

Will keep you guys posted as, there’s lot of scope to learn.

All criticisms and feedback are welcome.

See you guys soon.

UnrealEngine4:Shader

Hello People,

While i was creating particle effect i got exposed to alot of parameters in unreal engine one of them was creating a shader(flipbook) you’ll come to know in below mentioned series.

Check out the below mentioned series by Ben Cloward, amazing tutorials worth watching for any aspiring shader artist.

I actully wanted to share and save the process for people interested in shader development(me too),

kindly watch the above video first and then begin the process of creating a SHADER for yourself,

You’ll require couple of things first
Ben above explains he createad a model for showing workflow in unreal
But there was no downloadable content for working, So i saw an opportunity and thought of creating it for myself and people who are interested, so the things that we need are,(these below points are shorcuts for people who are not modeling artists like me)

  • any sculpting software(mudbox, zbrus, etc)
  • any dcc software(maya, 3ds max, etc)
  • crazy bump(most crucial step)
  • unreal 4.24

Open Mudbox with plane

rotate plane to z-axis – 90degrees

Pick any texture you like from google

Add the texture to stencil

Select the stencil and sculpt (shift+D to increase the resolution)

So if you guys have reached here successfully, pat yourself from here it gets slightly tricky

Hope you all know a little bit about passes, if not kindly check the above video couple of time

Go to paint projection for Diffuse pass, to get the cut out of the sculpted area(Note: dont create a diffuse map from texture, it needs to be precise that is why we are painting it here)

Afer you create diffuse pass in the tab, then in the kindly select color grey or anything inbetween black or white but not extreme on either side you can start to paint on the mesh and then export once finished

To export Diffuse and Normal map

Diffuse

Go to: File>Export All Paint Layers Below dialog box will open, kindly change the below Path Template to a suitable location.

Normal

Note: Dont try to paint Normal map

Go to: UVs & Maps>Extract texture maps Below dialog box will open, the ones which are highlighted are basic settings kindly set as per your requirement

Done till here congratulate yourselves, all the hard work is done

The DCC software is not mandatory as it is ony used for creating ambient occlusion in this scenario.

Crazy Bump

save Specular map from that

Open Specular map in Photosop and slightly paint randomly with black or dark grey that will be our Roughness map

and for the final compiling in unreal engine, watch the video very nicely explained.

I would recommend everyone to watch all the videos of Ben he was the guy who sold ShaderFX to max and maya so he has indepth knowledge on shaders.

I am even attaching the googledrive link for anyone who wants to download the maps and mudbox file

https://drive.google.com/open?id=1TpMGs8KhViUVr_O_zEWd5WVvsIDBqVWO

In the end let me know if you face any issue and you can ping me on

bghuntla123@gmail.com

blossom_ghuntla@yahoo.com

Thank You Guys,

Take care

UnrealEngine4: Finally Started

Hello guys,

I have been interested in learning a game engine, and i finally started and created a particle effect just to visually motivate myself, as i am from rigging background i rarely get to taste the visual treat, hoping to get my skeletal mesh and try few more effects till then this is the output.

particles_in_unreal_engine_cut

Well To be honest i’ve been reading a book and refering a series of tutorial well i just began watching the series, below are the links for the book and series

Unreal Engine 4 Game Development in 24 Hours, Sams Teach Yourself

I’ll write a review of this book very soon as i have completed 70% of it, bloody good book i’ll elaborate that very soon

519PH+0LmeL

Below is the official unreal engine cascade(particles) playlist must watch for every aspiring fx artist who wants a basic understanding of realtime fx.

Thank You Guys

Stay Home and Stay Safe