silverslade / aframe_blender_exporter

Blender Exporter for A-Frame VR
MIT License
103 stars 17 forks source link

custom environment map #3

Closed coderofsalvation closed 4 years ago

coderofsalvation commented 4 years ago

Any idea how to change the environment map?

I tried setting it up:

image

But it seems its unsupported. AFAIK we can just grab that node's env-filename and generate it:

 <a-sphere src="res/env1.png"
                material="sphericalEnvMap: ${envfilename};"
                radius="3.5"
                position="0 0 0"
                side="double">
      </a-sphere>

OR...we just add texture-support...that way you could just create a big sphere-mesh in blender, and load a equirectangular texture...which has the same endresult (without jumping through world-settings & hoops). Maybe just simply mapping (unrecognized) blender custom attributes (AFRAME_SRC => "res/env1.jpg" ) as aframe html-attributes (< src="res/env1.jpg") ?

WDYT?

coderofsalvation commented 4 years ago

actually with few lines of code, I could solve these kind of custom attribute scenarios:

https://github.com/silverslade/aframe_blender_exporter/pull/2