Comments (7)
You can use whatever material you'd like. The ARPlaneManager
will instantiate whatever prefab you assign to its "Plane Prefab" field. The plane prefab used in the sample (which is the same one you get with the menu item GameObject > XR > AR Default Plane) uses a material with an orange color set on its Mesh Renderer. It's a simple material which uses a shader with a solid color, but you can create a new material with your texture and assign that to the prefab's Mesh Renderer instead.
from arfoundation-samples.
It isn't working :(
If I use the same material with a texture with more grey and white, the plane changes its color towards grey, and If I use a brownish texture, its color is brownish. However the texture is not visible. The texture parameters are set by default.
Could it be something related to the quality, graphic settings? I'm using a Samsung Galaxy S8
from arfoundation-samples.
I have tried with the planeGrid material that comes with the ARCore unity package, and the same is happening, the material is semitransparent but the grid texture is not visible.
from arfoundation-samples.
A user from the Unity forum found the solution: uv's are not assigned when the mesh is generated. This code from Unity documentation fixed it:
Vector3[] vertices = mesh.vertices;
Vector2[] uvs = new Vector2[vertices.Length];
for (int i = 0; i < uvs.Length; i++)
{
uvs[i] = new Vector2(vertices[i].x, vertices[i].z);
}
mesh.uv = uvs;
With this code, textures are visible (they move when new vertices are added to the plane, but for me is enough) I think it should be fixed in the next update, more users could need it.
from arfoundation-samples.
Ah, I understand. The ARPlaneMeshVisualizer
does not compute UVs, that's true. I've added this for the next version (and they won't move when new vertices are added).
from arfoundation-samples.
We published version 1.0.0-preview.13
of ARFoundation
today (and updated the sample project to use it). The ARPlaneMeshVisualizer
now computes UVs for the mesh. Let me know if that works for you.
To update, go to Window > Package Manager > AR Foundation > Update to 1.0.0-preview.13
from arfoundation-samples.
A user from the Unity forum found the solution: uv's are not assigned when the mesh is generated. This code from Unity documentation fixed it:
Vector3[] vertices = mesh.vertices; Vector2[] uvs = new Vector2[vertices.Length]; for (int i = 0; i < uvs.Length; i++) { uvs[i] = new Vector2(vertices[i].x, vertices[i].z); } mesh.uv = uvs;
With this code, textures are visible (they move when new vertices are added to the plane, but for me is enough) I think it should be fixed in the next update, more users could need it.
Hi mate,
My goal is to apply textures with cubemap for getting reflection.I am currently using planegrid material and shader , can you please help me how i can replace this plane shader with my vertex shader which has a cubemap reflection property whcih will work well.
from arfoundation-samples.
Related Issues (20)
- [Bug] Low FPS results in face tracking to stop working HOT 1
- How to create ARFoundation's ARAnchor from ARKit's ARAnchor? HOT 2
- 为什么我发布成安卓程序,菜单都是灰色,用不了呢a HOT 2
- Support of MultiPeer for the visionOS platform HOT 2
- ARFoundation how to serializes ARWorldMap information for the specified region ? HOT 1
- Persist ARAnchors in Unity for Hololens 2 application HOT 1
- Stop URP Post Processing from affecting AR Camera Feed Background HOT 1
- [Android][ARCore] Crash occurs when changing to the front camera after ImageTracking has been performed even once. HOT 4
- [Bug] Link to Adam Demo executable does not work HOT 1
- [ARFoundation 6.0 with Unity 2022.3.15f1] error CS0246: The type or namespace name 'IAnalytic' could not be found (are you missing a using directive or an assembly reference?) HOT 1
- [Bug] I don't Know what is the issue but the AR core is not able to detect the plane surface and also not able to place objects I am using IQOO Neo 6 and the android version is android 14
- CPU Image from ARFaceManager HOT 1
- Is Bounding Box Available in Quest Pro or only Quest 3? HOT 1
- Xcode error in main funtion [ufw runUIApplicationMainWithArgc: argc argv: argv];
- [Bug] HOT 2
- 3D scanning using meshing / cloud of points?
- How to add a XR referenceImagelibrary through a script HOT 2
- How to unload loaded ReferenceObjectLibrary in ARTrackedObjectManager from memory
- [Bug]ARTrackedImage trackedImagesChanged value error #VisionPro HOT 3
- [Bug] Raycasts flicker against ARMesh on Quest 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arfoundation-samples.