Home

Friday, July 13, 2018

PowerShell - Learning - Entry 1.3

More coding, added getting system information from Dxdiag and system.exe. Along with some more place holder functions. Learning stuff yay! time for sleep before work! Booo sleep!

#Clean up on New Run or on application Exit
if($MainLoopEvent){
    Unregister-Event $MainLoopEvent -Force
    Stop-Job $MainLoopEvent
}

##

#Dummy Data
$SearchPath="$env:USERPROFILE\Desktop"
$SubDir=$false
$MainLoopAction ={
   Get-NewSource
   Update-DataObj
   Update-AppUi
   #Send-Notice
}

##
# "*.*" = All, "*." Directory
Function Make-Watcher($searchPath="$env:USERPROFILE\Desktop",$Filter="*.*", $subDir=$false) {
    $watcher = New-Object System.IO.FileSystemWatcher
    $watcher.Path = $searchPath
    $watcher.Filter = $Filter
    $watcher.IncludeSubdirectories = $subDir
    $watcher.EnableRaisingEvents = $true
    return $watcher
}

##
Function Set-WatchEvent($Object=$null,$Event="Created",$Action) {
    # Deleted, Renamed, Changed, Created; $changed = Register-ObjectEvent $watcher "Changed" -Action { write-host "Changed: $($eventArgs.FullPath)" }
    if($Object -ne $null){
        $created = Register-ObjectEvent $Object $Event -Action $Action # Watcher/Event & Action Code Source: https://superuser.com/questions/888442/powershell-folder-monitor-batch-execution
            #$action = {Invoke-Item "D:\BATCH FILES\XXXXX.bat" -filter = "XXXXX.pdf"}
        #while ($true) {sleep 5} #Only works if external job
        return $created
    }
}

#Test Functionality
$watcher = Make-Watcher
$MainLoopEvent = Set-WatchEvent $watcher -Action $MainLoopAction

##


##

# Get system info
# $sys | Get-Member -MemberType Property | ForEach{ "{0} = `t{1}" -f $_.name, $sys.($_.name) }

Function Send-Notice ($title="TestTracker Report",$msg="You have a waiting Action. Please Approve the Action.",$bttn='ok',$icon='Exclamation') {
    # Icon Info key Source: MSDN Icon Table: https://msdn.microsoft.com/en-us/library/system.windows.forms.messageboxicon(v=vs.110).aspx
    # TODO: Change frame, change icon to custom, change color; background, header, text
    #$wshell = New-Object -ComObject Wscript.Shell ##$wshell.Popup("Operation Completed",0,"Done",0x1)
    [System.Windows.Forms.MessageBox]::Show($msg,$title,$bttn,$icon) 
}

Function Get-NewSource {
    Write-Host (`
    "`n### `$newSource = Get-Content -Raw -Path `"`$env:USERPROFILE\Desktop\...`"",
    "`$newJson = ConvertFrom-Json `$newSource",
    "return `$newJson")
}

Function Update-DataObj {
    Write-Host "`n### DataObj = NewSourceData"
}

Function Update-AppUi {
    Write-Host "`n### AppUI = UpdatedDataObj"
}

function Get-SystemInfo ($ComputerName=$env:ComputerName,$header = 'Hostname','OSName','OSVersion','OSManufacturer','OSConfig','Buildtype', 'RegisteredOwner','RegisteredOrganization','ProductID','InstallDate', 'StartTime','Manufacturer','Model','Type','Processor','BIOSVersion', 'WindowsFolder' ,'SystemFolder','StartDevice','Culture', 'UICulture', 'TimeZone','PhysicalMemory', 'AvailablePhysicalMemory' , 'MaxVirtualMemory', 'AvailableVirtualMemory','UsedVirtualMemory','PagingFile','Domain' ,'LogonServer','Hotfix','NetworkAdapter')
{
    #param($ComputerName = $env:ComputerName)
    $a = systeminfo.exe /FO CSV /S $ComputerName |
    Select-Object -Skip 1 |
    ConvertFrom-CSV -Header $header
    return $a
    #Flags:
        #/s Computer #Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
        #/u Domain\User #Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
        #/p Password #Specifies the password of the user account that is specified in the /u parameter.
        #/fo {Table|List|CSV} # Specifies the format to use for the output. Valid values are TABLE, LIST, and CSV. The default format for output is LIST.
        #/nh #Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV.
        # Code Source https://gallery.technet.microsoft.com/scriptcenter/PowerShell-System-571521d1
}

function Get-Dxdiag {
    # Drop output in temp dir
    $logFile = $env:TEMP + "\dxDiagLog.xml"

    # Piping to Out-Null forces it to wait for dxdiag to complete before continuing.  Otherwise
    # it tries to load the file before it actuallygets written
    dxdiag.exe /whql:off /dontskip /x $logFile | Out-Null
    [xml]$dxDiagLog = Get-Content $logFile
    #$dxDiagLog.DxDiag.DirectSound.SoundDevices.SoundDevice | ft Description, DriverProvider
    # CODE SOURCE: https://stackoverflow.com/questions/37122010/can-i-access-dxdiag-from-powershell-console
    return $dxDiagLog
}

function Get-SystemData {
    $S = Get-SystemInfo
    $D = Get-Dxdiag
    $Sys = @{}

    #Gather relevant SystemInformation
    $Sys.add("Date",Get-Date)
    $Sys.add("Computer Name",$env:COMPUTERNAME)
    $Sys.add("OS",$S.OSVersion)
    $Sys.add("Language",$S.Culture)
    $Sys.add("System Manufacturer",$S.Manufacturer)# $S.OSManufacturer
    $Sys.add("System Model",$S.Model)
    $Sys.add("Bios",$S.BIOSVersion)
    $Sys.add("Processor",$D.DxDiag.SystemInformation.Processor)# $S.Processor
    $Sys.add("Memory",$D.DxDiag.SystemInformation.AvaliableOSMem)
    $Sys.add("Page File",$S.PagingFile)
    $Sys.add("DirectX Version",$D.DxDiag.SystemInformation.DirectXVersion)
    $Sys.add("Display Res",$D.DxDiag.DisplayDevices.DisplayDevice[1].CurrentMode)
    $Sys.add("MonitorName",$D.DxDiag.DisplayDevices.DisplayDevice[1].MonitorName)
    $Sys.add("MonitorId",$D.DxDiag.DisplayDevices.DisplayDevice[1].MonitorId)
    $Sys.add("NativeMode",$D.DxDiag.DisplayDevices.DisplayDevice[1].NativeMode)
    return $Sys
}

##


##

Function Set-AutoSession ($Check=$True) {
    if(Check){ Write-Host "`n### Auto is ON." }
    else{ Write-Host "`n### Auto is Off." }
}

Function StartSession {
    Write-Host "`n### Session Started!"
}

Function StopSession {
    Write-Host "`n### Session Stopped!"
}

Function Write-Token ($token=$null,$document=$null) {
    Write-Host "`n### `$token written to `$(`$document[0]) at line `$(`$document[1])."
}

Function Refresh-Token ($token=$null) {
    Write-Host "`n### `$token refreshed."
}


Function Copy-TokenToClipBoard ($token=$null) {
    <#
    Copy-TokenToClipBoard copies a passed token to the Windows Clipboard.
    Syntax; [$token = int,string]
    #>
    #Not Functional yet.
    #Set-Clipboard -Value $token
    Write-Host "`n### `$token copied to clipboard."
}

Function Set-DirectoryPath ($dir="") {
    Write-Host "`n### Path set to `$dir"
}

Function Set-Preferences ($AppPreferences) {
    Write-Host "`n### Preference saved!"
    $AppPreferences | Out-file $outFile
}

##

PowerShell - Learning - Entry 1

Proof of connect for an application. This is the Main loop based on an event trigger. When new files are added to a watched directory the application will act on the file to extract useful information and propagate that to an application window for ease of viewing.

Writing the code in Sublime text 3, because it's just that great. and test running in PowerShell ISE.


#Clean up on New Run or on application Exit
if($MainLoopEvent){
    Unregister-Event $MainLoopEvent -Force
    Stop-Job $MainLoopEvent
}

##

#Dummy Data
$SearchPath="$env:USERPROFILE\Desktop"
$SubDir=$false
$MainLoopAction ={
   Get-NewSource
   Update-DataObj
   Update-AppUi
   Send-Notice
}

##
# "*.*" = All, "*." Directory
Function Make-Watcher($searchPath="$env:USERPROFILE\Desktop",$Filter="*.*", $subDir=$false) {
    $watcher = New-Object System.IO.FileSystemWatcher
    $watcher.Path = $searchPath
    $watcher.Filter = $Filter
    $watcher.IncludeSubdirectories = $subDir
    $watcher.EnableRaisingEvents = $true
    return $watcher
}

##
Function Set-WatchEvent($Object=$null,$Event="Created",$Action) {
    # Deleted, Renamed, Changed, Created; $changed = Register-ObjectEvent $watcher "Changed" -Action { write-host "Changed: $($eventArgs.FullPath)" }
    if($Object -ne $null){
        $created = Register-ObjectEvent $Object $Event -Action $Action #https://superuser.com/questions/888442/powershell-folder-monitor-batch-execution
            #$action = {Invoke-Item "D:\BATCH FILES\XXXXX.bat" -filter = "XXXXX.pdf"}
        #while ($true) {sleep 5} #Only works if external job
        return $created
    }
}

#Test Functionality
$watcher = Make-Watcher
$MainLoopEvent = Set-WatchEvent $watcher -Action $MainLoopAction

##

##

Function Send-Notice ($title="TestTracker Report",$msg="You have a waiting Action. Please Approve the Action.",$bttn='ok',$icon='Exclamation') {
    # MSDN Icon Table: https://msdn.microsoft.com/en-us/library/system.windows.forms.messageboxicon(v=vs.110).aspx
    # TODO: Change frame, change icon to custom, change color; background, header, text
    #$wshell = New-Object -ComObject Wscript.Shell ##$wshell.Popup("Operation Completed",0,"Done",0x1)
    [System.Windows.Forms.MessageBox]::Show($msg,$title,$bttn,$icon) 
}

Function Get-NewSource {
    Write-Host (`
    "`n### `$newSource = Get-Content -Raw -Path `"`$env:USERPROFILE\Desktop\...`"",
    "`$newJson = ConvertFrom-Json `$newSource",
    "return `$newJson")
}

Function Update-DataObj {
    Write-Host "`n### DataObj = NewSourceData"
}

Function Update-AppUi {
    Write-Host "`n### AppUI = UpdatedDataObj"
}

##

Wednesday, August 23, 2017

Short Story Practice: Story 01 Hunger

Short story practice: That is art right? right?

Once upon a time there was, a shining city sprawling endlessly in the sunlight. In the shadows of that city lay endless jungles of the discarded.  Here a woman dwelt far away from the light wanting nothing more than to have a steady meal.

Every day, was a struggle to find something to eat that wouldn't eat her first.

One day she found a very big and very dead something that looked to be a tasty treat. It would have been anyway If not for it's sudden and very large fangs lurching at her.

Because of that, she ran for her life leaping over and through debris with comfort and ease of unconscious practice. however, her would be meal was swift too biting at her heels hounding her every step.

Because of that, she leapt and bounded through rust and jagged metal fear lending flight to her feet. Narrowly outstripped her stalker she slid into a small scar gouged in a large metallic shell.

Until finally safely out of reach the tasty treat howled in frustration and moved on. Exhausted but alive for one more day. She looked up to a lumenator high above feeling the familiar pang of hunger. Tomorrow, was another day with promise of a meal. Falling to slumber she wondered if she would be tasty when it finally happened, then drifted off into dream of tasty things.

Saturday, November 5, 2016

Pumpkin Dva Overwatch

Doodling a picture that got posted to my discord.


Thanks for reading, see you next time!

Tuesday, November 1, 2016

Chansey

I think I'm done with this one. On to the next! Maybe normal maps or a simple animation on my next model? Hmmmm, food for thought.


Artstation
Sketchfab

Thanks for reading. See you next time.

Sunday, October 30, 2016

I'm Alive.

Finally getting over whatever raid level cold I had. I'm feeling really rusty on anything creative so easing back into it.

Who's that Pokemon!?

Thanks for reading. See you next time!

Wednesday, October 19, 2016

Sicky

I've been suffering from a harsh cold or something, insane exhaustion. I've slept for a day and a half straight and i'm still drained to death. Hopefully i'll put out something soonish.

thanks for reading. See you next time.

Sunday, October 16, 2016

More Rigging Poses

New pose with rig. coming up with posses is turning out to be very useful for finding things to support posing of the limbs and rig in general. Also, it's good art practice too. Balance, composition within the body, etc.


Thanks for reading. See you next time!

Thursday, October 13, 2016

Blender Rigging

I Has things to Show! Testing out the usability and rigs flexibility.





More poses to come later as I get more stuff working on the rig.

Thanks for reading. See you next time!

Tuesday, October 4, 2016

Still Rigging + Sketch

Still digging into rigging in blender. So far I've learned there are a lot of really long tutorials and videos on rigging that don't actually cover much.


Thanks for reading. See you next time!

Thursday, September 29, 2016

Figuring Out Blender Rigging

Learning rigging in blender today, or trying to. trying to get this Ik/Fk switch/match arm to work. In some ways it seems easier than Maya. But I have yet to achieve the desired result. So we will see if it is in fact easier once I have a grasp of what the frik is going on. I will probably make a tutorial on it and cut out all the extraneous information I am having to trudge through. Blender has waaay to many menus to flip back and forth between to accomplish a task.

No Digital drawing stuff today. But I did do some stop light sketches (stop light sketch: a sketch while waiting for the walk signal) on a little walk to the store.




Thanks for reading! See you next time.

Monday, September 26, 2016

Winter Puppy

Little sketch of Winter Wolf in a different style. I painted on one layer and didn't get all the base background color out. >.<




Rhea - Demon Girl

Trying to adjust my sleeping schedule and I haven't done art in a while so I was doing some sketching to try and stay awake (1). I doodled a quick torso after my first pose sketch (2). My brain was like that could be cool. So I did a quick lay-in (3). After that I just had the urge see if I could get the pose looking like the demon girl I had made a while back (4-5).

1

 2

 3

4

5


Thanks for reading. See you next time!

Sunday, May 1, 2016

Wake up Draw 5

So I was drawing and ended up reading an anatomy book.

I generally prefer intuitive learning as analytical learning (reading an anatomy book)  from an art point of view. Is too abstract for me to apply or feel like I am understanding anything.

So I don't think I'll do that again on stream. Just intuitive feeling forms out.
twitch.tv/valthalin

I sketched out a skull at the beginning of the stream in a profile view. Then I was trying to get the depth wise proportions right and ended up bring in a skull to see how off I was.

From there it kind of migrated over to a pseudo muscle study.


Saturday, April 30, 2016

Wake Up Draw Pending

No Wake up Draw Today, My roommate caught me during breakfast and we got into a rant about work stuff. Maybe I'll do a Winding Down Draw?

Friday, April 29, 2016

Wake up Draw 4

Mucking about for today draw. didn't really have a direction so a lot of noodling happened.
was playing around with the idea of reverse gradients from dark to light on the subject vs background. should have flipped the relationship in hind sight.



Thursday, April 28, 2016

Wake Up and Draw 2 & 3

wake up and draw is what it sounds like, after I wake up and have breakfast I draw for at least 20 minutes.

 Wake up and Draw 02
50m of doodling


  Wake up and Draw 03
2hr 10m


Continuation on my face painting.
10hr+



Wednesday, April 20, 2016

Special Rendering

This is the vase picture, very few changes from last post.


I liked where the portrait was going but I wanted to make it a bust instead of a head shot. So i'm going to take you through the steps more or less to the images current state. First I expanded the sketch from the head-shot to a bust.


and a few hours later we are done! Thanks for reading!


I actually collapsed and saved before saving steps >.< by this point I had messed with the proportions of the face flatting it out and altering the nose and ear little. Then I sketched in the rough scale of the skull to place hair on. I also added a color layer and added some blood to her face.


I wanted a ponytail so i sketched in a sort of messy hair style ponytail that probably doesn't work in reality hah.


 I started painting the hair in sheets like rendering a box. roughing in the light.


after I roughed out how the light was going to hit the hair and what planes where going to be in light or shadow I started stroking in hair strands.


 After I rendered the bangs I had a pretty good feel for the process I was going to use to render the rest of the hair. So I did the thing. The character is also supposed to be tan so I did a multiply layer and darkened her skin color. Then masked the layer and erased out the face highlights.


I felt it was still a little flat so I gave it some 'pop' with the dodge brush. And that is where we are now! Thanks for reading =D




Sunday, April 17, 2016

Morning Warmup

wake up warmup. I've got a new setup for my room! so I can now roll out of my bed and start drawing since my desk is so low to the ground!

I was sketching eyes, but then I just ended up drawing a face that took up my allotted warm up time. I draw at the very least 1 hour a day to stay 'in practice'. The main point of the 1 hour is so I have a clear amount of time to draw and I don't noodle around too much or lose interest to an ambiguously long drawing session. I start without with some clear subject, eyes in this case. And I just start going from my imagination getting lines on paper. From there I slowly work in different reference as I go along. I was trying to get in the different subtle curves straights and opposing angles of the silhouette.


did a quick touch up.


Monday, April 11, 2016

Visual Library Sucker Punch

Tried doing a face without any ref to see what my internal visual library would spit out.
Starting from scratch without any warm up is rough yet zen as hell.

Streamed the process, watch it here! -> https://www.twitch.tv/valthalin


The size of the eyes was bothering me. So I fixed it. I'm done this time for reals, really.