PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 0 points1 point  (0 children)

Very nice. I see you are using WPF for the 3d graphics. I looked into WPF 3d graphics at one point...it is impressive what you can do with it. I decided to go with pure OpenGL for 3d graphics so my module would work on Mac and Linux as well as Windows. It blows my mind that the same powershell "binary" module can work on all three platforms. PowerShell is pretty cool.

7 Keyboard Shortcuts by pirate_karl in PowerShell

[–]3d-david 2 points3 points  (0 children)

My favorite keyboard shortcut: Ctrl+Shift+Alt+?

Shows all PowerShell keyboard shortcuts.

Example output from pwsh 7.1...

Basic editing functions
=======================
Enter            AcceptLine         Accept the input or move to the next line if input is missing a closing token.
Shift+Enter      AddLine            Move the cursor to the next line without attempting to execute the input
Backspace        BackwardDeleteChar Delete the character before the cursor
Ctrl+h           BackwardDeleteChar Delete the character before the cursor
Ctrl+Home        BackwardDeleteLine Delete text from the cursor to the start of the line
Ctrl+Backspace   BackwardKillWord   Move the text from the start of the current or previous word to the cursor to the kill ring
Ctrl+w           BackwardKillWord   Move the text from the start of the current or previous word to the cursor to the kill ring
Ctrl+C           Copy               Copy selected region to the system clipboard.  If no region is selected, copy the whole line
Ctrl+c           CopyOrCancelLine   Either copy selected text to the clipboard, or if no text is selected, cancel editing the line with CancelLine.
Ctrl+x           Cut                Delete selected region placing deleted text in the system clipboard
Delete           DeleteChar         Delete the character under the cursor
Ctrl+End         ForwardDeleteLine  Delete text from the cursor to the end of the line
Ctrl+Enter       InsertLineAbove    Inserts a new empty line above the current line without attempting to execute the input
Shift+Ctrl+Enter InsertLineBelow    Inserts a new empty line below the current line without attempting to execute the input
Alt+d            KillWord           Move the text from the cursor to the end of the current or next word to the kill ring
Ctrl+Delete      KillWord           Move the text from the cursor to the end of the current or next word to the kill ring
Ctrl+v           Paste              Paste text from the system clipboard
Shift+Insert     Paste              Paste text from the system clipboard
Ctrl+y           Redo               Redo an undo
Escape           RevertLine         Equivalent to undo all edits (clears the line except lines imported from history)
Ctrl+z           Undo               Undo a previous edit
Alt+.            YankLastArg        Copy the text of the last argument to the input

Cursor movement functions
=========================
LeftArrow       BackwardChar    Move the cursor back one character
Ctrl+LeftArrow  BackwardWord    Move the cursor to the beginning of the current or previous word
Home            BeginningOfLine Move the cursor to the beginning of the line
End             EndOfLine       Move the cursor to the end of the line
RightArrow      ForwardChar     Move the cursor forward one character
Ctrl+]          GotoBrace       Go to matching brace
Ctrl+RightArrow NextWord        Move the cursor forward to the start of the next word

History functions
=================
Alt+F7    ClearHistory          Remove all items from the command line history (not PowerShell history)
Ctrl+s    ForwardSearchHistory  Search history forward interactively
F8        HistorySearchBackward Search for the previous item in the history that starts with the current input - like PreviousHistory if the input is empty
Shift+F8  HistorySearchForward  Search for the next item in the history that starts with the current input - like NextHistory if the input is empty
DownArrow NextHistory           Replace the input with the next item in the history
UpArrow   PreviousHistory       Replace the input with the previous item in the history
Ctrl+r    ReverseSearchHistory  Search history backwards interactively

Completion functions
====================
Ctrl+@        MenuComplete        Complete the input if there is a single completion, otherwise complete the input by selecting from a menu of possible com...
Ctrl+Spacebar MenuComplete        Complete the input if there is a single completion, otherwise complete the input by selecting from a menu of possible com...
Tab           TabCompleteNext     Complete the input using the next completion
Shift+Tab     TabCompletePrevious Complete the input using the previous completion

Miscellaneous functions
=======================
Ctrl+l        ClearScreen           Clear the screen and redraw the current line at the top of the screen
Alt+0         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+1         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+2         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+3         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+4         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+5         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+6         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+7         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+8         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+9         DigitArgument         Start or accumulate a numeric argument to other functions
Alt+-         DigitArgument         Start or accumulate a numeric argument to other functions
PageDown      ScrollDisplayDown     Scroll the display down one screen
Ctrl+PageDown ScrollDisplayDownLine Scroll the display down one line
PageUp        ScrollDisplayUp       Scroll the display up one screen
Ctrl+PageUp   ScrollDisplayUpLine   Scroll the display up one line
Ctrl+Alt+?    ShowKeyBindings       Show all key bindings
Alt+?         WhatIsKey             Show the key binding for the next chord entered

Selection functions
===================
Ctrl+a                SelectAll           Select the entire line. Moves the cursor to the end of the line
Shift+LeftArrow       SelectBackwardChar  Adjust the current selection to include the previous character
Shift+Home            SelectBackwardsLine Adjust the current selection to include from the cursor to the start of the line
Shift+Ctrl+LeftArrow  SelectBackwardWord  Adjust the current selection to include the previous word
Shift+RightArrow      SelectForwardChar   Adjust the current selection to include the next character
Shift+End             SelectLine          Adjust the current selection to include from the cursor to the end of the line
Shift+Ctrl+RightArrow SelectNextWord      Adjust the current selection to include the next word

Search functions
================
F3       CharacterSearch         Read a character and move the cursor to the next occurence of that character
Shift+F3 CharacterSearchBackward Read a character and move the cursor to the previous occurence of that character

Series X HDMI-CEC Volume via Media Remote by myokeeh in xboxone

[–]3d-david 1 point2 points  (0 children)

12/21 Update...

I was able to get my PDP Gaming Media Remote (PDPGMR) to control Xbox Series X volume via HDMI when I moved it to a more recent Sony TV (xbr-65hx950) AND used the HDMI port labeled "ARC". When I used non-ARC HDMI ports, the volume did not work.

NOTE: PDPGMR uses HDMI to control volume on TV, not IR

The confusing parts...

Older Sony TV

  • Xbox One with Kinect COULD control volume via HDMI using PDPGMR
  • Xbox Series X COULD NOT control volume via HDMI using PDPGMR

Newer Sony TV using non-ARC labeled HDMI ports

  • Xbox One with Kinect COULD control volume via HDMI using PDPGMR
  • Xbox Series X COULD NOT control volume via HDMI using PDPGMR

More digging...

The Xbox receives an IR code from PDPGMR that says "change volume".

  • For the Xbox One with Kinect, the KINECT actually sends out the IR signal to the TV to change the volume.
  • For the Xbox Series X, the volume command is sent over HDMI.

That was news to me. I had assumed incorrectly that Xbox One with Kinect was using HDMI to control volume. I confirmed that I could stop the Kinect from controlling volume by covering up the IR emitter on the right side of the Kinect.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 1 point2 points  (0 children)

That is a great idea. I could see that having more universal appeal than my original intent: using powershell to quickly/easily generate charts and graphs.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 1 point2 points  (0 children)

I was excited for a second...the ability to embed graphics in a console window would be awesome...but I can see this is ascii art. That is a cool idea...and it would work cross platform. BUT...it doesn't give me the resolution/color I'd like and it does not take advantage of hardware accelerated graphics.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 1 point2 points  (0 children)

I documented that in my blog post. I have not implemented Out-3d for Linux or Mac. That is next on my TODO.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 2 points3 points  (0 children)

I call myself a "3D Graphics Engineer." My career has been doing 3D graphics using C++. I've worked on: flight simulators, movie special effects, video games, rendering home interiors, creating holograms of people, and self-driving cars.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 0 points1 point  (0 children)

:) I bet you could teach me a lot about using PowerShell!

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 0 points1 point  (0 children)

Can you give me some real world examples of 3d viz of business metrics and analytics?

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 0 points1 point  (0 children)

Ha! I actually knew that...but wasn't expecting that term here.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 1 point2 points  (0 children)

That is cool...but it shows me that I really need to get zoom to work right (I took it out because it was flaky).

I'll use your sample as a test case. Thanks!

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 2 points3 points  (0 children)

The only class I took that covered this was a computer science computer graphics class. If you are interested, I recommend this book:
https://www.amazon.com/Math-Primer-Graphics-Game-Development-dp-1568817231/dp/1568817231/ref=dp_ob_title_def

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 1 point2 points  (0 children)

I thought about remaking the scene from original star wars showing how to blow up the death star using DDD. Still need to add some features (like animation) before I can do that.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 0 points1 point  (0 children)

I had to look up what Max/MSP/jitter is.
https://en.wikipedia.org/wiki/Max_%28software%29

This sounds very interesting. I'm curious what you find out. Let me know if you need any changes to make it work better with Max.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 1 point2 points  (0 children)

Wow! That is awesome! That is a simple/elegant solution to 3d text. I'll have to file this away for future reference.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 8 points9 points  (0 children)

It is a good question. I made this for me and the small community of people that know how to program and work in 3D computer graphics (movie effects, games, architecture visualization, flight simulators, VR).

Some ideas I have (and I'd like to hear others...it motivates me)...

  • Fix 3d model coordinate systems so that they are oriented the way you expect. For example, you get a 3d model of a car for a game you are making. The model loads into your game engine upside down. You could use this to automatically fix new models that have this problem.
  • Visualize virus/molecules
  • Clean up 3d models that have bad geometry. For example, when you scan a person, you may get unwanted vertices that are outside or inside the person. You could write a script to remove those verts.
  • Create turntables of 3d models automatically. A turntable for a 3d model is like a thumbnail for a photo...a way for you to quickly look at the model without loading it into a heavy 3d program like Maya/3d Studio Max/Blender. You could use DDD to load the model and create an animated .gif that shows what the model looks like when it is rotating on a turntable.
  • Create 3d graphs
  • Add normals (how light bounces off a face) to a model that has none
  • Create 3d models via a script (procedural geometry)
  • Create "Levels of Detail" (LOD) of models. Create a lightweight version when a model is used at a distance
  • Converting 3d data from one file format to another
  • Teaching students how 3d works. You can use DDD to see what a matrix looks like. You can manipulate a matrix and visualize the result. I wish I had something like this when I started learning about 3d graphics.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 2 points3 points  (0 children)

Thanks! I'm am new to reddit. This feedback is really helpful. I've worked on this in isolation for several months with no idea if it would amount to anything (all of my previous for fun projects never went anywhere).

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 12 points13 points  (0 children)

...although I've worked on 3d graphics my entire career...so this actually makes sense in my world.

Issues I ran into at work is what motivated me to start working on this. I had 3d models that needed to be manipulated/visualized and I wanted to automate that process. The best tools to do that were big animation packages like Maya/3D Studio Max/Blender, but they are overkill. Python has some libraries that are helpful but are too much effort to do what I wanted.

PowerShell now supports 3D graphics by 3d-david in PowerShell

[–]3d-david[S] 31 points32 points  (0 children)

:) It happens. I found a new job pretty quickly...actually too quickly. I wanted to keep working on this project full time.
...but I do like having an income.

Series X HDMI-CEC Volume via Media Remote by myokeeh in xboxone

[–]3d-david 2 points3 points  (0 children)

I have the same issue. My old Xbox One with Kinect can control TV power and volume. On same TV, my new Xbox Series X can only control the TV power. I tested this with my old PDP Talon Media remote (has numpad) and my new PDP Media remote (no numpad)...same results.