RemiD Posted May 11, 2011 Share Posted May 11, 2011 Hello , For my project, i want to use vertex lighting to illuminate the meshes of the buildings. When i export a .b3d mesh from 3DWS and i import it in Blitz3d, the mesh is not illuminated by the vertex lighting lights, does not change color when using the EntityColor function, does not change alpha when using the EntityAlpha function. As you can see the .b3d mesh of the stairs from 3DWS is not illuminated, the Blitz3d cube is illuminated : Is there something to do to enable the vertex lighting on a .b3d mesh from 3DWS imported in Blitz3d ? I tried to use the UpdateNormals(Mesh) function and the EntityFx(Mesh,0) function but it does not change anything. Thanks for your suggestions, Quote Link to comment Share on other sites More sharing options...
RemiD Posted May 28, 2011 Author Share Posted May 28, 2011 Still no answer to this problem. Josh can you help me please, my project is stopped because of that... I've joined a demo (in Blitz3d) to this post with meshes and textures exported from 3DWS : In the demo you have this scene : You can see a Blue cube created with Blitz3d on which it is possible to enable VertexLighting, to change the color of the mesh, to change the alpha of the mesh. You can also see a White Cube exported from 3DWS on which i have not managed to enable VertexLighting, to change the color of the mesh, to change the alpha of the mesh. I've also added others meshes exported from 3DWS on which i have not managed to enable VertexLighting, to change the color of the mesh, to change the alpha of the mesh. I need a solution please ! Thanks for your advices, Example problem to enable VertexLighting.zip Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted May 31, 2011 Share Posted May 31, 2011 I must admit I know nothing about Blitz3D, however as you say the lighting is vertex lighting (and I'm assuming the vertex data must be there or it couldn't render the geometry) I can't see how this is anything other than a Blitz3D issue. Are the cubes you are rendering and lighting sucessfully external objects too or primatives created within the engine? Puki professes to be a bit of an expert in Blitz3D ... maybe he might be able to answer this. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
RemiD Posted June 1, 2011 Author Share Posted June 1, 2011 Thanks for your reply, I don't think this is a problem with Blitz3d, because if i import the .b3d mesh (exported from 3DWS) in Deled and export it in.b3d again, the vertex lighting works in Blitz3d... But unfortunately the Deled .b3d exporter changes the normals, and then the vertex lighting is not as i want it to be. I think 3DWS sets the mesh or vetices of the mesh in "fullbright" mode in order to use it with the lightmap. And i haven't found a way to disable this "fullbright" mode when loading the mesh in Blitz3d. So what i need is either a way to disable the fullbright mode of the mesh or the vertices in Blitz3d, or a software which helps me disable this fullbright mode... Or maybe an option i have missed in 3DWS ? Thanks, Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted June 1, 2011 Share Posted June 1, 2011 Thats fair enough, I guess that the export to b3D is setting something in the file. As that's obviously internal to 3D World Studio I think Josh will need to answer this. I had a quick look online at the b3d file format and the brush chunk appears to be the only place where this might be set: BRUS int n_texs { char name[] ;eg "WATER" - just use texture name by default float red,green,blue,alpha ;Blitz3D Brushcolor and Brushalpha: default=1,1,1,1 float shininess ;Blitz3D BrushShininess: default=0 int blend,fx ;Blitz3D Brushblend and BrushFX: default=1,0 int texture_id[n_texs] ;textures used in brush } I'm guessing the Brushblend and BrushFX would be the most likely canidates. Surely these must be switchable within blitz3D. I noticed you were using entityFX for switching modes but I assume it made no difference? It's a shame the export from Deled messes the normals up as that would have been a fairly easy workaround. I suspect I have reached the limit of my knowledge on this. Hopefully Josh will respond with more insight. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Aily Posted June 2, 2011 Share Posted June 2, 2011 You need to assign materials with shader "mesh_diffuse_vertexgi.frag" It's more complex than BrushFX or EntityFX. Blend mode can't show vertex colors. Quote "Better" is big enemy of "good" Link to comment Share on other sites More sharing options...
RemiD Posted June 2, 2011 Author Share Posted June 2, 2011 You need to assign materials with shader "mesh_diffuse_vertexgi.frag" There is no shader in blitz3d... the brush chunk appears to be the only place where this might be set I don't know if i can modify the "brush" in Blitz3d, i'm going to try that. Thanks Quote Link to comment Share on other sites More sharing options...
Aily Posted June 2, 2011 Share Posted June 2, 2011 There is no shader in blitz3d... I don't know if i can modify the "brush" in Blitz3d, i'm going to try that. Thanks Oh, sorry man. I was thinking that you asking about Leadwerks Quote "Better" is big enemy of "good" Link to comment Share on other sites More sharing options...
RemiD Posted June 2, 2011 Author Share Posted June 2, 2011 Oh, sorry man. I was thinking that you asking about Leadwerks That's ok, thanks for your answer anyway Quote Link to comment Share on other sites More sharing options...
Mhigzanne Posted June 14, 2011 Share Posted June 14, 2011 Don't have any idea! Quote Link to comment Share on other sites More sharing options...
Josh Posted November 11, 2011 Share Posted November 11, 2011 Brush geometry uses lightmaps, not vertex lights. I opened one of your maps and it had no lighting information, so press the lighting button and do that first, then export. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Mumbles Posted November 12, 2011 Share Posted November 12, 2011 Well, this is a bit of a blast from the past. I wonder if he still checks here for an answer... Quote LE Version: 2.50 (Eventually) 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.