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

[ Feature ] Multi NFT markers support #40

Open
kalwalt opened this issue Feb 1, 2020 · 6 comments
Open

[ Feature ] Multi NFT markers support #40

kalwalt opened this issue Feb 1, 2020 · 6 comments
Assignees
Labels
code design NFT nft markerless technology

Comments

@kalwalt
Copy link
Owner

kalwalt commented Feb 1, 2020

It will be nice to add the Multi NFT markers feature. More infos will be added.

@kalwalt kalwalt added code design NFT nft markerless technology labels Feb 1, 2020
@kalwalt kalwalt self-assigned this Feb 1, 2020
@kalwalt
Copy link
Owner Author

kalwalt commented Feb 3, 2020

@rajmayank I opened this issue , because i'd like to add this feature. What do you think?

@nicolocarpignoli
Copy link
Collaborator

nicolocarpignoli commented Mar 6, 2020

Two problems I think, looking at the code:

  • maybe we do not care about 'id' of NFT marker, so it won't work at all with multiple NFT markers? - or am I wrong and you get to make it work?

  • in any case, I think we start a new Worker(...) for ANY NFT marker. That kills performances. Will have to change it.

Can you confirm this? I have not tried, just guessing from looking at the code @kalwalt

@nicolocarpignoli
Copy link
Collaborator

Actually I have tried and for me it works!

I have added two NFT markers using a-frame on AR.js repository. It works ok! I think it's a matter of performances, maybe? For low-end devices it may be heavy. But technically, it works.

@kalwalt
Copy link
Owner Author

kalwalt commented Mar 6, 2020

Super! I haven't tried in deep, can you share some code @nicolocarpignoli ?

@nicolocarpignoli
Copy link
Collaborator

you have to go on new AR.js repo, and try this:

<script src='https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js'></script>

<!-- rawgithack development URL -->
<script src='https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.min.js'></script>

<body style='margin : 0px; overflow: hidden;'>
    <a-scene
        vr-mode-ui='enabled: false;'
        embedded arjs='trackingMethod: best; sourceType: webcam; debugUIEnabled: false;'>

        <!-- use rawgithack to retrieve the correct url for nft marker (see 'pinball' below) -->
        <a-nft
            type='nft' url='https://raw.githack.com/AR-js-org/AR.js/master/data/dataNFT/pinball'
            smooth='true' smoothCount='10' smoothTolerance='0.01' smoothThreshold='5'>
            <a-entity
                gltf-model='./Flamingo.glb'
                position='75 150 0'
                rotation='90 90 90'
                scale='5 5 5'
                >
            </a-entity>
        </a-nft>
        <a-nft
            type='nft' url='https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/trex-image/trex'
            smooth='true' smoothCount='10' smoothTolerance='0.01' smoothThreshold='5'>
            <a-entity
                gltf-model='./trex/scene.gltf'
                position='75 150 0'
                rotation='90 90 90'
                scale='30 30 30'
                >
            </a-entity>
        </a-nft>
		<a-entity camera></a-entity>
    </a-scene>
</body>

@adriamolina
Copy link

Hello,
I've tried to load 10 nft markers on the same scene and all works very slow and sometimes the application crashes.
Is there is any tip to increase the performance of the nft markers?

Also mention that I'm using huge animations (18MB - 40MB)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code design NFT nft markerless technology
Projects
None yet
Development

No branches or pull requests

3 participants