Post

Replies

Boosts

Views

Activity

How to add a custom mesh from a Entity loaded from 3D model, and apply Video Material to it
I have a Entity which is loading a USDZ asset. let modelName = "example.usdz" guard let modelURL = Bundle.main.url(forResource: modelName, withExtension: nil) else { fatalError("Failed to find model file: \(modelName)") } let videoEntity = try! Entity.load(contentsOf: modelURL) Now i am creating a video Material using AVPlayer, VideoMaterial let asset = AVURLAsset(url: url) let playerItem = AVPlayerItem(asset: asset) let player = AVPlayer() let material = VideoMaterial(avPlayer: player) And adding Video material to a sphere videoEntity.components.set(ModelComponent(mesh: .generateSphere(radius: 1E3), materials: [material])) But I want a mesh of my 3d model as shape. Any Possible Ways to Achieve This.
2
0
808
Nov ’23
How to add a custom mesh from a Entity loaded from 3D model, and apply Video Material to it
I have a Entity which is loading a USDZ asset. let modelName = "example.usdz" guard let modelURL = Bundle.main.url(forResource: modelName, withExtension: nil) else { fatalError("Failed to find model file: \(modelName)") } let videoEntity = try! Entity.load(contentsOf: modelURL) Now i am creating a video Material using AVPlayer, VideoMaterial let asset = AVURLAsset(url: url) let playerItem = AVPlayerItem(asset: asset) let player = AVPlayer() let material = VideoMaterial(avPlayer: player) And adding Video material to a sphere videoEntity.components.set(ModelComponent(mesh: .generateSphere(radius: 1E3), materials: [material])) But I want a mesh of my 3d model as shape. Any Possible Ways to Achieve This.
Replies
2
Boosts
0
Views
808
Activity
Nov ’23
How to add Reflection to floor?
I have a Sphere Entity that has a VideoMaterial on it and a floor, i want to have the reflection of the video material on that floor. Any possible ways?
Replies
1
Boosts
0
Views
496
Activity
Nov ’23