Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#25919] Export to X3D problems with background sky

Date:
2011-02-02 16:52
Priority:
3
State:
Closed
Submitted by:
John Coady (jdc)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Import/Export
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
Export to X3D problems with background sky
Detailed description
I performed an Export to X3D of a blend file containing a background sky based on the following blender video tutorial :

http://asitssfl01.ase.tufts.edu/blackboard/DR21/WorldEditorBackgroundSky.html

My scene consists of a cube object and a camera looking at the cube placed near the z = 0 plane. I went into the world editor and configured the horizon color blue and the zenith color green. When I check the Blend Sky check box and uncheck the Paper Sky and Real Sky, this results in a correct background with green on the top and blue on the bottom and interpolated values inbetween when exported to X3D. However the background node in X3D has too many groundAngle and skyAngle values. The Export to X3D produced the following for the background node.

<Background DEF="World0" groundColor="0.072 0.061 0.881, 0.041 0.528 0.446" groundAngle="1.57, 1.57" skyColor="0.01 0.995 0.01, 0.041 0.528 0.446" skyAngle="1.57, 1.57" />

According to the X3D spec section 24.2.1 from this link

http://web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/index.html

it states that for the skyangle "There shall be one more skyColor value than there are skyAngle values", because "The first colour value is the colour at the zenith (0.0 radians, straight up), which is not specified in the skyAngle field". The same thing is true for the groundAngle "There shall be one more groundColor value than there are groundAngle values. The first colour value is for the nadir (straight down) which is not specified in the groundAngle field." Therefore the background node should contain the following:


<Background DEF="World0" groundColor="0.072 0.061 0.881, 0.041 0.528 0.446" groundAngle="1.57" skyColor="0.01 0.995 0.01, 0.041 0.528 0.446" skyAngle="1.57" />


Now that was problem number 1 with the background sky. Next if according to the video tutorial, if I check both the Blend Sky and Real Sky check boxes, then I should get a background that is green on the top, blue in the middle, and green on the bottom. But when I perform an Export to X3D I get a background that is green on the top and blue on the bottom and interpolated values in between.

<Background DEF="World0" groundColor="0.01 0.995 0.01, 0.041 0.528 0.446" groundAngle="1.57, 1.57" skyColor="0.072 0.061 0.881, 0.041 0.528 0.446" skyAngle="1.57, 1.57" />

But I should get something like the following instead when Blend Sky and Real Sky check boxes are checked. Note that valid groundAngle values can range from 0.0 to PI/2.0 and that valid skyAngle values can range from 0.0 to PI .

<Background DEF="World0" groundColor="0.01 0.995 0.01, 0.072 0.061 0.881" groundAngle="1.57" skyColor="0.01 0.995 0.01, 0.072 0.061 0.881, 0.01 0.995 0.01" skyAngle="1.57, 3.14159" />

I am using Blender version 2.56.0 r34356 on a windows XP machine. Attached are the blend files and Expected X3D files for these two scenarios.




Followup

Message
  • Date: 2011-02-03 17:58
  • Sender: Ton Roosendaal
  • Hopefully Campbell can solve this!
 

Attached Files:

Name Date Download
background11a.x3d 2011-02-02 16:52 Download
background10a.x3d 2011-02-02 16:52 Download
background.blend 2011-02-02 16:52 Download

Changes:

Field Old Value Date By
status_idOpen2011-02-07 12:21campbellbarton
close_dateNone2011-02-07 12:21campbellbarton
StatusNew2011-02-07 12:21campbellbarton
assigned_tonone2011-02-03 17:58ton
CategoryNone2011-02-03 17:58ton
File Added14851: background.blend2011-02-02 16:52jdc
File Added14852: background10a.x3d2011-02-02 16:52jdc
File Added14853: background11a.x3d2011-02-02 16:52jdc