Jump to content

How to enable vertex lighting and entitycolor and entityalpha on a .b3d mesh from 3DWS


RemiD
 Share

Recommended Posts

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 :

screenie3dwsproblmevert.jpg

 

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,

Link to comment
Share on other sites

  • 3 weeks later...

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 :

screenieproblemtoenable.jpg

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

Link to comment
Share on other sites

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.

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

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,

Link to comment
Share on other sites

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.

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

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 :)

Link to comment
Share on other sites

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 :)

"Better" is big enemy of "good"

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

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.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...