Page 1 of 2
assigning emitters not working for me
Posted: Sat Sep 26, 2009 7:18 pm
by yolk
IN V2
sorry JD but i tried now for half an hour.
i created a scene with 3 area lights..i assigned the emitter material on the part level.
when i render it it stops saying no emitters in the scene.
i have all my materials on a separate disk..tried to redirect it to it..nothing works
Re: assigning emitters not working for me
Posted: Sat Sep 26, 2009 8:06 pm
by JDHill
I tried to duplicate this:
1. made three sldprts
2. inserted them into a new sldasm
3. created three materials (one an emitter)
4. assigned one material to each part
5. rendered
This didn't produce an error, so could you try that and see if it also works fine there? Then, could you say, the ways in which your scenario differs from the above?
Thanks...
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 12:08 pm
by yolk
i narrowed down the problem..emitters work for me on solids but not on surfaces.
could you check if this works for you with surfaces? thanx
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 12:13 pm
by yolk
i made a solid and attached the emitter to the whole solid, now i get this:
***********************************
Body Errors (1)
***********************************
-- BEGIN Body Error #1 --
Entity:LIGHTBOX_1_1000X1000-1/Extrude1
Exception report.
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Maxwell.SolidWorks
Has StackTrace: True
BEGIN STACKTRACE: 'System.NullReferenceException'
- at Maxwell.SolidWorks.swMaterials.mxMesher.WriteBody(Object pObj, Object[]& pParams)
END STACKTRACE: 'System.NullReferenceException'
Has InnerException: False
-- END Body Error #1 --
***********************************
Component Errors (1)
***********************************
-- BEGIN Component Error #1 --
Entity:LIGHTBOX_1_1000X1000-1
Exception report.
Type: Maxwell.SolidWorks.StopProcessingException
Message: Wrapping and re-throwing a NullReferenceException.
Source: Maxwell.SolidWorks
Has StackTrace: True
BEGIN STACKTRACE: 'Maxwell.SolidWorks.StopProcessingException'
- at Maxwell.SolidWorks.SwAddin.ProcessComponent(Component2 pComp, Delegate pMethod, Object[]& pParams)
- at Maxwell.SolidWorks.swMaterials.mxMesher.WriteComponent(Object pObj, Object[]& pParams)
END STACKTRACE: 'Maxwell.SolidWorks.StopProcessingException'
Has InnerException: True
Inner Exception follows.
Exception report.
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Maxwell.SolidWorks
Has StackTrace: True
BEGIN STACKTRACE: 'System.NullReferenceException'
- at Maxwell.SolidWorks.swMaterials.mxMesher.WriteBody(Object pObj, Object[]& pParams)
END STACKTRACE: 'System.NullReferenceException'
Has InnerException: False
-- END Component Error #1 --
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 12:16 pm
by yolk
ok..i deleted the solid (which was the old one) kept the curve and extruded it again, attached the emitter and now it's working
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 12:25 pm
by yolk
another question
i assign materials on a part level..embedded..i like it that way.
when i open an assembly i have a ton of old materials showing up, that i used before..i hate that. i'd love to select unsused and delete them.
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 12:43 pm
by yolk
something is very wrong..every time i attach a new emitter i have to delete the geometry..re-extrude it and attach the new emitter.
it definitely does not work with surfaces..i tried to trick it by assigning the emitter first to the solid and then deleting the other 5 faces, so only 1 face is left. not working

Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 4:13 pm
by JDHill
Thanks for the extra info - I was able to duplicate it now...hold on awhile and I'll figure out what the problem is.
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 5:32 pm
by JDHill
Pretty sure I found the cause - this is not necessarily related to emitters; it is caused by a combination of factors. To reproduce it:
- select a surface body's without the surface bodies filter activated
- this does not actually select the body; it selects the surface's only face
- since it is a face-assignment, the plugin enables multi-materials for this surface
- later on during export, this causes a failure in the assignment logic
You can work around this (until I update the plugin) by avoiding assigning a material at the face level on a surface body. For surface bodies that are already in this state, you will need to remove the material assigned to the surface's face, and re-apply it at the body level. Alternatively, in a .sldasm, you can assign the material to the surface at the component-level, as this will override anything else.
Let me know if this correlates to the issue you're seeing there.
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 5:34 pm
by yolk
ok thanx JD i will try this out. EDIT: no success..getting this nasty error message from above again..will wait for the new plug-in...lost patience..sorry
what about the other 'problem'..the tons of old materials in an assembly that are no longer in use
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 5:54 pm
by JDHill
You still get an error when you assign your emitter at the component-level in the .sldasm? On the other point, I got sidetracked and forgot to reply. Problem there is that when you open a .sldasm, two things happen:
1. the materials stored directly in the .sldasm are read
2. any materials in referenced .sldprts are brought into the session
Therefore, the way to clean up is:
1. open the .sldasm
2. delete the unnecessary materials
3. save & close
4. open each referenced .sldprt
5. delete the unnecessary materials
6. save & close
That should do the trick - the main theme is that deleting a material from a .sldasm does not also delete it from any referenced .sldprts. I don't think there's any way to change that, but I'll take a look.
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 5:57 pm
by yolk
thank you..well could we have a button then that picks the unassigned materials in the assembly..or does the plug-in think they're all assigned?
haven't tried assigning the emitter on the assembly level..will do it now...
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 6:05 pm
by yolk
assigning on the assembly level works..thanx for all the help
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 6:06 pm
by JDHill
On a 'select unused materials' command, it should be possible to do that...I'll see what I can do.
Re: assigning emitters not working for me
Posted: Sun Sep 27, 2009 7:02 pm
by JDHill
In the next update, the material list's context menu will have a new 'Removed Unused' command.