Edit → Plugins
menu. Once enabled, you should be promoted to restart your project.
That’s It! Your project can now use the Speckle plugin!
Plugins
directory (created as needed).Saved\Logs\
files for error messages,
and don’t hesitate to reach out on our community forums for help!
Speckle Unreal Manager
that you can use to import objects from Speckle.
Here is how to use it:
Place Actors
sidebar, search for Speckle Unreal Manager and add it to the world.SpeckleUnrealManager
instance in the World Outliner
sidebar and use the options presented in the Speckle
category.Speckle Unreal Manager
actor.Expand
https://app.speckle.systems
)2. Enter the Project ID. This can be copied from the url of your project, and pasted into the “Project ID” property of your Speckle Unreal Manager
.Expand
Speckle Unreal Manager
actor (also, ensure the ServerUrl
is correct)3. Deselect the “specify by object id” option, and, assuming the url + token is valid, the drop down selections for project
, model
, and version
will be available.options limit
value.
If no options appear, then try deselecting, and reselecting the actor, and check the Output Log
for warnings.Receive
button. The specified object and all its children will be imported as Actors.ServerTransport
is used to make a HTTP request to a Speckle server for the object (and its children).
It fetches JSON objects from the server, which are then stored in a local Memory Transport
.ReceiveOperation
node handles the received objects, and deserializes them into Object Models (objects inheriting UBase
).SpeckleConverterComponent
converts these objects into native actors/components.Plugins\speckle-unreal\Content\Examples
directory and looks like this:
SpeckleConverterComponent
provides the conversion functionality for converting Speckle objects to native UE Actors.
However, this class does not contain specific conversion logic.ISpeckleConverter
.
Please note thatOut of the box, the plugin provides converters for the following conversions:ISpeckleConverter
here, is not the same as theSpeckle.Core.Kits.ISpeckleConverter
in the .NET SDK.
Speckle Type | Native Type | |
---|---|---|
Objects.Geometry.Mesh | → | Static Mesh Component / Procedural Mesh Component |
Objects.Geometry.PointCloud | → | LiDAR Point Cloud |
Objects.Other.BlockInstance | → | Actor with Transform |
Objects.BuiltElements.View | → | Camera |
Speckle.Core.Models.Collection | → | EmptyActor |
Due to the nature of Unreal Engine, it is necessary to offer options/settings for how objects are converted. So eachStaticMeshConverter
andProceduralMeshConverter
are mutually exclusive, and for most users we recommend using static meshes (default).
ISpeckleConverter
can also expose properties that can be set from within the editor, or from BP/C++.
This structure is distinctly different from other connectors, which often have one large conversion class that holds many conversions, and provide few (if any) settings.
Using the StaticMeshConverter
as an example, you can see that it exposes several settings, such as the type of actor to create, and mesh build settings.
SpeckleConverterComponent
s will be setup with a set of default converters.
For most users, there is no further configuration required.
However you can create your own instances of specific ISpeckleConverter
s through the assets in the Content, and then assign them to the converter component.
This can be done by right clicking and creating a new converter of a specified type.
You can create your own custom converters in BP/C++ (see Creating Custom Conversion docs)
ProceduralMeshConverter
(https://github.com/specklesystems/speckle-unreal/blob/main/Source/SpeckleUnreal/Public/Conversion/Converters/ProceduralMeshConverter.h):
UProceduralMeshComponent
.StaticMeshConverter
(https://github.com/specklesystems/speckle-unreal/blob/main/SpeckleUnrealProject/Plugins/SpeckleUnreal/Source/SpeckleUnreal/Public/SpeckleUnrealStaticMesh.h):
UStaticMeshComponent
.RenderMaterial
(https://github.com/specklesystems/speckle-sharp/blob/main/Objects/Objects/Other/RenderMaterial.cs) will be all they want.
Many users, however, want to use textured materials, after all, Unreal excels in photorealism, and high quality materials are a significant part of that.
The Material Overrides feature of the MaterialConverter
addresses this need, as it enables a semi-automated workflow for applying textured materials to received geometry.
Speckle’s Objects
(https://speckle.guide/developers/objects.html) kit supports PBR materials through
the RenderMaterial
(https://github.com/specklesystems/speckle-sharp/blob/main/Objects/Objects/Other/RenderMaterial.cs) property of Speckle meshes.
When receiving meshes with a RenderMaterial
, the MaterialConverter
will create a MaterialInstance
s which are applied to converted meshes.
MaterialConverter
exposes a few properties for defining the base/parent material of the materials created.
Opaque materials will be converted as instances of BaseMeshOpaqueMaterial
.
And transparent materials will be converted as instances of BaseMeshTransparentMaterial
.
By default, these base materials are simple materials with opaque/translucent shader models respectively.
Both have several properties exposed (see screenshot), and during the conversion process,
these properties are set with the values from the RenderMaterial
.
The default opaque material “SpeckleMaterial”, looks like this:
RenderMaterial.name
will be matched against materials in the MaterialsOverridesByName
array.RenderMaterial.id
will be by key with materials in the MaterailOverridesById
map.MaterialConverter
instance.
Materials with the ID f5f7ebd4a...
will use this material instead of converting one from the object’s RenderMaterial
.
MaterialConverter
instance..
Materials with the name Mossy_Grass
will use this material instead of converting one from the object’s RenderMaterial
.
OverridesById
that matches by Id.OverridesByName
that matches by Name./Game/Speckle/Materials/{id}
package. (i.e. from a previous receive, but not cached, or from a strategically placed asset)RenderMaterial
of the Mesh.DefaultMaterial
set in the MaterialConverter
will be used.Note: If there is no material on an object, we do not fall back to the parent’s material like previous versions of this connector. We are aware this may cause unexpected behaviour. This issue will be addressed.
ISpeckleConverter
classes can expose properties, such as the type of Actor to create, whether to create an asset, or build settings etc.
If this doesn’t satisfy your needs, there are a few ways to further customise conversion.
ISpeckleConverter
class and add an instance to your SpeckleConverterComponent
SpeckleConverterComponent
to customise more generally how objects are converted and actors attached.speckle-unreal\Source\SpeckleUnreal\Public\Objects
and are all subclasses of the UBase
type.
For the most part, these classes are direct ports of the corresponding .NET classes from our Objects kit.
For example Mesh
, and BlockInstance
.
An Object Model is required in order to convert Speckle objects.
If you are looking to convert a type that we don’t provide an Object Model, creating one is simple.
This process is very similar to defining an object model in the .NET and PY SDKs,
But be aware of certain limitations:
UBase
.
Add your properties, and implement the Parse
method to set these properties from the JSON object.
URenderMaterial
for an example, see UMesh
for a more advanced example.
UConversionUtils
provides helper methods for dechunking / dereferencing Speckle objects.
Currently, Unit scaling is applied during Parsing (not conversion). This is subject to change!In the future, we may consider creating a proper deserializer that uses reflection, this would mean Object Models can be deserialized without developers having to write these Parse methods. There are several technical challenges for us to solve before this is possible.
UObject
class that implements ISpeckleConverter
.
You must implement the ConvertToNative
and CanConverToNative
methods.
ConvertToNative
function, it is best to contain that in a separate function.
But this class can be implemented however you want!
The AvailableConverters
parameter object is a reference to the master aggregate converter, and we can use this if we need to convert other Speckle Objects, and want to reuse conversion logic from another converter.
The StaticMeshConverter
for example, will use the AvailableConverters
to convert a RenderMaterial
.
CleanUp
method can be implemented, which is used to clear any cached objects / any additional clean up that needs to be done between receive operations.
UObject
ISpeckleConverter
to the Implemented Interfaces list.