Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 7th_zorro), 1,203 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
Baked shadows and entity lighting #206828
05/15/08 21:58
05/15/08 21:58
Joined: Jul 2005
Posts: 366
eleroux Offline OP
Senior Member
eleroux  Offline OP
Senior Member

Joined: Jul 2005
Posts: 366

Hi! These are my first experiences with shadow and texture baking in Blender. I'm doing fine so far.

Shadow baking is great because you can get a more sophisticated shading than with A7 compiler, but I can find some problems right away.

For instance, 3dgs does an excellent job by lighting the entities after the shadowmap/lightmap on the floor it stands ((in A7 this has noble name of PRV - Precomputed radiance Volumes. Every entity gets its radiance color value from the nearest radiance plane below its origin) as in this picture:


Question is, how can I have something like PRV with generated shadows in meshes? as to avoid this:




I know there are people with years of experience baking shadows. Any solution you care to share? Or... maybe the engine supports some kind of separated lightmap for imported geometry?

Thanks!

Emilio

Re: Baked shadows and entity lighting [Re: eleroux] #206845
05/16/08 00:15
05/16/08 00:15
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
the trick is to trace from the player to the object beneath him/her, get the ambient value and apply it to your model, I think if you look up c_trace it tells you what the trace returns.
BTW: I have not forgotten about my baking tutorial....just busy ATM..

-Justin


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Baked shadows and entity lighting [Re: Nowherebrain] #206846
05/16/08 00:26
05/16/08 00:26
Joined: Jul 2002
Posts: 1,364
Minbar
M
MaxF Offline
Serious User
MaxF  Offline
Serious User
M

Joined: Jul 2002
Posts: 1,364
Minbar
Hi

Is not c_trace slow?

Conitec should help with this! don't you think?


Re: Baked shadows and entity lighting [Re: MaxF] #206851
05/16/08 01:11
05/16/08 01:11
Joined: Jul 2005
Posts: 366
eleroux Offline OP
Senior Member
eleroux  Offline OP
Senior Member

Joined: Jul 2005
Posts: 366
I was hoping a better solution that wasn't overcoming the whole lighting process manually, using c_trace and doing my own entity lighting. Well, it's a solution, but I hope there's something more engine-wise.

..maybe a second set of coordinates that could be replace the 'radiance maps' in arbitrary geometry. Or maybe a lightmap that is generated but not displayed on the geometry. I was hoping something like that existed already. Maybe people at Conitec already have a solution for this...

Emilio

Re: Baked shadows and entity lighting [Re: eleroux] #206907
05/16/08 13:18
05/16/08 13:18
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
What's wrong with using the c_trace?
You are tracing to handle the gravity anyway!

If your entity is above an entity the trace returns "you" for the entity.

Maybe I'm wrong, but I would write something like this after the trace instruction:
if(you != 0)
{
my.ambient = you.ambient;
}

From the manual:
"
you If the obstacle was an entity, the you pointer is set to that entity; otherwise it's set to NULL
"
online manual

Re: Baked shadows and entity lighting [Re: Pappenheimer] #207001
05/17/08 00:18
05/17/08 00:18
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
fade it into the you's.ambient value(makes the transition smooth) using some testing, and c_trace is only slow if many ents. are doing it, and at what length the trace is.


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Baked shadows and entity lighting [Re: Nowherebrain] #207173
05/18/08 08:52
05/18/08 08:52
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
the ambient value is the same for the whole entity. you have to get the texture's pixel colour. if c_trace with SCAN_TEXTURE can't do the job for entities (i'm not sure here) you should try a view with size 1x1 pointing downwards and reading the texture information via bitmap instructions.

Re: Baked shadows and entity lighting [Re: Joey] #207290
05/18/08 23:09
05/18/08 23:09
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
correct, but you can read the lighting on bsp levels I think.


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Baked shadows and entity lighting [Re: Nowherebrain] #207293
05/18/08 23:25
05/18/08 23:25
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Sorry, I missinterpreted what I saw on the last screenshot. I thought the bright model stood _on_ a dark entity. Now, I see it is standing in the shadow of a block or something! Sorry, for the confusion!

Re: Baked shadows and entity lighting [Re: Pappenheimer] #207295
05/18/08 23:37
05/18/08 23:37
Joined: Jul 2005
Posts: 366
eleroux Offline OP
Senior Member
eleroux  Offline OP
Senior Member

Joined: Jul 2005
Posts: 366
Yeah, the character is standing on a dark BAKED shadow.
I don't think it should be correct to read the texture color in this case. A dark or light floor doesn't necessarily mean a light or a shadow.

Unless I take the next c_trace, making sure it's a block and not arbitrary geometry (can this be done?). But even if it's possible, I'd have to reproduce the lights using blocks in WED.

I have heard of a second set of uv coordinates in MED, and soon in the engine. I wonder what can be done with them.

EDIT: I should have read the beta log more carefully:

Quote:

(X) MEDB now supports a second UV set on skins, for special purposes such as shadow mapping. The second UV set is also stored in the MDL7 file, but not yet used by the engine.


I assume a solution is underway.



Last edited by eleroux; 05/18/08 23:47.
Page 1 of 5 1 2 3 4 5

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1