-
Notifications
You must be signed in to change notification settings - Fork 41
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
Please guide in rendering the mesh? #5
Comments
@andreasplesch maybe this is a question for you? ;-) Obviously I'm a beginner at 3D! |
Please provide a live example, on glitch, jsfiddle, observable etc |
Thanks @andreasplesch - I should've done from the beginning but I have a backend in Python3.7 that is not compatible with Glitch's older interpreter. My loose aim is to make a libre ("open source") videogame / interactive-experience about the Amazonian rainforest (where I live). Thank you for your nice components! |
This is likely because the vertex data generated by this library is |
Yes, the z component is expected to be provided with the x and y. It would be not too hard to inject the z value from the data into the returned vertices array with something like:
Typically, some processing has to be done anyways after the meshing, the returned x and y coordinates are just grid coordinates, not spatial coordinates. |
Thanks @mourner and @andreasplesch ! https://glitch.com/~mount-fuji @mourner Yes a little more docs would be great, I loved the demo but couldn't figure it out. Thanks! |
@icarito your glitch test is deleted? |
@arpu sorry I just renamed to a more accurate name! |
@icarito thx for poinzing me to the new glitch and nothing is shown |
The mesh can be seen at the bottom, I didn't center it or anything - look to the bottom left |
bottom right I mean, sorry it's not in front of the camera |
ahh :> thx, great example! |
Let's reopen the issue until we have a proper demo / better docs. |
@mourner testing with aframe master and THREEjs v108 and BufferGeometry |
@mourner what to you think on return the indices on getMesh ? than the BufferGeometry could be set with setIndex() |
@arpu that's what |
awsome works! i update the codepen on https://codesandbox.io/s/martini-aframe-8b2i8 update the link! |
@mourner one more question how can set the createTile with a BufferGeometry? the idea is bevore i use Martini i use
to get a smoother Terrain bevore Martini |
I've tried different attempts using https://github.com/andreasplesch/aframe-triangleset-component but I get this from the Mount Fuji 256 data:
Which doesn't look to me like the input image:
Mainly because of the pointy spikes.
I'm using
<a-triangleset projectdir="z" material="roughness: 0.2; metalness: 0.3; color: green" rotation="90" position="-60 -100 30" scale="1 1 1" :vertices="this.vertices" :triangles="this.triangles"></a-triangleset>
Where this.vertices and this.triangles come from a Vue component that uses the data from tile.getMesh(80) to make these attribute data.
Please advise what am I doing wrong?
Thanks for your guidance.
The text was updated successfully, but these errors were encountered: