A Problem .... does anyone know why?
A Problem .... does anyone know why?
doesn't the dynamic light in the engine give an effect of shading on the .bsp maps......
How do u implement shadowing of .bsp elements on the map.....
How do u implement shadowing of .bsp elements on the map.....
-
- Posts: 162
- Joined: Wed Nov 26, 2003 5:24 pm
- Location: Europe
check out the techdemo code, it's right there...
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
I cant help you with the first part of your questions but I can with the second óne.
I'm just beginning so mainly my experience has to do with loading a Quake 3 bsp into Irrlicht and adding an fps camera.
About shadows in bsps, they are calculated and lightmapped all over the textures in your bsp. In other words. The lights you place in your level editor and the shadows they cast (as well as their intensity and color values, and any sky shader that casts light) will be fixed to the bsp after compiling with your favorite editor.
check this:
I'm also very interested in using Irrlicht's dynamic lights but dunno how to.
cheers.
ps. My only advice would be to pick a good level editor that compiles a proper Q3 bsp. If you are not doing anything commercial then GtkRadiant is the best, in other cases I'd recommend the Quake Army Knife, aka QUARK.
cheers
I'm just beginning so mainly my experience has to do with loading a Quake 3 bsp into Irrlicht and adding an fps camera.
About shadows in bsps, they are calculated and lightmapped all over the textures in your bsp. In other words. The lights you place in your level editor and the shadows they cast (as well as their intensity and color values, and any sky shader that casts light) will be fixed to the bsp after compiling with your favorite editor.
check this:
I'm also very interested in using Irrlicht's dynamic lights but dunno how to.
cheers.
ps. My only advice would be to pick a good level editor that compiles a proper Q3 bsp. If you are not doing anything commercial then GtkRadiant is the best, in other cases I'd recommend the Quake Army Knife, aka QUARK.
cheers
Afecelis,afecelis wrote: I'm also very interested in using Irrlicht's dynamic lights but dunno how to.
...
ps. My only advice would be to pick a good level editor that compiles a proper Q3 bsp. If you are not doing anything commercial then GtkRadiant is the best, in other cases I'd recommend the Quake Army Knife, aka QUARK.
To call for a dynamic light, it's very simple. Below, as Dave Chappelle would say, "it's how I do..." (in a Tyrone Biggums voice):
Code: Select all
scene::ILightSceneNode* Light;
Light = device->getSceneManager()->addLightSceneNode(0,Pos,color,Size);
BTW, I believe QuArK relies on GTKRadiant to compile the BSP by default, which can be changed. There exists an open-source compiler for BSPs on SourceForge, which I don't remember the name at the moment. You can find about it on the HOWTO forum. I believe it's in one of the stickys there.
Hope this helps.
P.S. Cool screenshot. That is tight!
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
- E.W. Dijkstra
Thanks for the comment and the help, Luke!
I got a question, though. Dynamic lights don't affect the lightmap of the bsp I'm already loading, right? For what I've read, dynamic lights only affect imported models (3ds,.x,obj,ms3d) and if they are set to be affected by it (set to true for receiving light or casting shadows), correct?
That means you must have planned in advance in which places of your map you'll place models to receive the dynamic light, and reinforce the ambiance of its surroundings with lightmaps compiled from the level editor, correct?
questions questions questions! I have a lot of things to try now.
thnx
I got a question, though. Dynamic lights don't affect the lightmap of the bsp I'm already loading, right? For what I've read, dynamic lights only affect imported models (3ds,.x,obj,ms3d) and if they are set to be affected by it (set to true for receiving light or casting shadows), correct?
That means you must have planned in advance in which places of your map you'll place models to receive the dynamic light, and reinforce the ambiance of its surroundings with lightmaps compiled from the level editor, correct?
questions questions questions! I have a lot of things to try now.
thnx
I'll be honest, I haven't messed with dynamic shadows; however, from what I've seen of it, the BSPs don't cast shadows from dynamic lights, but will receive shadows from other objects in the 3D world. Also, the BSP should receive dynamic light depending on the setMaterialType() you specify. If you're not getting your BSP to respond to your dynamic lights, the best bet would be that you haven't called the following, or something very close to it:
If that's not it, check and see what video::E_MATERIAL_TYPE you have specified when you call setMaterialType(), as certain values disable dynamic lighting.
Code: Select all
BSPNode->setMaterialFlag(video::EMF_LIGHTING,true);
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
- E.W. Dijkstra
bah, what does djykstra know heh lol
hey dude, i LIKE OOP. it WORKS mate...
heh though you arent alone if you do share that opinion, ive met a lot of guys who are all about old school c and hate all the OO stuff.
anyways, i is out
-Ted
heh though you arent alone if you do share that opinion, ive met a lot of guys who are all about old school c and hate all the OO stuff.
anyways, i is out
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Re: bah, what does djykstra know heh lol
Actually, I like OOP as well. But, as a network engineer by trade, I have to give props to the father of OSPF. And, I just thought it was a very strange quote.buhatkj wrote:hey dude, i LIKE OOP. it WORKS mate...
heh though you arent alone if you do share that opinion, ive met a lot of guys who are all about old school c and hate all the OO stuff.
anyways, i is out
-Ted
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
- E.W. Dijkstra
Smartwhiz,
For us to discern what you're doing wrong, we have to know what you're doing to begin with. If you can, please post all code related to your BSP.
One other thing to consider is that dynamic lighting is per-vertex. In other words, each triangle in the 3D mesh will get a different shade; however, each pixel within the triangle itself it will have an equal shade level, and, in comparison other pixels within the same triangle, will look unshaded. This can be an issue considering that many BSPs, esp. in large rectangular areas, tend to be represented by few vertices. So, take for example, a large room could have only two light levels represented on the floor since only two triangles would exist within this room.
Hope this helps.
For us to discern what you're doing wrong, we have to know what you're doing to begin with. If you can, please post all code related to your BSP.
One other thing to consider is that dynamic lighting is per-vertex. In other words, each triangle in the 3D mesh will get a different shade; however, each pixel within the triangle itself it will have an equal shade level, and, in comparison other pixels within the same triangle, will look unshaded. This can be an issue considering that many BSPs, esp. in large rectangular areas, tend to be represented by few vertices. So, take for example, a large room could have only two light levels represented on the floor since only two triangles would exist within this room.
Hope this helps.
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
- E.W. Dijkstra