Creating your own glpyhs and reading in elements with different nodes in different fields. Jason Mathews NASA/Goddard Space Flight Center. I got the model from the UK VR-SIG 3D Object Archive

#Example a/biplane. #Loading in your own glyph #Create materials for the wheels and propeller gfx create material wheels ambient 0 0 0 diffuse 0.22 0.28 0.22 emission 0 0 0 specular 1 1 1 alpha 1 shininess 0.84 gfx create material propeller ambient 0.72 0.17 0 diffuse 0.5 0 0 emission 0 0 0 specular 0 0 0 alpha 1 shininess 0 gfx create material plane ambient 0.5 0.8 0.5 diffuse 0.5 0.8 0.0 emission 0 0 0 specular 0.4 0.9 0.0 alpha 1 shininess 0.7 #Read in the wavefront file as a graphics object. If your #wavefront obj file contains material definitions then these #will always override the material selected in the graphical #element. This allows mixed material glyphs which still vary #according to a spectrum. In this example the main body of #the plane is left up to the spectrum but the propeller and #wheels are the same for every plane. gfx read wavefront as biplane $example/biplane.obj #instead you can draw the glyph using static graphic gfx modify g_element "/" point glyph biplane gfx create window hangar #Write out the VRML2 description of the biplane. The scene #parameter allows you to specify a subpart of a scene using #the dot operator to reference components. gfx export vrml file biplane.wrl #Don't draw static graphic version of biplane any more gfx modify g_element "/" point glyph biplane delete #Put the biplane into the glyph object list, if you now draw #node_points or element_points as below or using the #graphical element editor the glyph "biplane" will be available #in the chooser. By choosing the gfx modify glyph biplane material none #Read in the exnode and exelem version of this file #The texture coordinates and coordinates are defined seperately #in the obj format and so each element interpolates different #nodes for each field. Generated from the obj using obj2ex. gfx read nodes $example/biplane.exnode gfx read elements $example/biplane.exelem #Define the lines of the plane as they aren't in the file gfx define faces egroup biplane #View the model gfx modify g_element "/" general clear; gfx modify g_element biplane general clear; gfx modify g_element biplane lines material default; gfx mod win hangar image view_all #Read in the wavefront file as a graphics object at other times gfx read wavefront as biplane $example/biplane2.obj time 1 gfx read wavefront as biplane $example/biplane3.obj time 2 gfx timekeeper default minimum 0 maximum 3 speed 8 skip_frames #Draw points at every node and biplanes at those you have selected #The biplanes are coloured according to the spectrum and the number of #the node they represent. gfx modify spectrum default clear overwrite_colour gfx modify spectrum default linear reverse range 1 900 extend_above extend_below rainbow colour_range 0 1 ambient diffuse component 1 gfx modify g_element biplane node_points glyph point size "0.1*0.1*0.1" centre 0,0,0 select_on material default selected_material default_selected gfx define field plane_direction coordinate_system rectangular_cartesian scale field coordinates scale_factors -1 -1 -1 gfx modify g_element biplane node_points glyph biplane size "0.2*0.2*0.2" centre 0,0,0 orientation plane_direction scale_factors "0*0*0" draw_selected material plane data cmiss_number spectrum default selected_material default_selected #Write out the VRML2 description of the biplane. The scene #parameter allows you to specify a subpart of a scene using #the dot operator to reference components, the subset now #refers to the graphical_element_group. Select just one #node so that vrml2 output isn't too large. gfx select nodes 45 gfx export vrml file biplane2.wrl scene default #Select a few points using the node_tool, #selecting too many will make the model take too long to draw. gfx select nodes 45,48,126,318,329,366,478,492,541,667,745,749 #Set the propellers spinning. gfx timekeeper default play
Name Modified Size
biplane.com 20-Apr-2012 3.8k COPYRIGHT 19-Apr-2012 504 biplane.exelem 20-Apr-2012 267k biplane.exnode 20-Apr-2012 222k biplane.obj 20-Apr-2012 204k biplane2.obj 20-Apr-2012 353k biplane3.obj 20-Apr-2012 354k
Name Modified Size
examples_a_biplane.tar.gz 20-Apr-2012 341k
| Status | Tested | Real time (s) | |
| i686-linux | |||
| cmgui-wx | Success | Wed May 16 00:15:53 2012 | 2 |
| cmgui-wx-debug | Success | Wed May 16 00:13:21 2012 | 2 |
| cmgui-wx-debug-memorycheck | Success | Wed May 16 00:20:08 2012 | 8 |
| cmgui-wx-debug-valgrind | Success | Wed May 16 01:46:08 2012 | 135 |
| x86_64-linux | |||
| cmgui-wx | Success | Wed May 16 00:07:13 2012 | 1 |
| cmgui-wx-debug | Success | Wed May 16 00:07:13 2012 | 1 |
| cmgui-wx-debug-memorycheck | Success | Wed May 16 00:07:15 2012 | 1 |
| cmgui-wx-debug-valgrind | Success | Wed May 16 00:21:14 2012 | 34 |
| cmgui-wx-gcc-cad-debug-valgrind | Success | Wed May 16 00:21:36 2012 | 33 |
| i686-linux | |||
| Success | cmgui-wx: | diff test: no differences with generic answer. | |
| Success | cmgui-wx-debug: | diff test: no differences with generic answer. | |
| Success | cmgui-wx-debug-memorycheck: | diff test: no differences with generic answer. | |
| Success | cmgui-wx-debug-valgrind: | diff test: no differences with generic answer. | |
| x86_64-linux | |||
| Success | cmgui-wx: | diff test: no differences with generic answer. | |
| Success | cmgui-wx-debug: | diff test: no differences with generic answer. | |
| Success | cmgui-wx-debug-memorycheck: | diff test: no differences with generic answer. | |
| Success | cmgui-wx-debug-valgrind: | diff test: no differences with generic answer. |
| i686-linux | |||
| Success | cmgui-wx: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-memorycheck: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-valgrind: | ndiff test: no significant differences with generic answer. | |
| x86_64-linux | |||
| Success | cmgui-wx: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-memorycheck: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-valgrind: | ndiff test: no significant differences with generic answer. |
| i686-linux | |||
| Success | cmgui-wx: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-memorycheck: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-valgrind: | ndiff test: no significant differences with generic answer. | |
| x86_64-linux | |||
| Success | cmgui-wx: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-memorycheck: | ndiff test: no significant differences with generic answer. | |
| Success | cmgui-wx-debug-valgrind: | ndiff test: no significant differences with generic answer. |
Html last generated: Wed May 16 05:57:07 2012
Input last modified: Fri Apr 20 15:56:45 2012