You are not logged in.

1

Tuesday, January 8th 2019, 10:36am

Custom UV mapping of a cube

Hello, as in title, is possible to get or create or replace uv map of a cube ? I would like to manipulate UV map, is possible to get internal krpano UV map inside custom plugin etc.. ???

Regards,

2

Tuesday, January 8th 2019, 11:35am

Hi,

there is no 'internal UV map'... each tile is rendered fully, so there is no need to crop or map the tile texture coordinates in any way...

But depending on what you want to achieve, you could try to use distorted hotspots to render a cube and the crop setting to use only portions of the image.

E.g. (for a 1x6 1024x1024 cubestrip image):

Source code

1
2
3
4
5
6
7
<style name="cubeface" url="cubestrip.jpg" distorted="true" enabled="false" width="1000" height="1000" />
<hotspot name="left"  style="cubeface" ath="-90"  atv="0"   crop="0|0|1024|1024" />
<hotspot name="front" style="cubeface" ath="0"    atv="0"   crop="0|1024|1024|1024" />
<hotspot name="right" style="cubeface" ath="+90"  atv="0"   crop="0|2048|1024|1024" />
<hotspot name="back"  style="cubeface" ath="+180" atv="0"   crop="0|3072|1024|1024" />
<hotspot name="up"    style="cubeface" ath="0"    atv="-90" crop="0|4096|1024|1024" />
<hotspot name="down"  style="cubeface" ath="0"    atv="+90" crop="0|5120|1024|1024" />


(just as note - this above is just an example, just cubestrip image can be used/rendered also directly using the <cubestrip> image setting).

Best regards,
Klaus