You might know him better as user TKCM here
Still we all waiting for SceneHub with Fabric Renderer I want to show to community my first attempt to build a renderer extension for Canvas.
I chose Hydra because it's fast, modern, free (at current moment) and has recently released API.
At this moment it's only my hobby and WIP and it has some bugs with stability (Fabric freezes 2 times out of 10). And the API is still new and also in progress.
Hydra is GPU and CPU renderer by Vladimir Frolov http://www.raytracing.ru/ . It uses Path Tracing/Metropolis Light Transport/Stochastic Progressive Photon Mapping algorithms and Guided Non Local Means denoiser. It has a good and free (at this moment) integration to 3dsmax (in beta stage)
#How to author import patterns?
This document aims to be a guide on creating new or authoring existing import patterns.
Import patterns are just normal canvas graphs which return specific data types. An Import Pattern represents a programmatic pipeline for importing / creating 3D data in supported target applications. Instead of compensating for incomplete / insufficient data pipelines with manual authoring in the target application Import Patterns provide a smart way of improving the pipeline constantly to be able to deal with the source data in a more efficient and complete way.
The relevant data types for import patterns are:
Import Patterns are also allowed to return arrays of the above data types. The data types are implemented in the GenericImporter extension, which ships with Fabric Engine since version 2.3.1.
Aside from the obvious "Import some data" Import Patterns can also be used to:
#Getting data in - the file format nodes
Most import patterns start by importing a source asset. The factory nodes for this purpose can be found under Fabric -> Compounds -> IO -> Importer -> File Formats. Third party extensions (such as the OpenNurbs extension for example) might provide the loader nodes in a different folder. In the case of OpenNurbs the loader node can be found under ThirdParty -> OpenNurbsImporter -> OpenNurbs.
#Debug drawing - displaying results in real-time
When working on an import pattern it is critical to be able to see what you are doing. For this you can use the drawing nodes which ship with the import patterns extensions. These nodes can be found under Fabric -> Compounds -> IO -> Importer -> Drawing. For most cases you will want to rely on the DrawTraversed node, which is a higher level node that wraps the DrawObjects node.
The DrawTraversed node has a series of features including
Data sets often come with clutter - construction elements or simply unwanted objects. The Filtering nodes for import patterns used Fabric Engine's Blocks feature. This allows you to focus on one element at a time. The base filter node can be found under Fabric -> Compounds -> IO -> Importer -> Filters -> Filter. Based on the default Filter node we also provide a couple pre-canned filter nodes which you can use to filter based on the most common scenarios: Filter by type or path. Using the block on the default Filter node you can implement your very own filtering logic. To make something up: Filter by the original metadata storing the vendor's product name...
Below we see a custom filter based on the name of the object:
Aside from just filtering out elements you can also use import patterns to actively modify elements. You do this by setting properties on elements - changing properties changes the content of an object. For this you can use the Fabric -> Compounds -> IO -> Importer -> Properties -> SetProperty node. Of course you can use all of the getter nodes in that same category to first retrieve a value and then modify it. With this you can for example:
Since the Set Property node is polymorphic we'll list here all of the properties you can modify for each specific element. You can also find the properties by looking at the KL source code in the GenericImporter extension. Each specialized ImporterObject adds its very own properties. Note also that you can add custom properties as well. Integrations consuming the results of an import pattern (the Fabric for Maya plugin, for example) might, however, ignore these custom properties.
All elements (ImporterObject)
Elements with transforms (ImporterTransform)
The Fabric -> Compounds -> IO -> Importer -> Blocks -> Modify can be used as a basis for any higher level node that modifies a data set.
The image below shows a modify node changing the transform of each shape by scaling it down:
The image below shows a node setting the collisionEnabled Boolean property, which will be interpreted by Unity and Unreal to drive the collision settings.
#Assigning new materials
In the Fabric -> Compounds -> IO -> Importer -> Shapes category you can find the AssignMaterials node. The block inside of the node is used to assign a new material to all of the given shapes in the provided element array. The Fabric -> Compounds -> IO -> Importer -> Importer -> getOrCreatePbsMaterial node can come in handy here. The settings for the physically based shader are used both for Unreal and Unity. This way you can quickly assign materials programmatically which are then reflected well in the target real-time environments.
The image below shows setting up a new material by picking a random color. This can be useful especially when working on geometry decimation / merging.
The Fabric -> Compounds -> IO -> Importer -> Shapes -> MergeShapes node can be used to combine multiple shapes. Currently this only supports shapes of type PolygonMesh. To use this node you need to define a key for each element inside of the node's block. The key is used to idenfity the group the shape belongs to. Then all shapes within the same group are merged / combined. So for example:
This open approach empowers you to implement the type of merge features you need for your project. See the factory OpenNurbs import pattern for an example.
The image below shows a merge setup where the first five characters of the name are used to define the group. The groups are colored.
#Getting and setting MetaData
The nodes inside of Fabric -> Compounds -> IO -> Importer -> MetaData allow you to interact with metadata which might be stored on each element. MetaData doesn't follow a schema, so it might exist or not - depending on the source file. You can however also set metadata to inform the target application or your own process about certain characteristics of an element, for example. Most of the importers will provide specific information, such as the source file's unique identifier per element as metadata.
The image below shows a modify node getting, reporting and setting a specific metadata value, in this case the original name of the material coming from OpenNurbs.
The node Fabric -> Compounds -> IO -> Importer -> Blocks -> Traverse can be used to traverse an element array. Traversing means unfolding of hierarchies and creating all of the leaf elements. There are only a few scenarios where this might be needed:
The Traverse node will create an element for all unfolded hierarchies. So, for example, if an ImporterInstance is referencing a ImporterShape master and we have 4 of these instances we might just have 5 elements (the shape + 4 instances). If you wanted to change the transform on each of 4 resulting cubes you will need to traverse the element array first. After the traverser has run you will result in 9 elements (the cube, 4 instances + 4 instanced cubes). Note that the system is smart about not duplicating heavy data such as the geometry, for example. Only the hierarchical MetaData containers are duplicated.
The DrawTraversed node mentioned in the Drawing Elements section above has the Traverse node built-in. It has a boolean toggle to enable or disable it. Feel free to experiment with the traverser that way and see its effects.
#Creating new elements
Aside from just modifying existing elements the import patterns can also create completely new content. Check the following nodes under Fabric -> Compounds -> IO -> Importer -> Importer, namely getOrCreateObject and getOrCreateObjectArray to accomplish this. There are also some convenience nodes for the specific element types, such as getOrCreateLight, getOrCreateCamera etc.
You can create new elements, and then modify their properties as you do with any other element. This can be particularly interesting to create instances of elements procedurally.
Note that the methods used for these nodes are also available in KL. Please see the documentation and the source code of the GenericImporter extension for this.
The image below shows instancing a mesh coming from an alembic source file 10 times.
Animation is represented as a specific type when building an import pattern. You can use the Fabric -> Compounds -> IO -> Importer -> Animation -> createSequence node for this. The resulting ImporterAnimationSequence can be piped to the output of the graph. Animation sequences contain all of the values for a changing property over time and are imported as native animation clips in the supported environments, such as Unity and Unreal. The most simple case to create an animation sequence is to pipe the results of an animated alembic file into a createSequence node. The transform and camera animation of the elements will become animation tracks in the target application.
The image below shows a very simple setup of driving an animation sequence with all of the content of an alembic source file.
Welcome to the Unreal Integration category, a private area to ask and answer questions, report bugs and share suggestions,
Note: Please save the 3dm Rhino files in shaded mode. Our plugin relies on the Rhino render meshes. If you don't save the scenes in shaded mode they won't open correctly in Unreal.
How to get access to Fabric for Unreal
We are pleased to announce the beta 20 release for the Fabric For Unreal plugin.
Follow this link to download Fabric for Unreal:
The package contains an Unreal plugin based on the daily build of the 2.5.0 Fabric Release. The plugin has been built against Unreal 4.15.1. Currently we support Windows only, and only Windows x64 for packaging.
Starting Beta 18 there is a new and disruptive approach on how data is imported- by introducing Import Patterns.
The rationale of this change is based on the following lessons learned on the feedback gathered in the previous betas:
Import Patterns are Canvas graphs which describe the import process programmatically. You can edit the graph and take control over what happens when you bring things into the target application. This means that you are building a versatile utility which is smart enough to deal with your data once - and then use this recipe (the import pattern) for all of your data sets.
Starting with beta 18 we also include a full copy of Fabric Engine Canvas, our visual programming environment, with the unreal plugin. You can launch it by opening the plugin installation folder (within the Unreal Engine editor pick the corresponding entry in the Fabric top menu) and double click on the canvas.bat file on windows. You can find the standard import patterns shipping with the plugin in the Importers folder. You can also add more folders to the search path by defining the FABRIC_IMPORTERS_PATH environment variable. Folders listed on that variable will show up as sub menus in the Fabric top menu within the Unreal Engine editor. You can iterate quickly by authoring the import pattern in Canvas and testing it within Unreal. Canvas will give you a very good idea of what will happen during the import in its 3D view.
Beta 19 adds the new Behavior feature.
Behaviors are a powerful new feature which let you describe interactive / animated behaviors for each actor already in the Canvas Import Pattern. The behavior is then applied inside Unreal engine as a Component.
A good example is a door. You might already know in the source file which actors are going to be doors. You can then apply the behavior to each door in the Import Pattern programmatically and Fabric will apply the right components within Unreal.
The plugin also ships with an example Import Pattern for this, called BehaviorDemo. It applies the Rotating Movement component as well as a custom component to each actor. To try this out create a custom blueprint component called MyBehavior in the root of your Unreal project. The BehaviorDemo pattern will then apply the Rotating Movement component as well as your own custom blueprint component to each actor.
Features that have been removed
Find more information on how to author import patterns in: http://forums.fabricengine.com/discussion/899/authoring-import-patterns-for-unreal
How to launch Fabric for Unreal
The drop comes as a fully encapsulated installer. To use it
You should see the Fabric Engine top menu now.
©Copyright 2017 Fabric Software Inc. All rights reserved. | Privacy