Space Engineers

Space Engineers

3D Ship Projection
447 Comments
Hektor Riven 5 Apr @ 12:47pm 
I see none answered to Fallenq. I had the same issue but easily solved it by reducing the following values, from their default 49,000 to 10,000:

const int MaxInstructions_Render = 10000;
const int MaxInstructions_Scan = 10000;

The refresh rate is very low: once every few seconds, and not regular, but it's perfect as one doesn't need to check twice per second if the ship gets damaged, plus is much less performance consuming!
PimpMyDog 2 Mar @ 7:03am 
Hi is it possible to somehow use this script's functionalities to find out where do I have heavy armor blocks in my grid? Even if I have to modify the script. Initially I built my plane with heavy armor blocks but when it was almost ready I instantly regretted it lol then I started to replace the heavy blocks one by one to light armor blocks but the grid is still weighing absurdly much so there still has to be some remnant heavies hiding somewhere. Tons of effort have gone into this massive contraption so I don't want to just start anew.
anrew10 17 Aug, 2023 @ 8:39pm 
Currently only able to see the 3D/Menu/ LCD, and no matter what i do to the 3D/0,0/ LCD nothing is showing even when i turn it specifically to text
BigErn77 27 Jun, 2023 @ 7:33pm 
No longer works with Digi's Control Module.
Fallenq 12 Nov, 2022 @ 2:55am 
The script is too complex how to fix this?
lolomot 9 Nov, 2022 @ 8:34am 
Is there a limit on how big a grid can be?
Georgik  [author] 28 Feb, 2022 @ 1:53am 
@Eisenwolf not currently, but you should be able to fix it locally by changing line 197 replacing
`b.CubeGrid == program.Me.CubeGrid` with `b.IsSameConstructAs(program.Me)`
Eisenwolf 28 Feb, 2022 @ 1:32am 
Is it possible to put the PB on the maingrid and the LCD on a subgrid (hinge or rotor)?
Georgik  [author] 8 Nov, 2021 @ 6:32am 
It is mentioned in Additional notes
KotiKat 8 Nov, 2021 @ 5:35am 
Hai i wanna change the destroyed block color to yellow or something like that where in the script can i change the color?
cheerkin 5 May, 2021 @ 11:48am 
That makes perfect sense, thanks. I'll figure out further on my own.
Georgik  [author] 5 May, 2021 @ 10:12am 
Yes, I've made myself a renderer class obtaining list of vertices, triangle structs connecting the vertices. It then applies all the transformations and color shadings. Most important is the idea that any triangle can be drawn using 2 right triangles. (So in my case all triangles given to renderer result in 2 sprites drawn)
cheerkin 5 May, 2021 @ 8:04am 
Yeah computation cost is just through the roof here. And so does traffic (I have strong suspicion that sprites are synced in form of just sending SVG xml lol).

So you actually managed to shade polys using just sprite API triangles in an efficient way?
Georgik  [author] 5 May, 2021 @ 7:19am 
Nice. I made this script far before the sprites API was introduced, I actually tried reimplementing this using sprites, and it works but some clever algorithms (merging multiple rectangles on a same level into a single one to reduce computation cost and sprite count) turned out to have major drawbacks because of rendering using whole triangle sprites and not rasterization. I haven't touched it since then, didn't do any user configuration etc. If you really wanted, I could share it with you to have a peek inside.
cheerkin 3 May, 2021 @ 2:26pm 
I just had the same concept dusting for years and today stumbled upon your implementation. Looks cool. I went sprite api route and still have no idea how to do shading in a friendly way, ended up just rendering a convex-hull wireframe representation of grid, which isn't too accurate obviously)
cheerkin 3 May, 2021 @ 2:22pm 
I see. And how large a grid can be till you hit the 50K counter limit?
Georgik  [author] 3 May, 2021 @ 2:06pm 
Realtime, there are many parameters which can change during presentation which can invalidate the precomputed state
cheerkin 3 May, 2021 @ 1:53pm 
Do you pre-compute your frames or render in real-time?
Stale Baguette 2 Mar, 2021 @ 11:13am 
for cockpits
Stale Baguette 2 Mar, 2021 @ 11:13am 
how can i change the size of the text
Georgik  [author] 22 Jan, 2021 @ 12:31am 
In menu, set "Ship refresh rate" to max value and try again.
See Additional notes in the description for details
KilledJoy 21 Jan, 2021 @ 11:10pm 
Same issue as most people ive tried 3D// ive tried, 3D/0,0/, ive tried setting it to "text" and setting it to monospace, ive tried setting it to show script just because and still nothing. Theres a bug somewhere because its working on fresh new grids but not on the grid i have made. No other scripts are running on it. Can make it work on fresh grids but not this grid.

https://steamproxy.net/sharedfiles/filedetails/?id=2004897762
xXZer0c0oLXx 20 Aug, 2020 @ 3:26pm 
when i try this with a wide screen,half of it gets cut off
Alex 20 Jul, 2020 @ 8:43pm 
How do you use multiple screens showing different things? I've tried multiple instances of the script, but then, each screen switches between the two views. Thanks in advance!
Georgik  [author] 7 Jul, 2020 @ 1:19am 
Try first on grid with small amount of blocks. If that works, for large grid see my previous comment
Twiz 6 Jul, 2020 @ 11:38am 
K so I mess around with scripts alot but I've done everything in this script. Tried it multiple times now on different grids. Followed the instructions exactly. And I cannot get it to display anything on any display no matter what I do...the PB is running, the Menu works, but I can't any LCDs to display anything with the 3D// tag or any variations I've tried. I have no idea what I'm doing wrong.
La Kato 5 Jun, 2020 @ 10:56am 
Thank You! That worked perfectly!
Georgik  [author] 5 Jun, 2020 @ 8:35am 
I'm afraid you can't render just part of big grids (except rendering only certain subgrids)
According to this note "if you set Ship refresh rate to lower value than the ship scanning actually take, it will lock the script to only scanning ship without rendering results.", have you tried increasing Ship refresh rate to max possible value?
La Kato 5 Jun, 2020 @ 12:07am 
Is there a way to apply this script to larger grids? such as focusing on smaller segments of the grid? because grids over ~14k blocks wont project
dantevalentinop 21 May, 2020 @ 11:31pm 
someone should make a script similar to this but with the projection table block
ZettDeEff 9 May, 2020 @ 10:33am 
Works fine. Love it ! Thx!
GodsBadAssBlade 28 Feb, 2020 @ 5:29pm 
Ok. so I ignored the warning of only using it for single player. please save yourself the headache. other than that it works great!
big_blue_4101 10 Feb, 2020 @ 2:31pm 
ok. do two program blocks with both running this script.
Georgik  [author] 10 Feb, 2020 @ 3:27am 
@big_blue_4101
You need two instances of the script to do that.
big_blue_4101 5 Feb, 2020 @ 8:34pm 
how can i set up my lcd so that i view my ship at one angle on one lcd and a different angle on another?
if this text doesn`t change, it is possible that this script is not running
༼ つ ◕_◕ ༽つ 24 Dec, 2019 @ 4:31am 
So a solution, could be to run another pb with the script??
Georgik  [author] 24 Dec, 2019 @ 3:18am 
No, that is unfortunately not possible without another instance of the script
༼ つ ◕_◕ ༽つ 23 Dec, 2019 @ 3:31pm 
Hey I love the script but i have a littel problem.
I have i wall with lcd's that shows the ship but i want to have the same on a Control seat with the menu, but what ever i try like 3D//; 3D/Menu/ or 3D/0,0/; -||- i just shows me the corner i understand why it does so when i tipe the 3D/0,0/ but is there a way to get it all on one lcd screen and still have it on my "big screen"??
Georgik  [author] 30 Nov, 2019 @ 2:20am 
@anzellott Setup buttons as described.
Add 3D/Menu/ to a name of the LCD.
Press 'menu' button (run the PB with 'menu' argument), then the menu should show up
You navigate in it using other buttons
anzellott 29 Nov, 2019 @ 6:24am 
can you please elaborate the setup of the menu without the use of digi's control module? i have been trying to setup the buttons but its like information is missing!
anrew10 6 Aug, 2019 @ 10:00am 
I’m attempting to use small ship blocks in my larg ship attached by rotor, the LCDs I place on the bridge hud won’t work, any suggestions?

(I have the LCDS on two micro rotors suspended from the ceiling so they can fold up)
Georgik  [author] 22 Jun, 2019 @ 1:40pm 
Translation X/Y/Z in the menu
Mozetronick 22 Jun, 2019 @ 12:11pm 
How I can move my building more left on the screen? Adding 1 or 2 move it only left and up
Feuerspucker 14 May, 2019 @ 10:25am 
20000 worked.
Georgik  [author] 12 May, 2019 @ 6:38am 
Try lowering ASCS instruction limits inside code, for example to 40000
Feuerspucker 12 May, 2019 @ 4:30am 
Ive got another problem. I have to recompile it all the time.
It says Script execution stopped. Script is too complex. please edit and rebuild the script.
Georgik  [author] 10 May, 2019 @ 9:41am 
It should cap how often screen is rerendered. if you set it e.g. to 200, that means that it won't update faster than once per 200 ticks (3.33 seconds)
Feuerspucker 10 May, 2019 @ 8:01am 
How does the Screen refresh rate in parameter menu work?
R E D L I N E 2 May, 2019 @ 11:09pm 
Works perfectly, thanks!