Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / .X Files: Apply Texture, lose lighting?

Author
Message
LongFist
20
Years of Service
User Offline
Joined: 25th May 2004
Location: Winston-Salem, NC
Posted: 4th Oct 2004 07:31
Okay, I'm really enjoying getting into the swinng of DBP, but I've just encountered an issue that either I don't fully understand, or a most incredible bug. (I figure I just don't understand, so here goes...)

I've constructed a room in GameSpace 3D, exporting the elements (floor, leftWall, rightWall, Ceiling, etc.) of the room in .X for use in DBP. I built the textures in TextureMaker, and loaded them for application to the .X objects in the DBP app. But that's when I encountered this issue:

Even though the back of the room is empty (no wall), and I have a light in the center of the room, none of the objects react to the light: they are all dark, as though the room was devoid of light.



...above, I've included the subroutine that puts everything together. Then there's the routine I use (temporarily) to move the light around, to see if it's taken an effect on the objects present:



...mind you: I find this bizarre: I've used CrystalSpace (an Open-Source Multi-Platform C++ Game Development Engine) before to develop some simulations, but Crystal Space requires a looooong development cycle, for some of the simplest things.

But back to the point: why is it that, when I import a .X file, and apply a texture to it, does it fail to respond to the light? If I build the objects using the internal code (MAKE OBJECT SPHERE, for instance), and apply a texture to them, they seem to respond (somewhat) properly to the light source [overHeadLight]. No, I'm far from understanding everything, because the documentation is somewhat chaotic. But I'm REALLY giving it my best shot!

Could someone explain how it is that I'm falling for what is obviously a newbie issue? What do I need to do differently?

Thank you (in advance) for your time and attention,

LongFist
SuperProgrammer For Hire
FoxBlitzz
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 4th Oct 2004 08:23
Why don't you just simply export all the objects in the world as one .x and load them using the load object command?

HP Pavilion | Intel Pentium 4 CPU 2.40 GHz
512 MB Ram | NVIDIA GeForceFX 5600 AGP, with 256 MB Ram
LongFist
20
Years of Service
User Offline
Joined: 25th May 2004
Location: Winston-Salem, NC
Posted: 5th Oct 2004 12:30
To be honest, I don't have enough "time in the field" with DBPro to know how to texture all of the items from a single world export. And even then, how would I get them (the world) to work with a light? After I apply the textures, *poof* - it all goes dark. The background (I set one up) is still bright blue, like a deep July sky, but the pieces-parts of the world, after textures, just stop responding to the light source. (The room goes to black.)

I'm really having the devil's own time trying to figure it out. I long to be able to produce some of the fine work I've seen come from (collective) you guys - your work is so detailed: lighting, textures - I want to produce something similar. (Not patrronizing: just look down the User ShowCase http://www.thegamecreators.com/ on the left of the main page: I've done comparable work, but when working with BIG corporations, using $KiloBuxx game engines.

But - it appears that I can't. (Yet!) And that's why I've shelved my overly-large ego and come out to ask newbie-like questions. (Even at the risk of losing face!) I figure nobody ever woke up knowing it all, so <perhaps> I can rescue some of my dignity.

Back to the point: I've run out of things to try - apparently I haven't tried everything, or it would've worked. Or maybe I don't know the correct order of operations (sometimes that's important, especially in ray-tracing and calculating heat transfer coefficients), or maybe I'm extremely ignorant of light-mapping and applying shader FX.

(To my defense: ) I did purchase GameSpace3D [because I'm a previous Caligari product user - the learning curve is less than trying something totally new], and downloaded/installed NVidia's FX Composer (an incredible free product for producing .FX files from a wysiwyg-type interface - check out http://developer.nvidia.com/object/fx_composer_home.html for more/better details), so I have some of the tools necessary to accomplish my goals: but throwing money at a problem doesn't always fix it: it can't replace skill.

Anybody want to explain (basic) things to a guy who just might understand? Your time and talent would be well appreciated!!!

As always, I thank you (Evil Monkey) for your kind advice. I'll see what I can accomplish along the lines of your suggestion. (No promises, though - sometimes I work pretty slowly...)

LongFist
SuperProgrammer For Hire
LongFist
20
Years of Service
User Offline
Joined: 25th May 2004
Location: Winston-Salem, NC
Posted: 5th Oct 2004 12:42
Oh - btw: I *DID* try to "cheat" a little: I decided to build the room longhand, because the light seems to like this method better than loading .x files. I'll show you what I mean:



No, it's far from complete. But when you pilot the light around the room, the textures interact with it! So, making the room using "MAKE OBJECT ..." seems to have an advantage over loading .x files - but I could also be ignorant of something, thus hamstringing my own development cycle. (Actually, this is exactly the case...)

Nonetheless, you'll see a rectangle built and called [WindowSill1] --- I had intended to move it into position on the wall, and cut it out of the wall using CSG (constructive solid geometry - I know you already know, but I was making reference to avoid confusion with the DBPro [Compile CSG] command...).

Well, Murphy's Military Law states that "the problem with taking the easy way out is that the enemy has already mined it." No joke. There are (to my research) no CSG commands for DBPro objects created on-the-fly. So I'm back to Square 1: trying to figure out what I'm doing wrong with .x files.

Hey - it could be something as easy as the way I export the objects: I'm far from being a genius, the answers could be right there, and I'm too dumb to see 'em.

Once again, thank you guys for your time and talents: one day I might be able to provide help to others as well.

Have a terrific day!!!

LongFist
SuperProgrammer For Hire
bibz1st
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 10th Oct 2004 02:07
maybe it is to do with which way the normals are facing???????
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 1st Nov 2004 10:13
Way late picking up on this thread - but incase you didn't find the solution, have a look at the demo program that came with dbp - the one with the lights moving around the staue (a .x object). I had the same problem with lighting .x objects, and although I can't remember the exact solution now, I do remember I found it by looking at that code. (I think it was something to do with set object specular power 0, or something - or was it hide light 0 - I can't remember now.)


Login to post a reply

Server time is: 2024-09-23 04:24:45
Your offset time is: 2024-09-23 04:24:45