vizicities icon indicating copy to clipboard operation
vizicities copied to clipboard

Where to put environmental configuration (sky, etc) and decorative objects (floor, etc)

Open robhawkes opened this issue 10 years ago • 3 comments

0.2.0 is getting to a stage where I want to start implementing more visual features that don't necessarily attach to an input; for example a sky or solid floor.

As things stand, there are a few options:

  • Hard-code the sky and floor into the core platform and provide configuration options (risks giving the platform too much control over what you can do)
  • Create a new interface that manages non-data objects within the world and add the sky and floor there
  • Manually add these objects to the ViziCities world instance from your app
  • Create a way of outputting these objects through the Blueprint API, perhaps using a blank input (allows for these objects to become clever in the future should data be found to manipulate them)

This seems to be an important cross-road in the new infrastructure in regards to defining what the Blueprint API handles and what it doesn't. I'm currently in 2 minds about which direction to go with this. The only option I'm happy to rule out immediately is hard-coding this into the core platform like what was done with 0.1.0.

Thoughts?

robhawkes avatar Dec 10 '14 14:12 robhawkes

I definitely agree that hard-coding is bad. And I'm currently playing around with driving things like sky, ground and lights by data, so there's certainly a use case for that. I like the idea of having these be driven by Blueprint outputs, but the trick is allowing that while still providing a default set-up. You don't want to have to set up all that stuff with the full Blueprint configuration every time. Maybe provide a helper object that runs a default configuration via Blueprint that you can call in a single line of code.

I encourage you to look at #104 when considering options for this issue.

For what it's worth, I like having more control over the camera, renderer and scene objects as well. If there's a way to work those in here, that'd be great.

brianchirls avatar Dec 10 '14 16:12 brianchirls

I like the idea of a set of default Blueprint configs that can be called on easily. I think that's a good balance between being flexible but also offering sensible defaults if you want them.

What sort of controls over the camera, render and scene object? I know those areas have been discussed in some of the PRs. Do you mean like #97?

robhawkes avatar Dec 10 '14 19:12 robhawkes

I need to run my own render pass so I can do post-processing effects like SSAO. I'm also looking into deferred lighting and stuff like that.

As for the scene and the camera, my first use case is that sometimes I want to nest them under a parent object so I can perform my own transforms on them. As it is, I have to wait for the objects to be added directly under the scene and then move them around. The tricky part of that is identifying which objects are associated with which outputs. It's easy enough if I know the order and can identify them by their place in the array, but when I start loading them dynamically, it's gonna be a problem. Would be useful if they were labeled.

brianchirls avatar Dec 12 '14 14:12 brianchirls