AlexB Posted August 9, 2014 Share Posted August 9, 2014 I saw that there was some discussion that the limit of four lights was not per scene, but per mesh. Can anyone explain how you'd assign a light to a certain mesh, or a group of meshes and not the scene? Also, is this something that the Blender exporter supports so we can do this without code? Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 You can use light.excludeMeshes array to exclude a mesh from a specific light 3dsmax exporter can export this info but not the Blender exporter Quote Link to comment Share on other sites More sharing options...
gryff Posted August 9, 2014 Share Posted August 9, 2014 You can use light.excludeMeshes array to exclude a mesh from a specific light Trying to work on something that involves more than 4 lights in a scene - in fact 8+ lights and 40+ meshes (see layout on this thread) The more I think about it, the more I feel it would be a lot easier if there was an "includeOnlyMeshes()" function/method. In the example, it would be easier to include 10 meshes in the area a light is in, rather than exclude the 30 meshes outside the light area. (which has to be done 8x for the example). It also makes it easier to add new meshes to an one area (don't have to change meshes data for all the other lights). 3dsmax exporter can export this info but not the Blender exporter Any reason why? cheers, gryff Dad72 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 9, 2014 Share Posted August 9, 2014 I totally agree with gryff : light.includeOnlyMeshes(mesh); or light.includeOnlyMeshes = mesh; or light.includeMeshes "array" It would be easier to include objects lighting by a light rather than exclude several objects.But the exludeMeshes function is equally interesting depending on if you have a lot of mesh to include or exclude. But I think the problem is that all objects are enlighten by default, so it must exclude the objects you don't want to enlighten by one light. gryff 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 @Gryff: Because I did not find such features in BLender If you know where I can find a list of excluded/included mesh per light, I will be pleased to export it BTW, you are right guys, I'll add an includedOnlyMesh array Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 I've just published v1.14 beta with this new feature gryff, AlexB and Dad72 3 Quote Link to comment Share on other sites More sharing options...
gryff Posted August 9, 2014 Share Posted August 9, 2014 Because I did not find such features in BLender Well DK - an explanation of how Blender recognizes lights and meshes that may help. See the images below of a simple scene in Blender. 1. Blender allows you to build in layers - useful as the scene gets more complicated. In the big image below you will see five objects - a cube, a sphere, A Hemi light and a Point light and a camera. The cube and the Hemi are in Layer1 (L1 in image), the sphere and the Point light are in Layer 2. In the light properties (purple boxes) I have checked "This Layer Only" for both the Hemi and Point lights. The camera is by itself in Layer 11. 2. The second,smaller, image is the render result I get when I select both the layers L1 and L2 (Shift +Left Click on the layers). Note the cube has flat Hemi Light and the sphere has shadow areas caused by the Point light only. The actual .blend file is here if you wish to play yourself with layers and lights : Light Demo My guess is to export meshes and lights you would have to sort them by layer then check the "This Layer Only Option" for specific lights. No idea how complex that is. I've just published v1.14 beta with this new feature C'est bon Part of the roadmap for BJS 1.13 was shapekeys - how is that ? cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 For shapekeys due to lack of time I had to move it to further version Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 For Blender there is no other way to specify a list of mesh per lights? (The way you describe is a bit messy to export ) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 By the way Gryff, do you have a simple blender scene with a sample of mesh morphing that I can use to experiment? Quote Link to comment Share on other sites More sharing options...
gryff Posted August 9, 2014 Share Posted August 9, 2014 For Blender there is no other way to specify a list of mesh per lights? DK, that is really the only way I know. There is a method using the Cycles Rendering Engine - but only for rendering so no use for BJS. Even if it is a little messy and takes a few seconds longer to export it can save a lot of time over manually getting all the meshes and lights and using that in code. do you have a simple blender scene with a sample of mesh morphing? Here is one to start with - single mesh ~1100 verts that has a morph/shapekey animation.Two shapkeys -Basis(undeformed) and "Draped" (fully deformed). Above the regular timeline is the Dopesheet Timeline->ShapeKey Editor. Drag the green square and watch the values of the "Draped" shapekey change. Or click the "Play" button to play the animation. If that is not quite what you want PM me with requirements. Deform Mesh Demo cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 9, 2014 Share Posted August 9, 2014 That's perfect Quote Link to comment Share on other sites More sharing options...
Temechon Posted August 9, 2014 Share Posted August 9, 2014 Gryff, our blender master, has striked again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.