Search found 16 matches

by scgtrp
Tue Jun 23, 2009 3:05 am
Forum: Beginners Help
Topic: Lights from .irr scenes not working
Replies: 9
Views: 646

Okay, I've done all that, but now the intensity of the light appears to depend on the intensity of the ambient light. If it's pitch dark (no ambient light) the light doesn't show up at all, and if I set the ambient light to (0.2, 0.2, 0.2) the light is there, but much dimmer than it looks in Blender ...
by scgtrp
Mon Jun 22, 2009 6:18 pm
Forum: Beginners Help
Topic: Lights from .irr scenes not working
Replies: 9
Views: 646

Thanks. By the way, any idea how to stop the GUI from recieving events when the game isn't paused? (Returning true from my event reciever won't work, I need them to go to the FPS camera.)
by scgtrp
Mon Jun 22, 2009 5:53 pm
Forum: Beginners Help
Topic: Lights from .irr scenes not working
Replies: 9
Views: 646

It looks like Irrlicht's vertex lighting doesn't like scaling (for point lights). If you apply the scale to your mesh in Blender (CTRL-A) before exporting, it should work as expected.

Also, if you add a material to your mesh, you won't need to manipulate the lighting flag in your code. For more ...
by scgtrp
Fri Jun 19, 2009 7:29 pm
Forum: Beginners Help
Topic: Lights from .irr scenes not working
Replies: 9
Views: 646

Lights from .irr scenes not working

I have an .irr scene exported from Blender (http://pastebin.ca/1466626) with a light and an empty room. The light is indeed in the XML, but when I load it (either via my code or the LoadIrrFile example) and enable lighting on the mesh, it acts as if the light isn't there at all. If I create a light ...
by scgtrp
Thu Jun 18, 2009 10:09 pm
Forum: Beginners Help
Topic: Model formats
Replies: 4
Views: 377

It appears to work fine when I merge all the boxes into one big mesh (aren't walls usually attached to the floor anyway?). I'd still like to know what caused that in case it happens again later.
by scgtrp
Thu Jun 18, 2009 9:47 pm
Forum: Beginners Help
Topic: Model formats
Replies: 4
Views: 377

How have you defined the ZFAR of your camera. Look like the polygon was clipped.
3000. I'm not sure it's clipping, as it happens even if I move right next to the wall, and only happens on two of the four walls.

If you do level, I don not recommend that you do HUGE polygons. Try to split them ...
by scgtrp
Thu Jun 18, 2009 8:06 pm
Forum: Beginners Help
Topic: irrlicht's string class template [Solved]
Replies: 11
Views: 785

Yes, it seems you're right. I did come up with this funky syntax which works, but looks horrible unless you're entering the IOCCC:

Code: Select all

(((mxy += 123) += L", ") += 456);
by scgtrp
Thu Jun 18, 2009 8:00 pm
Forum: Beginners Help
Topic: irrlicht's string class template [Solved]
Replies: 11
Views: 785

Strange. I didn't test what I posted, just took a look at the API docs - I read it as the rectangle actually being used as a rectangle and not a point, i.e. the text would be clipped to fit inside that rectangle.

Try using += 3 times to test your theory. It could be true.
by scgtrp
Thu Jun 18, 2009 7:44 pm
Forum: Beginners Help
Topic: irrlicht's string class template [Solved]
Replies: 11
Views: 785

Try this:

Code: Select all

fWhite->draw(mxy.c_str(), rect<s32>(50, 100, 150, 130), SColor(255, 255, 0, 0));
by scgtrp
Thu Jun 18, 2009 7:25 pm
Forum: Beginners Help
Topic: irrlicht's string class template [Solved]
Replies: 11
Views: 785

The += operator converts it for you. = is assuming you meant 123 as in whatever ASCII character 123 corresponds to ({?). You could, however, do

Code: Select all

string<wchar_t> s;
s += 123 + L", " + 456;
by scgtrp
Thu Jun 18, 2009 6:54 pm
Forum: Beginners Help
Topic: irrlicht's string class template [Solved]
Replies: 11
Views: 785

Code: Select all

string<wchar_t> s;
s += 123;
s += L", ";
s += 456;
std::wcout << s.c_str() << std::endl;
Note that you don't need to use a pointer, and if you did you'd want to initialize it to something (how did yours not crash?)
by scgtrp
Thu Jun 18, 2009 4:20 pm
Forum: Beginners Help
Topic: Model formats
Replies: 4
Views: 377

Got .irr files to work - it sometimes helps to read to the end of the tutorial to see if they tell you the answer :-)

Now I'm having some kind of graphics bug - if I look at two of the walls at the wrong angle, they disappear completely. The other two are always there.
http://img7.imageshack.us ...
by scgtrp
Thu Jun 18, 2009 3:30 pm
Forum: Beginners Help
Topic: Model formats
Replies: 4
Views: 377

Model formats

What model formats would you recommend for maps and for models?

For maps, I want to be able to create a map in Blender, complete with lights and everything, and export the whole thing. I don't really want to use the BSP format because of its obsession with telling me I have leaks in my map (I plan ...
by scgtrp
Mon Jun 16, 2008 10:12 pm
Forum: Beginners Help
Topic: Collision detection hitting invisible walls
Replies: 9
Views: 1018

After poking around on the forum I noticed a few people said .x loading was buggy. Just tried 10 or so other formats - some do the same thing as .x, while others let me go straight through the ground.