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 ]

(Bob McNeel) #2

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

(Tim Hemmelman) #3

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.


(Bob McNeel) #4

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

(Andrew le Bihan) #5


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