PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Tutorial
  • Element Reference
Language basics
  • SKIN
  • DUMMY
  • INCLUDE
  • INCLUDE_ONCE
  • DEFINE
  • UNDEFINE
  • VARIABLE
  • LOCAL_VARIABLE
  • TEMPLATE
  • TEMPLATE_INNER_CONTENT
  • REPEAT
Data model
  • PARAM
  • ACTION
    • Action types
  • ACTION_TRIGGER
  • TIMER
UI Layout and positioning
  • CELL
  • TABLE
UI Widgets
  • CANVAS
    • Graphics API
  • COLOR_SCALE
  • FILE_SELECT_MENU
  • GRID
  • INVISIBLE_PARAM_MENU_BUTTON
  • MENU_ITEM
  • MENU_SEPARATOR
  • POPUP_MENU
  • svg
  • RULER
  • TEXT
  • TEXT_FIELD
  • TEXT_EDIT_BOX
  • XY_PARAM_PAD
  • XY_ZOOM_SELECT_PAD
  • XYZ_PARAM_SCRATCH_PAD
  • XYZ_PARAM_CLICK_PAD
  • XYZ_IMAGE_PARAM_JOYSTICK
UI 3D Objects
  • COLOR_SURFACE_3D
  • GRID_3D
  • GL_OBJECT_3D
Data model commands
  • REQUIRED_OBJECTS
  • EXPOSED_OBJECTS
  • PERSISTENT_OBJECTS
Common attrubutes
  • For all elements
  • Widgets
  • Param Widgets
  • Param Controls
  • Param Info Viewers
  • Text Widgets
  • Surface Viewers
  • Curve Viewers
  • 3D Objects
  • Parameters mapping
  • LetiMix
KUIMLElement ReferenceCOLOR_SURFACE_3D
March 25, 2024

COLOR_SURFACE_3D

This object represents the shape of a surface in a 3D scene with a color scale.

Attributes brief detailed show all inherited

Name DescriptionDefault
low_colorColor for the min value#000000...
high_colorColor for the max value#ffffff...
Name Value type Default Description Comment
low_colorcolor#000000 (black)Color for the min value
high_colorcolor#ffffff (white)Color for the max value

See Attributes Common to 3D Objects. Also, as a surface viewing element, this object shares Attributes Common to Surface Viewers, except the attributes specific to widgets.

Specific Attributes

Examples

Formula Surface

The example below displays a surface defined by a Math Formula and lets the user change several options for the 3D view. 3D renderer characteristics are also displayed:

doc_ref_3d_objects_color_surface_3d_element_example1.png
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <SKIN text_color="#ffffff">

  3. <!-- Custom Viewer definition -->
  4. <DEFINE>
  5. <CUS_3D_VIEWER base_type="VIEW_3D" width="600" height="400" grid.opacity=".8" cursor="system::open_hand"
  6. y_ratio=".8" z_ratio=".5" transform.tz="-1.3" persistent_viewpoint="true" transform.rx="60" transform.rz="20"/>
  7. </DEFINE>

  8. <!-- The formula that defines the surface -->
  9. <FORMULA_SURFACE formula="cos(2*pi*x)*sin(2*pi*y)*sqrt(1-x^2-y^2)" id="my_formula" x_min="-1" x_max="1" x_default="0" y_min="-1" y_max="1" y_default="0" z_min="-1" z_max="1" z_default="0"/>

  10. <!-- Main layout-->
  11. <ROW spacing= "5">
  12. <COLUMN>
  13. <!-- The 3D Viewer -->
  14. <CUS_3D_VIEWER id="3d_view">
  15. <!-- Grid object -->
  16. <GRID_3D id="3d_view.grid" x_param_info_id="my_formula.x_info" y_param_info_id="my_formula.y_info" z_param_info_id="my_formula.z_info"
  17. y_positions_count="11" x_positions_count="11" z_positions_count="11" x_position="-.5" y_position="-.5" z_position="-.5" x_offset=".5" y_offset=".5" z_offset=".5"/>
  18. <!-- The Color surface-->
  19. <COLOR_SURFACE_3D id="3d_view.surface" surface_id="my_formula" visible="true" high_color="#ff0000" low_color="#000001" opacity=".8"
  20. x_positions_count="100" y_positions_count="100" x_offset=".5" y_offset=".5" z_offset=".5" x_position="-.5" y_position="-.5" z_position="-.5"/>
  21. </CUS_3D_VIEWER>
  22. </COLUMN>
  23. <!-- User Controls-->
  24. <COLUMN spacing="20">
  25. <COLUMN spacing="2">
  26. <!-- Select Objects Opacity -->
  27. <TEXT value="Opacity:"/>
  28. <PARAM_TEXT_EDIT_BOX param_id="3d_view.surface.opacity" width="100" background_color="#00000"/>
  29. <PARAM_TEXT_EDIT_BOX param_id="3d_view.grid.opacity" width="100" background_color="#00000"/>
  30. </COLUMN>
  31. <PARAM_TEXT content="3D Style: {text_value}" param_id="3d_view.surface.draw_style" width="100">
  32. <INVISIBLE_PARAM_MENU_BUTTON param_id="3d_view.surface.draw_style" width="100%" height="100%" cursor="system::hand"/>
  33. </PARAM_TEXT>
  34. <!-- Display information about the OpenGL Renderer -->
  35. <COLUMN spacing="2">
  36. <TEXT value="OpenGL Renderer:" />
  37. <TEXT string_id="3d_view.vendor" width="200" height="10" />
  38. <TEXT string_id="3d_view.renderer" width="200" height="10"/>
  39. <TEXT string_id="3d_view.version" width="200" height="10"/>
  40. </COLUMN>
  41. </COLUMN>
  42. </ROW>
  43. </SKIN>

 

2020 - 2025 © Site by LetiMix  |  Plug'n Script and KUIML by Blue Cat Audio