Unreal Engine 4 default sphere mesh location - unreal-engine4

Where can I find the base mesh and uv map of the default sphere used in the material editor for previewing?

You can check the option to show the Engine content under View Options in the Editor content browser. A folder Engine Content will appear where you can search for Sphere under BasicShapes.

Related

Is there any way to fix Terrain in Unity3d?

Terrain doesn't have a texture and can't edit it's height
Terrain must look as an untextured object, but instead it looks like that:
screenshot
this is the default texture for a terrain.
click on the terrain and a menu should open up at the inspector, where you have a few options.
in the Project window, go to the assets folder and right click + pick create a new terrain layer.
than, you can drag this layer to the terrain and have a texture on it.
you can even drag more than one layers to have multiple textures on it.
on the height problem:
try installing the unity terrain tools package or checking if the terrain is read only.

MRTK2 Bounds Control Constraint Manager for Move Axis constraint not working in Unity

In a hololens2 device I want for the user to be able to point and touch a bounding box but not scale/translate/rotate it. I'm working on Unity 2022.1.24 with MRTK 2.8.3.0
I add a Bounds Control component to the object that holds the following components: a collider and the Constrain Manager component that has a RotationAxisContraint for all=XYZ. I've also constrained scale to 1. However picking the bounding box from the corners allows the user to move the bounding box. How can I stop this translation of bounding box from happening?
Currently, the Unity versions officially supported by Microsoft are Unity 2020.3 LTS and Unity 2021.3 LTS. Please refer to Choosing a Unity version and XR plugin - Mixed Reality | Microsoft Learn to select the appropriate Unity version for development.
For your question, to clarify, MoveAxisConstraint only works on the behavior of the Translation Handle. From your screenshot, you didn't enable Translation Handle. If you want to try it, you can check Show Handle For X/Y/Z in BoundsControl/Visuals/TranslationHandlesConfiguration, and then you can see these Translation Handles in the center of each face of the bounding box.
For MinMaxScaleConstraint and Scale Handle, when the scale of the object has reached the maximum/minimum, the object will move in the direction of dragging, which is by design. If you don't need Rotate/Scale/Translate, then you only need to uncheck Show Handle For X/Y/Z or Show Scale Handles in the corresponding Configuration of BoundsControl/Visuals.

MRTK 2.7.3 - Outline Shader is not visible on HoloLens

I saw the scene OutlineExamples in the MRTK examples package and recreated it in my own project.
The outlining works if I stay in unity in play mode. But if I deploy it on the HoloLens the object does not get a outline effect.
The OutlineExamples scene from the MRTKHub-project works as excpected on the HoloLens!
So I guess I missed something in my own project, but I cant find it. I compared the setup multiple times, but cant find a difference. And I also used the simplest object (the cube) from the example scene.
Setup for the cube
(the screenshot shows on the left side my project and on the right side the mrtkhub-project):
Mesh Filter (standard)
Mesh Renderer (standard)
Box Collider (standard)
MeshOutline with the Material "OutlineOrange" or "OutlineGreen" (added)
Object Manipulator (added)
Constraint Manager (added)
The only thing that I had to setup after adding the as "added" marked compenents, was the material for the MeshOutline component.
Is there something else someone has to setup to see the outline shader on the HoloLens?
My Setup:
Unity 2020.3.30
MRTK 2.7.3
Visual Studio 2019
What else did I check?
The XR Plug-in Management is set up the same way
--EDIT
I noticed something strange and I guess this will help someone who knows more about shader!
I launched my application on the HoloLens, grabbed the cube and put it in front of a window in my room. While placing the cube in front of the window, I saw the outline! But as soon as I move it outside the window area, the outline disappears! Another aspect is that I'm using the spatial mapping from MRTK. That means that the window does not get meshed, only the walls. And I guess the walls have their own shader on it, right?
So the spatial mesh shader and the outline shader "dont like each other". Is this possible?
The user derHugo gave me a hint that led to the solution! I went to the material, that I use on the cube and changed the property Render Queue Override under Advanced Options to a higher value than the material MRTK_Occlusion, which is used for the spatial mapping, has.

Unity3D: Position objects relative to Vuforia Image marker im multiple scenes

I have two scenes:
Scene1: User has to track Image marker.
Scene2: Display Objects relative to the image marker scanned in Scene1.
In Scene1 i attached "Vuforia Behaviour Script" to the MRKT camera. In Scene2 im just using the out of the box camera from MRTK (wihtout Vuforia Behaviour Script).
Is there any way to store the position data to archive this?
Im using Hololens2 With MRTK
You can use Spatial Anchor to track the special point in the world. When you are using this technology, you should note the locations where you create anchors should have stable visual features(that is, features that don't change often). For example, the physical surface you mentioned Vuforia image marker is not a good point to create anchors. However, it would be good practice to place anchors where they have stable visual features around Vuforia image markers and record the relative position of the image marker from the anchor.
If you are new to the Spatial Anchor, you can start from here: Spatial Anchor

Showing a model with vertex painted colours in unity

I'm trying to get a model imported into unity from blender showing the vertex colours. I have a shader(shows vertex colours) which I've applied to the model but still just plain white.
I know the shader works because I managed to get it working on another blender model, however I just don't know what the settings were used in the blender file.
Here's how I'm currently doing it:
I create a model in MagicaVoxel and is coloured. I then exported it as a .obj file.
I then import this into blender. If I switch into "texture" mode, I can see all the vertex colours on the model.
I save this blender file as just "xxx.blend".
Then in Unity, I drag the .blend file over, and it imports the model. I apply a material and the vertex paint shader to the model on the stage.
Model should start showing the vertex paint colours, but it does not. Just remains white.
Does anyone have any ideas?
Cheers
I managed to find a way to get vertex colours showing in Unity.
I needed to bake the texture into the vertex colours, to do this, with the object selected in blender, check the "vertex color paint" box under materials. (Shadeless can be checked if you don't want any shadows on the final bake)
Then switch into "vertex paint" mode (from object mode) and then in the properties under bake, check "bake to vertex colour", bake mode is "textures", then click bake.
Import blend file into Unity and apply vertex shader to see.
For other users searching a way of using vertex colors in Blender and importing into Unity WITHOUT ANY BAKING:
select a face (or vertex or all the faces) on edit mode
switch to vertex paint mode (ctrl+tab)
Click on the white square icon
next to "Vertex paint" dropdown menu on top left of the window
("PaintMak")
ctrl + K to color all its vertices, or simply select
a color with the picker available in multiple locations and paint
vertices ( top of the windows, using N-> active tool, selecting and
on right properties area "screwdriver and English key" icon = Active
tool and workspace settings). IMPORTANT: you have to paint on the vertices, painting on the face won't work.
Object material needs its "Base Color" input to be the output of the Vertex color node, so create this connection into the Shader Editor.
Save the blender file into Unity project folder or export into FBX
To display in object/edit mode colors switch view port shading to vertex (see screenshot)
On Unity create a material with a custom Shader graph with pins the output of the "Vertex color" node to the "Base color" main node.
Note: when using vertex colors Blender creates a "Col" data field into the "Object data properties" (teen triangle icon).