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.

DarkBASIC Professional Discussion / Advanced Lighting Problems

Author
Message
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 25th May 2012 05:43 Edited at: 26th May 2012 04:08
Edit: New problem. Fixed the last one.

Object_Add() - Removes the textures for some reason



Here's a screenshot:


---------------------------------------------------------------------

I can't seem to get the objects to show up for some reason they have disappeared. I have no idea why cuz I used the same code from the example.

Here is the code I use:


There is suppose to be an entire destroyed town!

Here is a screenshot:


Thanks in advance for your help,

PS. Sorry for all the posts I've been working in overdrive lately.

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 25th May 2012 07:58
Did you use SET OBJECT EFFECT and texture all the appropriate layers of the object?


DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 25th May 2012 08:40
@CumQuaT - I didn't set any effects on the objects. I tried just for the heck of it and I still wasn't able to get it to work when I applied the effects.

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 26th May 2012 04:07 Edited at: 26th May 2012 04:08
Edit: New problem. Fixed the last one.

Object_Add() - Removes the textures for some reason



Here is a screenshot:


Thanks,

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 28th May 2012 17:01
@DigitalFury
You need to manualy apply the textures using texture object. If you just put the textures in the same directory as your models it won't work.
Also make sure you apply an effect to the object. The effect needs to be added using Effect_Add(id)

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 29th May 2012 01:24
I thought I might have to re-texture everything manually. That will be a lot of work considering everything is automatically textured. :/

Thanks,

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 29th May 2012 08:58 Edited at: 29th May 2012 09:02
Edit: It appears that AL has changed enough since I last worked with it to make this response unhelpful...
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 29th May 2012 09:02 Edited at: 29th May 2012 09:03
@revenant chaos - Ok, thanks. I'll just have to write some code for automatically loading/applying textures based on the name. (Hopefully it is the same as the texture file name)

Another problem solved! Onward with development!

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 29th May 2012 09:04
I just looked at AL and it appears AL now uses stage 7 rather than 0, you could try reading the texture ID, calling Object_Add(), then re-applying the texture.
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 29th May 2012 21:20
@revenant chaos - Wow, really? That is weird.

Thanks,

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 30th May 2012 06:14 Edited at: 30th May 2012 06:15
No its actually helpful; by uses stage 7 I meant for its "WorldLight" texture, and as so shouldn't cause any problems when objects have their diffuse texture applied to stage 0.

In older versions of AL the worldlight texture was applied to stage 0, and needed the diffuse on tex stage 1 (this is no longer true).

With AL, every object (which you intend to be illuminated by AL) will need to have a shader applied to it for its various renders (WorldPosition, WorldNormals, etc...). The Object shaders will be found within "AdvancedLighting\Shaders\Mesh\".

ALL objects in the scene (even those which aren't handled by AL) will need their camera mask to be adjusted to avoid conflicting with AL's rendering.
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 30th May 2012 08:10
@revenant chaos - Cool I didn't know that.

DigitalFury

Get Out Alive (Zombie WIP): My latest zombie game I am working on.

Login to post a reply

Server time is: 2026-07-07 22:21:49
Your offset time is: 2026-07-07 22:21:49