Importing gile(s) lights

Community Forums/Developer Stations/Importing gile(s) lights

Hujiklo(Posted 2004) [#1]
Hi there - I'm a newbie in Blitz and Giles so this may well be an easy question to answer.
I cannot get any lights to be imported into my Blitz3d scene using the parseb3d bb file from Frecle.net.
I delete all referecne to the particles and include and call the parser in my main fps program but so far I have exactly zero realtme lights showing up in my 3d scene.
From a beginner's perspective, It would have been nicer if the so called example code actually imported and set up some realtime lights instead of just using the light positions as pivots for the particles - unless I really am so dumb as to have missed it.
I'm also lost as to where exactly the parser extracts the light positions and rotations as I cannot see any reference to them in the Type. fields...or for that matter even a mention of them in the Gile(s) help files under 'Exporting'

Any help would be extremely appreciated!


N(Posted 2004) [#2]
Try this one.


Beaker(Posted 2004) [#3]
I don't think he needs to use a gls importer for this.


Hujiklo(Posted 2004) [#4]
I tried your Code Noel - unfortunately it sort of hangs on my level gls file - perhaps it's too big? My gls files is over 4 meg. I dont have the ruins.gls to test it with either - but the standard Gile(s) scene hung on my computer, perhaps it was because that particular gls file has no textures??

Anyhow - thank you for replying and trying to help me out but your code is way above my head...I need simply to successfuly extract light data from a gile(s) exported B3d file.


IPete2(Posted 2004) [#5]
Hujiklo

I know that Dr. Who has done some work in this area for his Egypt level.

Send him an e-mail and see if he's still got the code which replaces torches set up in Giles... I think he will be able to help you as he already went through this learning curve.

IPete2.


N(Posted 2004) [#6]
I don't think he needs to use a gls importer for this.


I don't think anyone needs one, really, but it removes the need to export the model to another format.


Hujiklo(Posted 2004) [#7]
Thanks for the help everyone.

This particlular problem is now solved after 8 hours solid brain bashing - and it all came down to whether or not the level mesh is loaded as an anim-mesh or a plain mesh...sigh.

Make sure it's an anim-mesh people!


jfk EO-11110(Posted 2004) [#8]
I didn't read all comments here, sorry. My experience with this problem is: The parseb3d code works well, But you should use it with a file than contains only the lights of your level, this will make it faster as well. So use the Export Lights Function of Gile[s]

I also suggest to run the parser and write the light positions, colors etc. right to a simple textfile and use that textfile in your game, instead of the parser.

One thing is very sigificant: you should not use directx lights (createlight) because the more lights you got in the scene, the slower it gets, and 8 lights at the same time are the maximum anyway. So all you could do was to hide and show the 3 or 4 lights that are closest to the player dynamicly. But this would also result in popin/out fx, I don't know if this is a good idea.

Maybe you better write a special function that is using 2 or so lights that are paretnted to the camera, left and right side, then you would calcualte the lights red, green and blue that reaches the player from the giles exported information and set the LightColor of the 2 lights in a way that it kinda fits the lightmapping.


Hujiklo(Posted 2004) [#9]
Thanks for the tip jfx...I'll figure something to minimize the lights impact on performance...probably distance fade the rgb and then switch off would solve any problems of lights popping on and off...


Hujiklo(Posted 2004) [#10]
Thanks for the tip jfk...I'll figure something to minimize the lights impact on performance...probably distance fade the rgb and then switch off would solve any problems of lights popping on and off...