VJ UNION

Cover image for Spout for Godot 3.4.2
vdmo
vdmo

Posted on

Spout for Godot 3.4.2

Amazing project aimed at bridging together an output option from Godot 3.4.2 via Spout has arrived from you-win developer on github. Godot is a free and open source game engine that provides many possibilities in whichever multimedia direction you desire.

Upcoming Godot 4.0 (currently in alpha)

Upcoming Godot 4.0
Being free and open source with healthy development cycles, we can expect a lot to come out from this. We will be following up with updates and share upcoming news around 4.0 development ( currently in alpha state.)

and now..

Spout for Godot

spout-gd Godot engine module adds support for Spout2 and uses SpoutLibrary.

To note: Spout is Windows-only as noted on their website.

Compiling

  1. Setup your environment to compile Godot
  2. Download the SPOUTSDK from the Spout2 repository and place into the thirdparty/ directory. A dummy folder has been provided
  3. Copy the folders in this repository into their respective folders in Godot
  4. Patch in FBO support to Godot using the patch provided in the patches/ directory
  5. Compile Godot
  6. Copy the SpoutLibrary.dll located at thirdparty/SPOUTSDK/SpoutLibrary/Binaries/x64/ next to your new Godot executable. The editor will refuse to run without it
  7. SpoutGD is now available to be used via GDScript

Usage

Send the default icon.png file over Spout. NOTE: This is cpu-bound and is slow relatively to Spout's full capabilities.

var spout: SpoutGD
var image := Image.new()

func _ready():
    image.load("res://icon.png")
    spout = SpoutGD.new()
    spout.set_size(image.get_width(), image.get_height()) # Implicitly used by SpoutGD when sending the image

func _process(delta):
    spout.send_image(image)
Enter fullscreen mode Exit fullscreen mode

Send the viewport over Spout. This utilizes the GPU and, in theory, should be very fast.

var spout: SpoutGD

var viewport: Viewport
var viewport_fbo: int # The OpenGL framebuffer object (fbo)

func _ready():
    viewport = get_viewport()

    spout = SpoutGD.new()
    spout.set_size(viewport.size.x, viewport.size.y) # According to the Spout docs, this isn't necessary

    # texture_get_fbo must be patched in since this isn't normally exposed by Godot
    viewport_fbo = VisualServer.texture_get_fbo(VisualServer.viewport_get_texture(viewport.get_viewport_rid()))

func _process(delta):
    spout.send_screen(viewport_fbo)
Enter fullscreen mode Exit fullscreen mode

GitHub logo you-win / spout-gd

Spout module for Godot

spout-gd

An engine module for Godot 3.4.2 that adds support for Spout2. This module uses SpoutLibrary.

Spout is Windows-only as noted on their website.

Compiling

  1. Setup your environment to compile Godot
  2. Download the SPOUTSDK from the Spout2 repository and place into the thirdparty/ directory. A dummy folder has been provided
  3. Copy the folders in this repository into their respective folders in Godot
  4. Patch in FBO support to Godot using the patch provided in the patches/ directory
  5. Compile Godot
  6. Copy the SpoutLibrary.dll located at thirdparty/SPOUTSDK/SpoutLibrary/Binaries/x64/ next to your new Godot executable. The editor will refuse to run without it
  7. SpoutGD is now available to be used via GDScript

Usage

Send the default icon.png file over Spout. NOTE: This is cpu-bound and is slow relatively to Spout's full capabilities.

var spout: SpoutGD
var image := Image.new()
func _ready():
    image.load("res://icon.png")
    spout = SpoutGD.new()
    spout.set_size(image.get_width(), image.get_height()) # Implicitly used by SpoutGD

Discussion (2)

Collapse
dataphreak profile image
John Smith

Aw man. Now I have to learn a new visuals suite. Shucks. There goes my evening/weekend/month. /s

XD Looks super cool. Have not messed with Godot yet. Actually really excited. Will be my first compile, too. (Excluding linux make command)

Collapse
vdmo profile image
vdmo Author

whats XD?