B3D question

Blitz3D Forums/Blitz3D Programming/B3D question

Spacemonkey(Posted 2003) [#1]
Might be a stupid question!

When you create a B3D file will your light and camera…. be present in that file, and if it dose, how do you gain access to those?


semar(Posted 2003) [#2]
The camera is not present, you have to set and use it in your code with the command:
yourcamera = createcamera()

About the light, I'm not 100% sure, but it is present in the form of an external lightmap file.

In any case, you can't access to any camera - because there's no camera in a .b3d file - and the only way you can access to the light, is modifing the lightmap file - if present.

Sergio.


WolRon(Posted 2003) [#3]
I'm not sure about the light (have only started messing with 3D) but the camera is a point of view set up by the game engine, not the file.


Spacemonkey(Posted 2003) [#4]
It is only the light, yes I do have a lightmap file, but that is only a *.BPM file – I don’t think any information about light will be present there anyway, or am I wrong, and why?


Mustang(Posted 2003) [#5]
.B3D is MODEL file, it does not have any other info. It has vertices, polygons and mapping coordinates for texturemaps, bones and animation data, but that's it - no light or camera info!


Spacemonkey(Posted 2003) [#6]
Problem solved then

Thank you...


Spacemonkey(Posted 2003) [#7]
Maybe I was to fast, still some problems width the texture…

When I remove the lightmap file from the directory where the *.B3D file is, every texture becomes very bright, and will not be affected by any light I create. But, the surfaces without texture, (plain colour) will be affected by my light.

Help!


Neo Genesis10(Posted 2003) [#8]
The liklihood is that the surfaces are still being affected by light, but it can be difficult to tell on plain surfaces. If not, Try using UpdateNormals.


Spacemonkey(Posted 2003) [#9]
No effect width updatenormals. But if save my file as *.x my light works 100% well, but then my lightmap is gone.

Maybe it’s the *.b3d file’s texture flags that is set to full bright, can that be change from code, after loading ?