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 Juno: New Origins Version: 0.9.50x.x
  • Published: 8/15/2020
  • Downloads: 1309

DOWNLOADS

TAGS


Comments

  • Log in to leave a comment
  • Profile image

    I don't seem to be able to get the "Planet Lat/Long/ASL" or "Planet Lat/Long/AGL" origins to work. If I set the origin to one of these and then draw, the shape always appears at the point where my craft was launched, regardless of what offset I specify.

    3 months ago
  • Profile image

    Firstly, just want to say thank you for creating this mod; without it, debugging my orbital trajectory calculations would be an infinitely more painful process. But in using this to draw orbital lines (as a bunch of cylinders), I noticed there are some fairly significant z-sorting issues. Namely, if I draw a cylinder inside of the radius of a sphere, even if it is fully enclosed by the sphere, if the cylinder is closer, it will be drawn on top of the sphere.

    1.7 years ago
  • Profile image
    Mod sflanker

    This is my mod. The source code link goes to my GitHub repo. I’m not aware of this functionality being available in the game. This mod draws 3D shapes, unlike the 2D MFD capabilities that are now built in.

    +1 2.9 years ago
  • Profile image

    I'm trying to find out who's code this belongs to so I can ask permission because the code can now be slapped on to anything and I think no longer requires mod. I'm uploading the craft soon to see if it auto responds to give credit.

    2.9 years ago
  • Profile image
    235 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...

    +1 3.5 years 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.8 years ago
  • Profile image
    Mod sflanker

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

    3.8 years 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.8 years ago
  • Profile image

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

    3.8 years 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

    3.9 years ago
  • Profile image
    Mod sflanker

    @Lolz2020 I cannot. Here's why.

    +2 4.1 years ago
  • Profile image

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

    4.1 years ago
  • Profile image
    Mod sflanker

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

    +2 4.2 years 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.

    4.2 years ago
  • Profile image

    This is from scratch

    4.2 years ago
  • Profile image
    39.9k crazydl

    cool

    4.2 years ago
  • Profile image
    255 Yaboiadi

    Thanks for upvoting my craft man

    4.2 years ago
  • Profile image
    1,666 Marssmmm

    Thank you

    4.3 years 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.

    4.3 years ago
  • Profile image
    1,666 Marssmmm

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

    4.3 years ago
  • Profile image
    Mod sflanker

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

    4.3 years 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.

    4.3 years 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 4.3 years ago
  • Profile image
    8,542 McDuetchVan

    @WNP78 is there such thing as a dangerous thread?

    4.3 years ago
  • Profile image
    Mod sflanker

    @WereOutOfNames the graphics have no drag or mass.

    4.3 years ago
  • Log in to see more comments

41 Upvotes

Log in in to upvote this post.