Intel® Rendering Toolkit
Receive answers to your big data visualization questions from community peers and Intel experts.
31 Discussions

Mix material with luminous in Ospray.

Glib
Beginner
785 Views

Hi,

I am trying to apply a mask to a luminous material in ospray, to simulate a multisector lamp. I did try using the "map_" prefix on "color" and "intensity" parameters without any effect. So I am trying to build a mix material by combining two luminous materials. The mix material works flawlessly when I use standard materials, I can see them being mixed based on the texture assigned to "map_factor"  parameter. However, when I plug a luminous material into the mix the renderer throws an access violation exception.

 

Here is a sample:

ospray::cpp::Material lum1("pathtracer", "luminous");
lum1.setParam("intensity", 1.0f);
lum1.setParam("color", vec3f(0.0f, 1.0f, 0.0f));
lum1.commit();
ospray::cpp::Material lum2("pathtracer", "luminous");
lum2.setParam("intensity", 0.0f);
lum2.setParam("color", vec3f(0.0f, 0.0f, 1.0f));
lum2.commit();

ospray::cpp::Material mix("pathtracer", "mix");
mix.setParam("factor", 0.5f);
//mix.setParam("map_factor", mask_texture);
mix.setParam("material1", lum1);
mix.setParam("material2", lum2);
mix.commit();

 

Any ideas on how to make a partially luminous material? like this:

 

Glib_0-1671722381366.png

 

 

Thank you

Labels (1)
0 Kudos
0 Replies
Reply