Wednesday, February 20, 2013

MAX: exporter defaults and docs

Very useful page.
http://sourceforge.net/apps/mediawiki/osgmaxexp/index.php?title=Documentation


 Using the OSG Max Exporter Plugin

From within 3D Studio you can use several ways to start the plugin;

    Select More... on the Utilities pane and choose the OSG Export toolbar. The toolbar will appear and the export function are available through it.
    Choose Export from the File menu and choose OpenSceneGraph Exporter (*.IVE, *.OSGB, *.OSGT, *.OSG) as file type (typing the extension specifies which one will be used). This will open a dialog box with export options.
    The Helpers are available from the Helpers section on the Create pane, by selecting the OpenSceneGraph drop-down item.

The OSG Exporter Toolbar

image:Toolbar.png

image:Toolbar1.png Export the whole scene and preview it in Max
image:Toolbar2.png Export the selected objects and preview in Max
image:Toolbar3.png Export the file as an .OSG-file (to default export-folder)
image:Toolbar4.png Export the file as an .IVE-file (to default export-folder)
image:Toolbar5.png Set the options for exporting
image:Toolbar6.png About the plugin
Exporting files

Warning: When you work with Groups in MAX, make sure they are all closed before you export, otherwise these objects will not appear in the .
Supported Formats

    osgb: The preferred format for newer OSG versions. This is a binary format which means it will load very quickly and supports embedded image data within the file.
    osgt: This is a text based format, which means it will take longer to load. However, the benefit of this format is that it can be opened and modified within a simple text editor.
    ive: The legacy binary format. Only use this format if your version of OSG does not support the newer osgb format.
    osg: The legacy text format. Only use this format if your version of OSG does not support the newer osgt format.

Limitations

Not everything modelled in 3D Studio can be exported flawlessly to an OSG-file. Below is a list of things that might prove impossible to export and some suggesting to make them work anyway.

    Animated modifiers: use an OSG Sequence Helper to make this work. Otherwise the animation behaviour of the objects may be unpredictable.
    Some Space Warps
    Particle Systems?: only simple ones can be exported without a problem. For complex Particle Systems? the use of an OSG Sequence could also be an option.
    The AEC Exteneded geometrical object could pose a problem. So far it turns out that the Foliage-objects (trees, shrubs and other items) are not exported very well, supposedly due to the large number of very small objects which the viewer will cull.

Export options

When you've selected a file type you will be presented with a large scrollable dialog box, with the following panel sections:
(Note: This dialog can be accessed directly form the OSG Exporter Toolbar)
Output

image:Export_output.png

    Save File: If you uncheck this option, no copy of your file will be saved to disk. This can be useful if you only want to Quick View your scene.
    Embed image data in binary files: When exporting to a binary format (i.e. ive/osgb), store the image data within the file. When using this option it is not necessary to save out the texture images. This option will generally help speed up load times. However, if you use the same image across multiple models, then this option will prevent the image to be cached and shared by OSG.
    Save Texture Images: This option should be checked when exporting to a text format (i.e. osg/osgt) or not embedding image data. The texture images will be saved in an “images” directory in the same directory as the exported file.
    Quick View Scene: This will create a small preview window within 3D Studio MAX. Take care when selecting these options, since it might cause some unstability and you might have to reset 3D Studio.

Export Objects

image:Export_objects.png

    Geometry: Export vertices/polygons of geometry objects
    Materials: Export materials as osg::StateSet objects
    Textures: Export material maps as osg::Texture objects
    Cameras: Export camera objects as osg::PositionAttitudeTransform nodes
    Lights: Export light objects as osg::LightSource nodes
    Hidden Nodes: Export hidden nodes
    Animations: Export key frame animations as osg::AnimationPath objects
    Helpers: Export OSG helper nodes
    Point Helpers: Export point helper nodes
    Particles: Export particles as osgParticle::ParticleSystem objects

Geometry State

image:Export_geometry.png

    Texture Coordinates: Export texture coordinates of geometry
    Vertex Normals: Export per-vertex normals of geometry
    Vertex Colors: Export per-vertex colors of geometry
    Use Indices: Render geometry using vertex indices
    Normalize Normals: Normalize vertex normals by enabling GL_NORMALIZE flag
    Turn off Lighting: Turn off lighting by disabling GL_LIGHTING flag

Maps

image:Export_maps.png

    Diffuse: Export diffuse maps of standard materials
    Self-Illumination: Export self-illumination maps of standard materials
    Reflection: Export reflection maps of standard materials
    Opacity: Export opacity maps of standard materials
    Specular: Export specular maps of standard materials
    Bump: Export bump maps of standard materials
    Glossiness: Export glossiness maps of standard materials
    Specular Level: Export specular level maps of standard materials
    Refraction: Export refraction maps of standard materials
    Displacement: Export displacement maps of standard materials
    Ambient: Export ambient maps of standard materials
    Filter Color: Export filter color maps of standard materials

Material State

image:Export_material.png

    Auto alpha blending for textures with alpha: Automatically enabling alpha blending on materials which contain an alpha texture. This will add an osg::BlendFunc attribute to the osg::StateSet and apply the osg::StateSet::TRANSPARENT_BIN rendering hint.
    Automatic 2-sided lighting for 2-sided materials: Applies an osg::LightModel attribute to the osg::StateSet with the two-side flag enabled.
    Set Diffuse color to white when 100% textured: Set the osg::Material diffuse color to white when a diffuse map is present.
    Set Self Illumination on baked shell materials: Disable GL_LIGHTING on shell materials
    Self-Illumination scale: When a self-illumination map is present, apply the given RGB scale to the osg::TexEnvCombine attribute
    Export Unknown Maps: Convert unknown texture maps to standard bitmaps and export them
    Export Material Description: Adds a description string to the root node describing each material in the model. The description string format is as follows:

# osgmaxexp material data
Name <MaterialName>
Map <MapTypeName> <Unit> <BlendAmount> <Filename> <UVMapping>
Normal <Unit> <Amount> <MethodName> <FlipRed> <FlipGreen> <SwapRedGreen>
Cube <Unit>

    Note: All fields are separated by a tab character, \t

        Name:
            <MaterialName> - Name of the material, which is also assigned to the name of the corresponding osg::StateSet object
        Map:
            <MapTypeName> - Name of the map type. One of the following:
                Ambient
                Diffuse
                Specular
                Glossiness
                Specular Level
                Self-Illumination
                Opacity
                Filter Color
                Bump
                Reflection
                Refraction
                Displacement
            <Unit> - The texture unit of the map in the osg::StateSet object
            <BlendAmount> - The blend amount specified in standard material
            <Filename> - The filename associated with the texture map
            <UVMapping> - The UV mapping mode. One of the following:
                UVMAP_EXPLICIT
                UVMAP_SPHERE_ENV
                UVMAP_CYL_ENV
                UVMAP_SHRINK_ENV
                UVMAP_SCREEN_ENV
        Normal
            <Unit> - The texture unit of the normal map in the osg::StateSet object
            <Amount> - The bump amount
            <MethodName> - The normal map method: One of the following:
                Tangent
                Local XYZ
                Screen
                World
            <FlipRed> - 0 or 1 indicating whether the red channel is flipped
            <FlipGreen> - 0 or 1 indicating whether the green channel is flipped
            <SwapRedGreen> - 0 or 1 indicating whether the red and green channels are swapped
        Cube
            <Unit> - The texture unit of the cube map in the osg::StateSet object

Texture State

image:Export_texture.png

    Use Original Texture Files: This option can be used to let the exported file reference the original textures used in the model instead of exporting the textures to the predetermined format. You must also disable the Save Texture Images option.
    Allow non-power-of-two: Allow OSG to load non-power-of-two sized images
    Free image memory after load: Tells OSG to release the image data after uploading it to the GPU. This will help reduce memory usage of your application. However, if you need to access the image data during runtime, then disable this option.
    Preserve DDS image contents: If the original texture file is a DDS image, then preserve the entire contents of the image when exporting. This allows exporting images with custom mipmaps or non-standard pixel formats.
    Texture format: The file format to use when writing out textures. If jpg format is used and the texture contains alpha, then the png format will be used instead.
    Texture compression: The texture compression format to use. Enabling texture compression can save GPU memory. However, the compression is lossy, so it will introduce some compression artifacts. When compression is enabled and images are being embedded within binary files, the exporter will pre-compress the image and save the compressed data within the file. This will reduce the exported file size and speed up load time of the texture.
    Anisotropic Filtering: The anisotropic filtering level to apply to textures. Anisotropic filtering enhances the quality of textures when viewed at oblique angles. Higher anisotropic levels will give better image quality, but will require more computation power.
    Texture clamp mode: The wrap mode to use for clamped textures. Can be CLAMP_TO_BORDER, CLAMP_TO_EDGE, or CLAMP.

Optimize

image:Export_optimize.png

    Tri Strip Geometry: Convert Geometry surface primitives into tri strips.
    Merge Geometry:
    Check Geometry:
    Make Fast Geometry:
    Merge Geodes: Combine geodes
    Index Mesh: Convert geometry that uses DrawArrays to DrawElements i.e., construct a real mesh. This removes duplicate vertices.
    Vertex Post Transform: Optimize the triangle order in a mesh for best use of the GPU's post-transform cache.
    Vertex Pre Transform: Optimize the use of the GPU pre-transform cache by arranging vertex attributes in the order they are used.
    Flatten Static Transform: Flatten Static Transform nodes by applying their transform to the geometry on the leaves of the scene graph, then removing the now redundant transforms. Static transformed Subgraphs that have multiple parental paths above them are not flattened.
    Share Duplicate States: Optimize State in the scene graph by removing duplicate state, replacing it with shared instances, both for StateAttributes, and whole StateSets.
    Spatialize Groups: Spatialize scene into a balanced quad/oct tree.
    Remove Redundant Nodes: Remove rendundant nodes, such as groups with one single child.
    Copy Shared Nodes: Copy any shared subgraphs, enabling flattening of static transforms.
    Static Object Detection: Optimize the setting of StateSet and Geometry objects in scene so that they have a STATIC DataVariance when they don't have any callbacks associated with them.
    Combine Adjacent LODs: Optimize the LOD groups, by combining adjacent LOD's which have complementary ranges.
    Flatten Billboards: Flatten MatrixTransform/Billboard pairs.

Miscellaneous

image:Export_misc.png

    Show Error Messages: Turn this on to get some feedback about the conversion progress.
    Use Default Node Mask: The default node mask value will be applied to all nodes for which no value is specified (for instance in a OSG NodeMask Helper).
    Convert units to: The units to convert the model to before saving, or No Conversion to use the units specified in Max.
    Export animations over individual time range: When enabled, animation paths will be exported over their individual time ranges, instead of the overall time range of the model. This allows exporting animations with different durations.

Using the OSG Helpers

The OSG Exporter comes with 11 Helper objects:
image:helpers.png

    Billboard
    DOF Transform
    Sequence
    Switch
    Occluder
    Group
    StateSet
    LOD
    NodeMask
    Imposter
    Visibility Group

setup VPN


Example use of a VPN Tunnel
http://en.wikipedia.org/wiki/Virtual_private_network

Youtube video.
http://www.youtube.com/watch?v=1s5JxMG06L4



http://www.lifehacker.com.au/2012/04/how-to-build-your-own-vpn/
and VPN app.
https://secure.logmein.com/products/hamachi/default.aspx

and.. one more.
http://www.vpnaccounts.com/windows-7.html#

Tuesday, February 19, 2013

Max: shortcuts.


http://forum.train2game.com/showthread.php/2885-3ds-Max-Shortcut-Keys



General User Interface

New scene: CTRL+N
Help: F1
Shade Selected Faces (Toggle on/off): F2
Wireframe/Smooth & Highlights (toggle view): F3
View Edged Faces(toggle on/off): F4
Selection Lock(toggle on/off): Space
Select(and cycle through Selection Region types): Q
Add to Selection: CTRL+LMB
Remove from Selection: ALT+LMB
Move: W
Rotate: E
Scale(and cycle through scale types): R or CTRL+E
Top View: T
Bottom View: B
Left View: L
Front View: F
Isometric User View: U
Perspective User View: P
Camera View: C
Spot/Directional Light View: Shift+4
color=orange]Hide Grids(toggle on/off): G
Snaps(toggle on/off): S
Angle Snap(toggle on/off): A
Percent Snap(toggle on/off): CTRL+SHIFT+P
Create Camera From (Perspective) View: CTRL+C
Restrict Movement Along Specific Axis: F5-F7
Restrict Plane Cycle: F8
Render Last: F9
Quick Render: SHIFT+Q
Render Scene Dialogue(toggle on/off): F10
Render To Texture Dialogue(toggle on/off): 0(Zero)
Material Editor(toggle on/off): M
Particle View(toggle on/off): 6
Environmental and Effects Dialogue(toggle on/off): 8
Open Advanced Lighting Panel: 9
Open MAXScript Listener: F11
Open Last Used Explorer: ALT+CTRL+Q
Isolate Selection: ALT+Q
Maximise Viewport(toggle on/off): ALT+W
Place Highlight: CTRL+H
Select By Name/Select From Scene: H
Select All: CTRL+A
Select None: CTRL+D
Select Invert: CTRL+I
Select Ancestor: Page Up
Select Child: Page Down
Clone: CTRL+V
Adaptive Degradation(toggle on/off): O(Letter)
Expert Mode(toggle on/off): CTRL+X
Zoom Mode: ALT+Z
Zoom Extents(single Viewport): CTRL+ALT+Z
Zoom Extents(all Viewports): CTRL+SHIFT+Z
Zoom Selected(all Viewports): Z
Pan: Middle Mouse Button
Pan Viewport: I
Zoom: Dial MMB(scrolling mouse) or CTRL+ALT+MMB
Zoom Viewport In: [
Zoom Viewport Out: ]
Arc Rotate View Mode: ALT+MMB or CTRL+R
Undo Scene Operation: CTRL+Z
Redo Scene Operation: CTL+Y
Show Safeframes(toggle on/off): SHIFT+F
Show Statistics(toggle on/off): 7
Auto Key Mode(toggle on/off): N
Hide Cameras(toggle on/off): SHIFT+C
Hide Geometry(toggle on/off): SHIFT+G
Hide Helpers(toggle on/off): SHIFT+H
Hide Lights(toggle on/off): SHIFT+L
Hide Particle Systems(toggle on/off): SHIFT+P
Hide Shapes(toggle on/off): SHIFT+S
Hide Space Warps(toggle on/off): SHIFT+W
Hold: ALT+CTRL+H
Display As See-Through(toggle on/off): ALT+X
Play Animation: /
Sub-Object Level 1-5: 1/2/3/4/5
Sub-Object Level Cycle: Insert
Show Main Toolbar(toggle on/off): ALT+6

Editable Poly

Vertex Level: 1
Edge Level: 2
Boarder Level: 3
Poly Level: 4
Element Level: 5
Cycle Levels: Insert
Extrude Mode: Shift+E
Bevel Mode: CTRL+SHIFT+B
Chamfer Mode: CTRL+SHIFT+C
Connect: CTRL+SHIFT+E
Edge Constraint(toggle on/off): SHIFT+X
Target Weld: CTRL+SHIFT+W
Cut: ALT+C
Quickslice: CTRL+SHIFT+Q
Grow Selection: CTRL+Page Up
Shrink Selection: CTRL+Page Down
Hide: CTRL+H
Hide Unselected: CTRL+I
Unhide All: ALT+U

Particle Flow

Copy Selected In Particle View: CTRL+C
Paste Selected In Particle View: CTRL+V
Particle Emission(toggle on/off): ;
Selected Particle Emission(toggle on/off): SHIFT+;

Quad Menus

Animation: ALT+RMB
Lighting/Render: CTRL+ALT+RMB
Modelling: CTL+RMB
Reactor: ALT+SHIFT+RMB
Snap: SHIFT+RMB
Viewports: V
(Customisable Keys): CTRL+ALT+SHIFT+RMB or CTRL+SHIFT+RMB

Material Editor

Background: B
Backlight: L
Cycle 3x2,5x3,6x4 Sample Slots: X
Get Material: G
Go Backward to Sibling: Left Arrow
Go Forward to Sibling: Right Arrow
Go tp Parent: Up Arrow
Make Preview: P
Options: O(letter)