Sliders for properties in the SDK

A slider control would a nice way to input values to some properties in the SDK. Tweaking PostProcess filters would be a lot more user-friendly that way… =)

A slider implies a maximum and a minimum so its only useful for some values.

I realize that, but for instance many post filter and shader values have a defined range where they work as intended.

Take for instance the waterfilter as an example, we could probably come up with some default range for at least these params:

  • Speed
  • Water Transparency
  • Max Amplitude
  • Shore Hardness
  • Foam Intensity
  • Foam Hardness
  • Wave Scale
  • Sun Scale
  • Shininess
  • Normal Scale
  • Refraction Strength
  • Caustics Intensity

Double clicking on the slider could replace the slider with a textfield instead so values out of the defined range can be entered.

Another idea is to do it like blender where you can click and drag on a value to change it, that way we only need to provide a tick size and no range. I have no idea how painful such a thing would be to implement in java/swing.

Sliders can take up a lot of real estate. I like the idea of using a blender style slider tho. Have a couple arrows either side for small increments, hold shift for larger increments, drag to change it a lot, or just type in the specific value if u know what it is.

I think @nehon added some sliders for some filter parameters already, did you check nightly?

I did for animamtion tracks yes.
The problem with sliders is that you have a min and max value. we’d need a way to tweak every single slider for each parameters of each filters
For now filters parameters are laid out using reflection.
The only way i can see would be to add some annotations on the filter classes for those meta data. But that would mean putting engine unrelated code in the engine itself, and I’m not sure it’s a good idea.

Nope, I have not got any nightly updates for some time now… (last was about when we switched/updated servers )… I do not know if it is my installation that is broken or not =P And I have never used the animation editor, never seen it… maybe I should take a look at it.

Yeah, I figured the properties panel is done by using reflections… which is fine since it will just work™. Putting this code as annotations in the engine is probably not the right thing to do either.

One idea:

  • Create a mini DSL which describes all the editable properties of an object, and which type of editor for it that should be used.

When rendering properties panel:
if there is a ui property file available for the current type
–> render property with the help of the ui property file
else
–> fallback to use reflection

If we use a human readable format for the property files we can easily tweak the values without recompiling the SDK. The downside for this approach is that the property files and the object they are describing might get out of sync.

@kwando said: The downside for this approach is that the property files and the object they are describing might get out of sync.
Yeah actually that's why we used reflection in the first place. The slider used for animations is to set the start offset of an animation track http://i.imgur.com/BVcbI5A.jpg

I guess an UI description file would be ok… but a bit of a pain to maintain

<cite>@nehon said:</cite>I guess an UI description file would be ok.... but a bit of a pain to maintain

If the files is easy to find for end users then we could easily accept patches for them, or a pull request if we were on github (o’yes I did go there =P )