-
Notifications
You must be signed in to change notification settings - Fork 10
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
cheat's texture #90
Comments
This is also a bit |
this will also be very nice for wire3d |
A straight fix for tri_waters <- DEL(silicate::inlandwaters[c(3, 4, 6), ])
tri_waters$vertex <- tri_waters$vertex %>%
dplyr::mutate(x_ = scales::rescale(x_, c(0, ncol(volcano))),
y_ = scales::rescale(y_, c(0, nrow(volcano))))
r <- palr::image_raster(volcano)
tri_mesh <- as.mesh3d(tri_waters, image_texture = r)
## todo test file path, clean up file, png sanity, range of texcoords, color of material (not black) etc
mesh_plot(tri_mesh)
Warning message:
In mesh_plot.mesh3d(tri_mesh) :
mesh object has a texture path, but cannot be displayed in 2D graphics (try plot3d) |
looks great takes ages, cc <- ceramic::cc_location(cbind(131.037, -25.3456562), buffer = c(1800, 1200))
el <- ceramic::cc_elevation(cc)
library(anglr)
mesh <- as.mesh3d(el, image_texture = cc, triangles = F)
mesh_plot(mesh) compare to terrainmeshr version, with mesh <- as.mesh3d(el, image_texture = cc, triangles = TRUE)
mesh_plot(mesh) and then we can up the triangles mesh2 <- as.mesh3d(el, image_texture = cc, triangles = TRUE,
max_triangles = ncol(mesh$it) * 4)
mesh_plot(mesh2)
|
@dcooley just FYI this is pretty nice for mapdeck now that we have terrainmeshr (it's only done dynamically ATM, needs to be pulled out of |
With rgl device and rglwidget we can do real textures, but with deck.gl etc. we can resort to primitive colouring:
hypertidy/silicate#84 (comment)
Provide a "cheater's" texture so we can add this to a mesh3d.
See #140 for a potential
copy_down()
approach to this.This is exactly like #88 for
mesh_plot()
, but support for that will be automatic when mesh_plot is updated.The text was updated successfully, but these errors were encountered: