New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FootprintSelectionVisualizer not displaying footprint #30
Comments
Sorry about that, we didn't moved the old Sceneform Here is your answer: Since the class NodeSelectionVisualizer(val selectorNode: Node) : SelectionVisualizer {
override fun applySelectionVisual(node: BaseTransformableNode?) {
selectorNode.parent = node
}
override fun removeSelectionVisual(node: BaseTransformableNode?) {
selectorNode.parent = null
}
} (It would be great if you could make a Pull Request with this code) And to manage the shadows: val modelNode = ModelNode()
modelNode.loadModelAsync(
context = requireContext(),
glbFileLocation = "NodeSelector.glb",
coroutineScope = lifecycleScope,
autoAnimate = true,
autoScale = true,
centerOrigin = Position(0.0f)
) { instance: RenderableInstance ->
instance.isShadowCaster = true
instance.isShadowReceiver = true
}
val transformationSystem = TransformationSystem(requireContext().resources.displayMetrics, NodeSelectionVisualizer(modelNode)) You then just have 2 choice depending on your usage case:
|
The default node selection handler has been added in here: |
Thanks @ThomasGorisse. I've tried the above recommendations but still not seeing any footprint on the model. |
I guess maybe I wasn't very clear about what I needed. I actually need a shadow below the model. I guess what I need is a plane or surface underneath the model and make the model the shadow caster? |
I created a ViewRenderable to go underneath the model, but it doesn't seem to result in any shadow being cast on the viewRenderable.
|
@grassydragon @RGregat Any idea? |
@kelvinwatson you want to get something like this ? I quickly created a default plane in Blender and exported it as a glb file. I also disabled the PlaneRender to not act as a shadow receiver ...
sceneView = view.findViewById<ArSceneView?>(R.id.sceneView).apply {
planeRenderer.isVisible = false
planeRenderer.isEnabled = false
lightEstimationMode = LightEstimationMode.DISABLED
...
planeNode = ArModelNode()
planeNode.loadModelAsync(context = requireContext(),
coroutineScope = lifecycleScope,
glbFileLocation = "models/plane.glb",
onLoaded = {
it.isShadowCaster = false
it.isShadowReceiver = true
}) Is that close to what you want achieve? |
Thank you so much!
…On Sat, Mar 12, 2022, 9:37 AM Robert ***@***.***> wrote:
@kelvinwatson <https://github.com/kelvinwatson> you want to get something
like this ?
[image: image]
<https://user-images.githubusercontent.com/3974162/158028425-b3468e92-41d1-484d-a9a3-efa8f10074d6.png>
I quickly created a default plane in Blender and exported it as a glb file.
plane.zip
<https://github.com/SceneView/sceneview-android/files/8238045/plane.zip>
I also disabled the PlaneRender to not act as a shadow receiver
...
sceneView = view.findViewById<ArSceneView?>(R.id.sceneView).apply {
planeRenderer.isVisible = false
planeRenderer.isEnabled = false
lightEstimationMode = LightEstimationMode.DISABLED...
planeNode = ArModelNode()
planeNode.loadModelAsync(context = requireContext(),
coroutineScope = lifecycleScope,
glbFileLocation = "models/plane.glb",
onLoaded = {
it.isShadowCaster = false
it.isShadowReceiver = true
})
Is that close to what you want achieve?
—
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACW2U4DGPHGHJANNTMGHWTLU7TI5JANCNFSM5P3GVKXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Do you have the source code and model files of your sample? |
@ThomasGorisse I'm currently actually using the archived SceneForm library in my code. Unfortunately I am unable to share the model since it is company owned.
The above gives me something like this: |
Sorry, I won't be able to help you on the archived version. |
Hi @ThomasGorisse. Filament says here that it supports Percentage Closer Soft Shadow (PCSS) and Variance Shadow Mapping (VSM) which sounds like what I need (for a blurry/soft shadow). Do you know how I could access those shadow rendering techniques through your SceneView? |
Just checked with Romain Guy. He says |
I'm closing this issue since it is related to Sceneform and a solution for soft shadows has been found. |
Can you reference the solution that was found for soft shadows?
…On Tue, May 24, 2022, 12:40 PM Nikita Zaytsev ***@***.***> wrote:
Closed #30 <#30> as
completed.
—
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACW2U4GXGNMCQELHRHYYTMDVLUWBLANCNFSM5P3GVKXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've thought this is it:
|
I'm trying to set a foot print shadow but I'm not seeing one when I try to add a
FootprintSelectionVisualizer
.Am I missing a step?
The text was updated successfully, but these errors were encountered: