WHAT IS
3D RAD?
CLICK HERE
TO FIND OUT!


ValuePrint


With this object you can display the internal parameters of any object, or a variable from a script. Digit size, color, transparency, screen location and format are definable.


USAGE

Add the ValuePrint object to your project and link it to the object you want to read the values from.

If the ValuePrint object is also linked to a camera, run-time it will be rendered into the viewport for that camera only. This is typically useful when you add split-screen functionality to your projects.

You link objects together in the Object List (left side of 3D Rad main screen), by selecting an object and then checking the other objects you want to link to it.

To configure the ValuePrint object, double-click it in the Object List to open the following property dialog:



Text width & height

Any size is allowed for the digits, but values bigger than 2.0 may affect rendering quality.

NOTE: don't forget that you can visually set the digits location by clicking and dragging the mouse in the Virtual Editor window, without opening the property dialog every time.

Text's screen location

The screen center is at 0,0. Left/right margins are at -16 and 16. Top/bottom margins are at 12 and -12.

NOTE: don't forget that you can visually set the digits size by right-clicking and dragging the mouse in the Virtual Editor window, without opening the property dialog every time (you can stretch the digits by right-clicking and dragging while holding the [Ctrl] key pressed).

Text color & opacity

Click the color button to open the color picker. Opacity must be between 0.0 (invisible) and 1.0 (fully visible).

Format string

This string specifies the visualization format of the printed value. Examples:

  • %.0f - any number of digits for the integer part, zero digits for the fraction part (e.g. 1321)


  • %3.0f - at least 3 digits for the integer part, zero digits for the fraction part (e.g. 321)


  • %2.3f - at least 2 digits for the integer part, 3 digits for the fraction part (e.g. 32.731)


  • %05.1f - at least 5 digits for the integer part, 1 digit for the fraction part. If the integer part has less than 5 digits, missing spaces are filled with zero's (e.g. 00321.3)


  • %f - any number of digits for the integer part and up to six digits for the fraction part (e.g. 1501.540)


  • %g - any number of digits for the integer part and for the fraction part (e.g. 1501.54)


  • %.0f%% - any number of digits for the integer part, zero digits for the fraction part. Also append a percent-symbol (%) to the value (e.g. 77%)


  • Value range

    Before printing, the source value can be clamped or wrapped within a specified range. For example, if the source value is 48 and the range is 50,100, in clamp-mode the printed value is 50 and in wrap mode it is 98.

    Value interpolation range

    Before printing, the source value can be transformed by using two interpolation values as reference. Examples:

  • Interpolation range is 0,100: the source value is printed as zero when it is zero and as 100 when it is 1. Intermediate source values produce intermediate printed values (e.g. source = 0.5, printed value = 50)


  • Interpolation range is 150,200: the source value is printed as 150 when it is zero and as 200 when it is 1. Intermediate source values produce intermediate printed values (e.g. source = 0.5, printed value = 175)


  • Interpolation range is -1,1: the source value is printed as -1 when it is zero and as 1 when it is 1. Intermediate source values produce intermediate printed values (e.g. source = 0.5, printed value = 0)


  • Interpolation range is 10,-20: the source value is printed as 10 when it is zero and as -20 when it is 1. Intermediate source values produce intermediate printed values (e.g. source = 0.5, printed value = -5)


  • Interpolation range is 0,1: the source value is printed as is (no transformation)


  • Relationships

    This list defines how the ValuePrint object relates to the object linked to it. The following relationship types are supported:

  • IGNORE. Do nothing.


  • [parameter] is the value to PRINT. Print the specified internal value of the linked object.

    Please see linked object's documentation (INTERNAL PARAMETERS section) for details on the internal parameters it supports.

    Visible at start

    Whether to show the printed value when the project is run. If this option is unchecked, you will have to link this object to an event object like for example EventTimer in order to visualize it.

    For information about the remaining controls, please click here.



    ADDING YOUR OWN FONTS

    The first step is duplicating the

    C:\3D Rad\3DRad_res\
    objects\ValuePrint\data\default


    folder. Give the cloned folder a proper name (eg MyFont).

    Duplicate the

    C:\3D Rad\3DRad_res\
    objects\ValuePrint\data\index\default.jpg


    file and give it the same name as the cloned folder (eg MyFont.jpg).

    Open the existing fonts.dds file in the

    C:\3D Rad\3DRad_res\
    objects\ValuePrint\data\MyFont


    folder, by using any paint software supporting the .dds file format.

    Modify the character images and save the .dds file back.

    In the property dialog for the ValuePrint object you can now click the Change button and double click the new skybox thumbnail.

    The .wid file in the data folder specifies the relative width of each character in the set. You can use a text editor to adjust the values for your custom font.

    For advanced modifications, please keep in mind that the .x files in the data folder can also be edited. They are 3d models (simple quads really) that use the fonts.dds file as texture.

    You can replace them with any other 3d model in .x file format, as long as they all use the fonts.dds texture.

    You can remove the .x files belonging to characters that are not present in your custom font. This will make font loading faster for your 3D Rad projects.


    INTERNAL PARAMETERS


    The following internal parameters can be accessed by using event objects like EventOnValue or Script:

  • Displayed value (read only)
  • Opacity, between 0 and 1