Comments (6)
Hi @markdaws
I did the swift versions of part1, part2, part3 and part4 branches.
Can you create the new branch part1_swift based on the "Initial commit" to allow me to make a pull request? Then based on the part1_swift make a part2_swift etc... so that people would be able to follow the different commits ;)
My repo is here if you want to see https://github.com/OxyFlax/arkit-by-example
from arkit-by-example.
@markdaws Thanks for putting this together. Would love to see a Swift version.
from arkit-by-example.
Thanks for Swift example and also Mark for nice articles! Studying now~
from arkit-by-example.
@OxyFlax I tried recreating your setup (Swift) from scratch, actually more like copy pasting code by code trying to understand the setup. Since you make it so tidy, I get 70% of the setup. Even the setting is very neatly coded.
One thing: Somewhat I am not able to get the "estimate" to affect lighting.
Questions:
- Do we need some kind of existing lighting in the scene for estimate to work?
- If we are not using PBR, will this estimate works? Is it a matter of passing the value into light?
- I am pretty new with PBR, I think I manage to get it working, but not quite sure if the Spherical or the IBL has any effect on the AR Objects. Wonder if we can have object being lit with just PBR, just like in Blender, when using environment light. Currently I am just getting black.
It might, but then again back to first question: I do not seem to get any light to happen, without turning on Default Light.
With Swift version, I am not seeing any light in the scene, but somewhat your cube is reacting to estimate light.
from arkit-by-example.
Ok, too many almost whole day, but I think the reason I am getting black is that because this thing needs to be at the very bottom! 💯
Also, intensity and image path is crucial. No error give even if we provide wrong path.
// MARK: - ARSCNViewDelegate
func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {
guard let estimate = self.sceneView.session.currentFrame?.lightEstimate else {
return
}
// A value of 1000 is considered neutral, lighting environment intensity normalizes
// 1.0 to neutral so we need to scale the ambientIntensity value
let intensity = estimate.ambientIntensity / 1000.0
self.sceneView.scene.lightingEnvironment.intensity = intensity
}
from arkit-by-example.
@markdaws I didn't realize someone else already put together a Swift version and I ended up doing it as well. Here's my version: https://github.com/canbal/arkit-by-example. If interested I'm happy to create a pull request for a swift
branch.
Regardless, thanks for the tutorial, it's been very helpful!
from arkit-by-example.
Related Issues (9)
- Made a Swift version HOT 2
- Long click on a plane => -[SCNNode changeMaterial]: unrecognized selector sent to instance HOT 6
- Outdated, crashes on XCode 9, iPhone 8
- tron_grid.png file missing HOT 3
- renderer:didAddNode:forAnchor: not called HOT 4
- ARWorldTrackingSessionConfiguration is deprecated
- White screen? HOT 3
- ARSCNView before iOS 11.0
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 arkit-by-example.