create3000 / titania

Titania X3D Editor
https://github.com/create3000/titania/wiki
GNU General Public License v3.0
39 stars 10 forks source link

background sky angle control only allows max of Pi/2 #84

Closed splace closed 5 years ago

splace commented 5 years ago

sky angle can go as high as Pi (straight down)

create3000 commented 5 years ago

This should work.

splace commented 5 years ago

for me, latest flatpak

no way to go below horizon...

Screenshot from 2019-04-04 16-03-56

create3000 commented 5 years ago

You can edit the Ground color. Double click the gradient to create a new color stop.

splace commented 5 years ago

the Ground is working.

what i can't do is add a color stop, to the Sky, below the horizon.

create3000 commented 5 years ago

You can create a ground and sky colors separately which creates more standard compliant Backgrounds. This should be enough.

splace commented 5 years ago

You can create a ground and sky colors separately which creates more standard compliant Backgrounds. This should be enough.

you misunderstand; sky angles can go from 0 -> 180, they are a FULL sphere, (ground angles are different and are limited to 0 - 90, they are only a HALF sphere.) the name 'skyAngle' is unhelpful, its logical to assume they are limited to above the horizon.

i think this is actually to simplify the radian maths, having it this way will naturally give you a 'hard' edge at the horizon (and fading up to it) without any calculation and you can often get away without the ground.

this is only the UI, it is displayed right, but it means you can't edit vrml that uses below horizon sky angles.

Background { 
  eventIn      SFBool   set_bind
  exposedField MFFloat  skyAngle     []         # [0,π]
  exposedField MFFloat  groundAngle  []      # [0,π/2]
  exposedField MFColor  groundColor  []      # [0,1]
  exposedField MFString backUrl      []
  exposedField MFString bottomUrl    []
  exposedField MFString frontUrl     []
  exposedField MFString leftUrl      []
  exposedField MFString rightUrl     []
  exposedField MFString topUrl       []
  exposedField MFColor  skyColor     0 0 0      # [0,1]
  eventOut     SFBool   isBound
}

https://tecfa.unige.ch/guides/vrml/vrml97/spec/Images/background.gif