B3D meshes & Lighting

Blitz3D Forums/Blitz3D Programming/B3D meshes & Lighting

_PJ_(Posted 2004) [#1]
I am experimenting with the use of B3D meshes. I have textured one and wish to use it as a building (well ruins!) on a Terrain. All is well, except Lights seem to have no effect on the mesh.

Is this a particular 'quality' of the B3D format? How do I apply Lightmaps if necessary - remember I am really not techy when it comes to all this lightmap stuff! ;)

Heres some screenies : Hope you can see the difference...

www.bloodwych.netfirms.com/Coolsoft_Developments/unlit.JPG


www.bloodwych.netfirms.com/Coolsoft_Developments/lit.JPG


-----------------The links didnt work because this forum automatically inserts the actual image, yet my site host don't allow direct linking in that way!

Hmm- just found out the links dont work at all as required :( I'll slap 'em onto an html page this afternoon.)


napole0n(Posted 2004) [#2]
Maybe your object has the 'fullbright' flag set? This way it'll only display it's baked lighting and not be affected by any lights in your scene. You can turn it off by force by setting EntityFX object, 0


_PJ_(Posted 2004) [#3]
For the above screens, all the parameters and effects applied to the mesh and textures are here:

structure=LoadMesh (Level$+"\Structure.b3d")
PositionEntity structure,260,20,600
ScaleEntity structure,0.1,0.1,0.1
structex=LoadTexture(Level$+"\Structex.bmp",73)
structexdetail=LoadTexture(Level$+"\Bricks.bmp",9)
ScaleTexture structexdetail,16,16
EntityShininess structure,0.5
EntityFX structure,2
LightMesh structure,50,80,7

		TextureBlend structexdetail,2
		EntityTexture structure,structex,0,0
		EntityTexture structure,structexdetail,0,1
		
EntityType structure,2


I included that LightMesh command to see if that affected anything. If I remove the LightMesh and EntityFX commands,it makes no difference...


Jim Teeuwen(Posted 2004) [#4]
"EntityFX structure,2" - That might be the culprit


Ruz(Posted 2004) [#5]
perhaps your vertex colours are all white. try setting them to a mid grey in your modelling program.
or your ambient light could be too bright


jhocking(Posted 2004) [#6]
How exactly was the building created? Most lightmapping tools like Maplet will export b3d models with fullbright set on. Thus the code doesn't matter, the mesh will be set to fullbright when you bring it into Blitz.

By the way, I don't see any images, just broken links.


_PJ_(Posted 2004) [#7]
Hmm I lack a modelling prog that exports in B3d

I tried using EntityColor to make it 'greyer' before texturing, but I think that may be totally unnecessary. My ambient light is quite dark.

How was it created???
I'm only experimenting, so in actual fact, I 'stole' a .BSP, and converted it using BSP Factory


jhocking(Posted 2004) [#8]
Oh, then you should be specifically asking about using BSP Factory. I think they may have their own forum you should ask on. I know pretty much nothing about BSP Factory but I wouldn't be surprised (since it does lightmapping) if it behaves exactly the way I described, exporting b3d models with the fullbright parameter on. If so, fullbright will be automatically on when you load the model, without you having to use EntityFX in code.


JaviCervera(Posted 2004) [#9]
BSP Factory 1.0 exports the map with the fullbright flag on. This is because the BSP is intended to be illuminated using lightmaps.

BSP Factory 1.1 does not export maps with the fullbright flag on. This is because BSPf1.1 allows you to define shiny surfaces (with specular highlights), and they are not visible when the fullbright flag is enabled. You should set the ambient light to 255,255,255, or enable the fullbright flag yourself.


Shambler(Posted 2004) [#10]
Does BSP factory export the normals?

If not you will need an UpdateNormals command in there too.


_PJ_(Posted 2004) [#11]
Thanks for gettin back to me Jedive -
I DID receive an update for BSP factory (Ill double-check the version # when I get home)

I'm still not any cleaerer though - are you saying I should make the model FullBright???

How does one make lightmaps?


If not you will need an UpdateNormals command in there too.



I'll give that a try too!