Houdini 19 Mapbox not functioning

   16151   31   14
User Avatar
Member
238 posts
Joined: July 2005
Offline
i am glad i found this thread! FYI you cant use a tablet when using the little window to find your area, it throws nan errors. you must use a mouse. although i failed to have my edits work.
(after installing mercantile) here are my edits
5 import mercantile
125 #terrain_url = "https://api.mapbox.com/v4/mapbox.terrain-rgb/ [api.mapbox.com]" + str(lon) +"," + str(lat) + "," + str((zoom+1)) + "/1024x1024@2x.png?access_token=" + API_KEY
126 #fixed code
127 x, y, z = mercantile.tile(lon, lat, zoom)
128 terrain_url = f"https://api.mapbox.com/v4/mapbox.terrain-rgb/ [api.mapbox.com]{z}/{x}/{y},512@2x.pngraw?access_token={API_KEY}"

this is the error, when i find my location and press download...

Traceback (most recent call last):
File "labs::Sop/mapbox::2.1, PythonModule", line 222, in <lambda>
File "labs::Sop/mapbox::2.1, PythonModule", line 63, in on_button
File "labs::Sop/mapbox::2.1, PythonModule", line 169, in refresh
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.435/houdini/python3.9libs\hou.py", line 16929, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
Edited by IsStuff - May 17, 2023 20:20:53
Robert Kelly
User Avatar
Member
2 posts
Joined: May 2023
Offline
Is there an official fix for this yet?



MaiAo
swSharkBoy_02's findings are correct. Mapbox changed their API for elevation/height map access. I'm talking to Mapbox devs about this issue. We will update the tool as soon as we find a satisfactory fix.

To further clarify, the error message generated by our Mapbox node is due to missing height map, which in turn was due to height map download links stopped working.
User Avatar
Member
100 posts
Joined: Sept. 2006
Offline
The map browser is all blank/white. Nothing loads no errors.
User Avatar
Member
28 posts
Joined: June 2019
Offline
I had this working previously (about a month or so ago) but now I'm getting a "CORS" error:


Qt Error: Access to XMLHttpRequest at 'http://a.tiles.mapbox.com/v4/mapbox.satellite.json?access_token=<key>' from origin 'file://' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Qt Error: could not load TileJSON at http://a.tiles.mapbox.com/v4/mapbox.satellite.json?access_token=<key>

replaced the actual access token with "<key>" in this quote only, the actual key is being used in the node.
User Avatar
Member
11 posts
Joined: April 2016
Offline
Found this thread after a little googling, and I can't make this work out of the box, nor do I have the means to go looking into files here and there to make it work.

Hoping an official fix will arrive. I'd love to try this too!
User Avatar
Member
43 posts
Joined: Dec. 2016
Offline
MaiAo
monci
...

@MaiAo Any ideas of using 1024 or higher resolution for heightmap?

Mapbox confirmed that their new API only support up to 512 now. We can look into whether there is a good way to upres it. Overall fix for the bug ETA early next week if not sooner.

Has this been fixed? Is it a matter of updating the Lab Tools?

Thanks
User Avatar
Member
4 posts
Joined: June 2015
Offline
I've found an alternative solution for now until its fixed if if anyone needs one. Im using https://github.com/domlysz/BlenderGIS [github.com] exporting the mesh to houdini and doing a heightfeild project from that mesh.

EDIT: https://bereg.gumroad.com/l/IMnXfK [bereg.gumroad.com]

This HDA worked for me
Edited by Christophe Leyder - July 8, 2023 05:18:03
User Avatar
Member
18 posts
Joined: Feb. 2015
Offline
Hi,

Via the updated H19+ supported link
https://bereg.gumroad.com/l/IMnXfK [bereg.gumroad.com]

I downloaded put the new
mapbox_on_steroids.1.1.hda

And put it in:
Documents/Houdini19.5/otls

(I made the otls folder to put it in)

Now it seems to work when I start up H19.5

I'm still a bit fresh to Houdini, especially when it comes to plugins, system variables, paths etc, but it seems to work.

Let me know if it should go somewhere else though. It feels like I've put a car wheel on back-to-front. The car drives, it steers, but I get the feeling the wheel might come off going around a corner.


There are a few things to watch out for though.
- When you pull a new node up to start with you have to stick the API key in each time (doesn't seem to remember you did it before)

- When you start the first Lookup it still gives this error:
Invalid source /obj/geo1/mapbox_on_steroids2/load_height_information/cop2net1
Error: Failed to open COP network.
(I think it might just be looking for un-generated data)
Just put some coords in and hit lookup and it seems to come right.

- It seems to download data that is one zoom out... i.e. if you have zoom 14, you'll get an area that covers a zoom of 13.

- And, it doesn't seem to refresh the texture when you update with a new position/zoom so you have to hit Render->Update Textures to refresh.

Anyway, at least it's working.

Let me know if there's a better way to do it.
User Avatar
Member
2 posts
Joined: Nov. 2021
Offline
Can confirm it is working if follow adamseeley's post.
User Avatar
Member
3 posts
Joined: May 2023
Offline
Alex Amos
I had this working previously (about a month or so ago) but now I'm getting a "CORS" error:


Qt Error: Access to XMLHttpRequest at 'http://a.tiles.mapbox.com/v4/mapbox.satellite.json?access_token=<key>' from origin 'file://' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Qt Error: could not load TileJSON at http://a.tiles.mapbox.com/v4/mapbox.satellite.json?access_token=<key>

replaced the actual access token with "<key>" in this quote only, the actual key is being used in the node.
have the same issue,don't konw how to fix it. ver=19.5.640
User Avatar
Member
2 posts
Joined: Nov. 2021
Offline
Plugin has been updated by sidefx/mapbox with the new features and working fine. You may need to update sidefxlab for the new version.
User Avatar
Member
3 posts
Joined: Oct. 2021
Offline
This looks like solution:

Alexandr Kirichenko (Faitel) made a new version of the asset, that works on newer Houdini versions.
All glory to him!


https://bereg.gumroad.com/l/IMnXfK?fbclid=IwAR2hWPuZysAI7Sl88UxqUd7Sje142au3syZQEqOJPZaTaqgCv-VlhAti6k4 [bereg.gumroad.com]


its .hda file (one for olders houdini version, one in python 3 for newer versions) (instructions to instal it here) [www.sidefx.com]


tested it and it works!

Attachments:
EpicPen_g9O9y1b5Ml.png (1.4 MB)

  • Quick Links