Armory: GPU Shader Module for viewport drawing

Created on 13 Jan 2019  路  5Comments  路  Source: armory3d/armory

Use GPU shader module to draw game preview in Blender viewport.

GPU Shader Module API:
https://docs.blender.org/api/blender2.8/gpu.html

feature request

Most helpful comment

Hi, is this something that could be considering again now that blender have a lts version or does is not related to it ? What about synching viewport editing with krom ?? Cheers.

All 5 comments

Hi, out of curiosity: how did this work back then?

How was it possible to run Kha without opening another window? How did the (fast) communication between the processes work? I found some old code but it's not really clear how it worked. It also used the barmory module which I can't find anywhere (because of the custom blender version used for Armory?).

Thanks :)

Yo, it was a special build of Blender with Krom embedded in it. barmory was a Python module which told Krom where to load krom.js file, Krom then executed OpenGL calls inside the Blender viewport. Unfortunately it was hell on earth to keep it up to date with new Blender versions, manage it for all 3 operating systems and contained many hacks.

Hi, is this something that could be considering again now that blender have a lts version or does is not related to it ? What about synching viewport editing with krom ?? Cheers.

Thanks for the explanation! That sounds very complicated and explains why the viewport preview was removed.

Do you have any idea if there might be ways of implementing this without the need to maintain a custom Blender version? A while ago I thought about using a memory mapped file (if krom would support that) to send the drawn image to Blender but that would probably be still too slow and doesn't solve the other problems (input rerouting, no sound etc.).

The only other way I found out involved pulling pixels out of gpu which is not fast. But in regards to syncing viewport editing, there is an options for that at Armory Project - Live Patch, so maybe improving on that might be worth looking into.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luboslenco picture luboslenco  路  3Comments

mushroomeo picture mushroomeo  路  4Comments

HeadClot picture HeadClot  路  4Comments

HeadClot picture HeadClot  路  3Comments

knowledgenude picture knowledgenude  路  3Comments