How to define Export background/skyColor?

When exporting object to VRML how can I set the scene background /skycolor ?

#VRML V2.0 utf8
Background {
skyColor [ 0.627451 0.627451 0.627451 ]

@tim, Is this something you have looked at? Does there need to be a bug track issue for this?

I have not looked at that, it’s the first time I’ve heard the request. Yeah I guess there should be a bug track issue for it. Is it supposed to be an optional thing or is it always suppose to be written? I know the importer reads it if it’s in the file but it doesn’t actually set anything in Rhino with the value it reads.


@tim, you might want to discuss this with @andy or @scottd. I’m not sure what is best or expected.


Everything you need is in ON_3dmRenderingAttributes - doc.Properties().RenderSettings().

if m_background_style is 0, then the color is in m_background_color. Otherwise you’ll have to decide what to do about gradients or wallpapers. If the value is set to 3 - that’s more complicated, but if you want to be able to support spherical environments and such like in VRML output, I can certainly help with that too.

  • Andy