Hey dudes,
so u am doing this in _validate
* GeoOp* _scn = dynamic_cast< GeoOp* > ( Op::input(2) );*
* if (_scn)*
* {*
* // reset the lights array*
* m_lights.clear();*
* m_lights.resize(0);*
* m_lightContext.clear();*
* m_lightContext.resize(0);*
* _scn->validate(for_real);*
* _scn->build_scene( m_MyScene );*
* m_MyScene.validate();*
* m_MyScene.evaluate_lights();*
* std::vector<LightContext*> _lights = m_MyScene.lights;*
* for ( int i =0; i < _lights.size(); i++ )*
* {*
* LightOp * _light = _lights[i]->light();*
* if( _light )*
* {*
* _light->validate( true );*
* m_lights.push_back( _light );*
* m_lightContext.push_back( _lights[i] );*
* m_depthMaps.push_back( _lights[i]->depthmap() );*
* m_doSceneLights = true;*
* }*
* }*
* }*
That all works great. I am storing the scene as m_myScene and access it
later all nice and dandy the classes give me the roight values and its all
sound. Now the trick as soon as the light has "cast shadows" clicked which
i wanna handle too i get ye old *"Warning, Matrix is unassigned" * error.
Literally the only difference is that the light casts shadow. I am calling
evaluate_lights() EVERYWHERE just in case that wont fix it. can anyone shed
light on this :))
Also how do i use the shadowmaps that the lights can generate? It would be
SO good to get that one out of the light and sampled by myself. Is there
ANY example code on how to use that?
Thanks for your help!
JO
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev