DESCRIPTION

VizzyGL is a set of Vizzy instructions that allows you to draw non-physical graphics in the flight and map views. This is an early preview release, there are still changes and additional features pending before the first official release.

What is VizzyGL For?

The primary use case for VizzyGL is to create visual aids and to visualize mathematical concepts, however there are probably numerous conceivable purposes. The one thing this is not meant to be is a way to dynamically add physical parts to your craft. All of the graphics produced by VizzyGL have collisions disabled and should be thought of as holographic projections.

Programming Interface

Graphics are created by first setting various drawing context properties, such as Color, Rotation, Origin, etc using the Set ... commands. Once settings have been established the graphic can be created using a Draw ... instruction specifying position relative to the origin and a name. The settings on the drawing context are global for the Flight Program, so setting a drawing context property in one thread will affect other threads as well.

After they are created graphics can be updated using the Update Object command. However it is not possible to change a graphic's origin type or target view after it is created.

Graphics can be removed from the scene using the Remove Object instruction.

Instructions

Set Target View

Graphics can be drawn in either the flight view or the map view.

Set Origin Mode

Sets the origin relative to which the object will be positioned. The origin craft can be specified by name or by id. Origin planets should be specified by name.

  • Craft PCI - Relative to the COM of the specified craft in PCI coordinates.
  • Craft Local - Relative to the COM of the specified craft in Craft Local coordinates.
  • Planet PCI - Relative to the specified planet in PCI coordinates.
  • Planet Lat/Lon/ASL - Relative to the specified planet in Latitude, Longitude, and Altitude Above Sea Level

Set Scale

Sets the scale multiplier for the object as a vector. The units of this vector are somewhat arbitrary, and are different in flight view vs. map view. I haven't done the math to figure out what they are.

Set Rotation

Sets the local rotation of the object as a vector containing Euler angles in degrees (for more info see the Unity Documentation)

Set Color

Sets the color of the object as a vector containing RGB values from 0 to 1 (i.e. (1, 0, 0) is bright red, (1, 0, 1) is purple,(0, 0, 0)` is black).

Set Opacity

Sets the opacity of the object as a number from 0 to 1 (0 is fully transparent, 1 is fully opaque).

Draw Object

Draws the object using the current set of drawing context properties (any subsequent change to the drawing context properties will have no effect). Only one graphic can exist with a given name, so if you create another graphic with the same name the previous graphic will be removed automatically.

Update Object

Updates one of the properties of the specified object. See the Set ... instructions above for the descriptions of each property.

Remove Object

Removes the specified object.

GENERAL INFO

  • Mod Version: v0.2-preview1
  • Required SR2 Version: 0.9.50x.x
  • Published: 8/15/2020
  • Downloads: 447

DOWNLOADS

TAGS


Comments

  • Log in to leave a comment
  • Profile image
    83 bspawn

    There appears to be a bug with VizzyGL in the latest version of SR2:
    The rotation of objects is not updating correctly.
    How to reproduce: put the example craft on the launchpad and fast-forward. Same thing happens more slowly during normal gameplay.
    edit: Or the bug is in the script that comes with the example craft...

    4 days ago
  • Profile image

    Thanks, your mod is really interesting. I discovered something for sprites.

    Example:
    load the sprite: "https://freepngimg.com/thumb/arrow/2-2-arrow-png-pic.png"
    set the color: "(0,0,0)"
    set the opacity: "1"
    ...
    the png (arrow) is good, you just need to compensate for the offset and rotation

    3 months ago
  • Profile image
    Mod sflanker

    @SpaceHazards Here is an example craft that uses cylinders as I suggested. Designed to work with PCI vectors.

    3 months ago
  • Profile image
    Mod sflanker

    @SpaceHazards I've been meaning to add this functionality for a while but I haven't gotten to it. In theory you can use a cylinder to do this, but it's a little bit tricky to get the orientation right.

    3 months ago
  • Profile image

    it is possible to draw an arrow to visualize the vectors ?

    3 months ago
  • Profile image
    Mod sflanker

    For anybody who was having trouble with this mod on recent versions I have just updated it to work with SimpleRockets 0.9.508. The latest version of the mod is now v0.4

    4 months ago
  • Profile image
    Mod sflanker

    @Lolz2020 I cannot. Here's why.

    +2 7 months ago
  • Profile image

    @sflanker could u make a version of this mod on mobile

    7 months ago
  • Profile image
    Mod sflanker

    New Update: Drawing Sprites! Support for lat/lon/AGL (previously only supported Altitude Above Sea Level).

    +2 8 months ago
  • Profile image
    Mod sflanker

    @Gamekidbunny7 I'm not sure quite what you mean. This is an extension to Vizzy which is built into the game and I believe was inspired by the programming system Scratch.

    8 months ago
  • Profile image

    This is from scratch

    8 months ago
  • Profile image
    20.9k crazydl

    cool

    8 months ago
  • Profile image
    255 Yaboiadi

    Thanks for upvoting my craft man

    8 months ago
  • Profile image
    1,119 Marssmmm

    Thank you

    8 months ago
  • Profile image
    Mod sflanker

    @Marssmmm totally unrelated to this mod, but yes. Once two craft become docked they turn into a single craft, so flight programs running on what were previously two separate craft should be able to exchange messages.

    8 months ago
  • Profile image
    1,119 Marssmmm

    @sflanker if you broadcast a message with a docked craft will the docked craft receive the message

    8 months ago
  • Profile image
    Mod sflanker

    @WNP78 I just want to see a software mutex implementation in Vizzy, so I provided motivation.

    8 months ago
  • Profile image
    Dev WNP78

    @McDuetchVan Just a coding term. Since you set things up by telling it what settings to apply and then adding the object, if two separate vizzy code blocks try to create an object at the same time, the settings from one thread could override the settings from the other thread.

    8 months ago
  • Profile image
    Mod sflanker

    @McDuetchVan 😂 Funny, but if you consider causing the game to freeze or crash "dangerous" then yes, not having thread "safety" could be bad. Fortunately I double checked my code and I do not believe there is any chance of a deadlock or crash resulting from multiple threads calling VizzyGL instructions simultaneously.

    +1 8 months ago
  • Profile image
    7,582 McDuetchVan

    @WNP78 is there such thing as a dangerous thread?

    8 months ago
  • Profile image
    Mod sflanker

    @WereOutOfNames the graphics have no drag or mass.

    8 months ago
  • Profile image

    Does it have drag or mass enabled? I presume no, but you said they had collisions disabled and that they should be thought of as holograms, but you didn’t mention drag or mass. You most likely disabled them, but I just want to make sure.

    8 months ago
  • Profile image
    11.9k seventeen

    @WNP78 as a 14 year old person I know little to nothing about programming. I am currently learning python so hopefully in the near future I’ll be able to answer your question/other questions I currently don’t understand

    8 months ago
  • Profile image
    2,310 zzazza

    Nice mod, will be useful to show transfer window in the map.

    8 months ago
  • Profile image
    5,597 s5ehfr9

    So... anyone wants to make a real HUD out of this? I'm in for sure.

    +1 8 months ago
  • Log in to see more comments

39 Upvotes

Log in in to upvote this post.