dmurdoch / rgl

rgl is a 3D visualization system based on OpenGL. It provides a medium to high level interface for use in R, currently modelled on classic R graphics, with extensions to allow for interaction.
https://dmurdoch.github.io/rgl/
GNU General Public License v2.0
85 stars 20 forks source link

Enhancement: allow JPEGs to be loaded as textures #196

Closed dmurdoch closed 1 year ago

dmurdoch commented 2 years ago

Found in the rgl2gltf project: some glTF files use JPEG textures, but rgl doesn't support those.

dmurdoch commented 2 years ago

It might make sense to do this by allowing arrays as textures; then the user could read the texture any way they liked.

SbastianGarzon commented 1 year ago

This would be a great feature. I'm not sure if it is directly related, but It would be useful to allow multiple textures. Right now I'm using "simple" OBJ objects to create 3D visualizations (rayshader), but having more detailed objects would improve visualization' quality.

For example, using {rayshader} would be nice to have more detailed trees:

render_obj("Tree/Tree.obj", lat= 5, lon= 4, altitute=10, extent = raster::extent(cropped_data),heightmap = elevation_matrix,zcale=1,load_material = TRUE)

Is it possible to think that it will be feasible in the future to import such detailed objects?

dmurdoch commented 1 year ago

A lot more will become possible once rgl uses shaders for everything. The main difficulty will be giving users an understandable way to get what they want.

dmurdoch commented 1 year ago

Fixed in #347 .