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.

3 Dimensional Chat / Help! I can't light my .x objects

Author
Message
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 3rd Aug 2004 06:32
Hi,

I've exported my models as .x objects (from 3D canvas), and loaded them succesfully into DBpro. However, other than the ambient light, lights do not affect my .x objects in any way. I have tried SET OBJECT LIGHT but still nothing - they all look really dull.

Please can someone help me with this? By the way, I know about lightmapping/baking, and this isn't what I'm trying to do - I need real time lighting.

Thanks

Richard.
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 3rd Aug 2004 07:54
Have you tried putting lights there in the first place, and if so, were they pointing at the object?

AMD Athlon XP2800+
GeForce FX5200 128MB
1024MB DDR 333MHz RAM
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 3rd Aug 2004 09:16
OK, yes, I've got lights pointing the right way, and it's only the .x objects that aren't affected by lights - objects created in DBPro are fine.

But what I just realised is that if I write

SET OBJECT SPECULAR POWER object,0
SET OBJECT SPECULAR object,rgb(255,255,255)

for each object, they are now lit up by the lights. The problem is though that the shadow on the object is really rubbish - I mean blocky and slow to update - not like the smooth shadows I'm getting on the normal objects. I also have a feeling that I shouldn't need to do this specular thing anyway - surely nobody else has to do that to get x objects lit?
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 3rd Aug 2004 11:42 Edited at: 3rd Aug 2004 11:43
Right - in answer to my own question, I now realise that what I needed to do was:

set normalization on
set object specular (object),0

and all works fine!!

Now if anyone has or may at some point write a beginners guide to 3D modelling, that needs to go on page 1 - it took me two weeks to realise how to do that!
walaber
22
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 3rd Aug 2004 13:05
if the normals are properly set up in the modeller, you shouldn't need to use that command at all... look into the various smoothing options in your modeller!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 3rd Aug 2004 14:35
Hmmm.... no, you've lost me. I'm using 3D Canvas which was bundled with DBPro, and I can't find anything about 'setting up normals' - or anything that even mentions anything about 'normals'. But hey, I've got it working even if it is a cackhanded way of doing it!
walaber
22
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 3rd Aug 2004 16:58
a "normal" is something that tells a 3D progam which way something is facing. 3D rendering programs use normals when lighting objects. although 3D Canvas may not use the word "normals" outright, believe me, it's using them. I don't personally use 3D Canvas so I can't give specific information, but there are probably commands for "smoothing" or "welding" which are commands that let you control normals.

I'm sure some 3D Canvas users here can give some more specific help.

but your right, if you've fixed the problem, it's a moot point.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 4th Aug 2004 04:42
Thanks walaber - I'm still learning what all the many things do in 3DC - could time me a while!
Narf The Mouse
21
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 4th Aug 2004 07:41
I tried your commands on a 3d .x object I exported from the geoscape demo. Didn't work. Anyone have any idea why? This is what I used:

set normalization on
SET OBJECT SPECULAR POWER 1,0
set object specular 1,0

So, why would it work for you but not for me??

Cheese!
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 4th Aug 2004 09:47
Do you have the same problem with the lights not affecting the object?

If so, I also used these settings which may or may not be relevant: HIDE LIGHT 0 and SET AMBIENT LIGHT OFF
Also, try setting object specular power to different values between 0 and 1 and see what happens.
Narf The Mouse
21
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 4th Aug 2004 10:31 Edited at: 4th Aug 2004 10:38
Well, I'm using light zero as one of my lights. Which might not be a good idea. When I turn it off, the whole object goes dark, so I'm going to see what happens if I use a different light.

Nope. Switched to a different light, no change. And I know the light is working, the moon I have orbiting the sun is lit up.

Cheese!
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 4th Aug 2004 16:18
Can't think what else it might be, but my suggestion is to do what I did in the end - find someone elses program code that has .x objects in it that are lit properly, and replace your .x object for theirs in their program. Then, if it doesnt light properly, you know it's a problem with the object, but if it does, its a problem with your code and therefore nick their's! The program I used was the 'lights' example that came with dbpro.
Narf The Mouse
21
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 5th Aug 2004 03:18
Well, I tried a textured object I made in milkshape in it and it worked, so the most likely conclusion is that not recieving lighting is a property of demo terrain. I'll ask technical support.

Thanks anyway.

Cheese!
Narf The Mouse
21
Years of Service
User Offline
Joined: 16th Jul 2004
Location:
Posted: 5th Aug 2004 09:13
According to tech support geoscape terrains are pre-lit diffuse and don't accept dynamic lighting. Currently waiting on a reply on wether that can be turned off.

Cheese!

Login to post a reply

Server time is: 2026-07-07 00:31:24
Your offset time is: 2026-07-07 00:31:24