Skip to content
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

Custom image doesn't display flamingo in demo despite it being tracked #52

Closed
UnstoppableN opened this issue Jun 8, 2020 · 3 comments
Closed

Comments

@UnstoppableN
Copy link

Hi @Carnaux, I'm trying to create an NFT marker from a custom image.
The image has a rather poor quality (only 1 star) and the flamingo doesn't seem to display when I run the demo.

However when I log "scene.visible" to the console. It returns true when I try to track my image. (along with multiple logs like: "[info] Tracked page 15794384 (max 0).")
Is additional configuration required for a marker to be able to display a marker when It can already be tracked?

I tried to set the model scale to 0.0001 and multiple it by 10 every second in case it wasn't shown due to size differences. But this still didn't show anything.

When I generate a marker from the pinball image downloaded from the web, the flamingo model is shown without any issues or demo code modifications.

I've attached the image and generated markers which I generated.
boter_marker.zip
boter

Thank you for your help!

@Carnaux
Copy link
Owner

Carnaux commented Jun 8, 2020

Hi! Probably is the Flamingo position, it is relative to the marker size, so the example position is for the Pinball image. Keep change the scale and try other positions.

@UnstoppableN
Copy link
Author

Hi @Carnaux, Thank you for your quick response!

I've set the position to 0,0,0 which caused the flamingo to move to the bottom left corner of the pinball image.

But when I retry with my own image, the cube still doesn't show up.
Can the 0,0,0 position be offscreen when the entire image is visible onscreen??

To be able to visualize the location and size a bit better, I've changed the flamingo with a cube in the demo page.
Then I've tried to play a bit with the cube size by setting it to a starting size of (0.000001,0.000001,0.000001) and increased it by 1.5 times the previous size each frame.

This works for the pinball image where at first the cube is invisible but then becomes visible after 2 seconds as it starts to increase in size.
But when I changes the configuration back to my image, no cube ever becomes visible no matter how long I wait.

Is there a calculation which might help me to determine the range of positions and sizes which I should use?
My current image is 72 dpi and 3439 × 2652px and the pinball image is 200 dpi and 1637 × 2048px.

Or do you have any suggestions how I can debug this better than just randomly changing the size and reloading the page each time?

I know this isn't a typical bug report where an error is encountered or a feature being requested. I am really thankful for your help in getting me started with custom nft markers!

@Carnaux
Copy link
Owner

Carnaux commented Jun 10, 2020

There is this issue kalwalt/jsartoolkit5#41, maybe it can help you

@Carnaux Carnaux closed this as completed Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants