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 2 of 5 1 2 3 4 5
Re: Baked shadows and entity lighting [Re: eleroux] #207300
05/19/08 01:41
05/19/08 01:41
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
maybe you could project a light map upon the entire level, much like a bmap for entity above the level??? At that point you may as well use a shadow mapping shader though...


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Baked shadows and entity lighting [Re: Nowherebrain] #207303
05/19/08 03:05
05/19/08 03:05
Joined: Jul 2005
Posts: 366
eleroux Offline OP
Senior Member
eleroux  Offline OP
Senior Member

Joined: Jul 2005
Posts: 366
I just found The trick! *dances*

Easy like heck. It's exactly the opposite of a Shadow Mapping Shader. You just let the Map Compiler shade the geometry as usual, and then remove the shading in realtime with a simple material!

If someone is interested, this is the workflow:

-Model geometry in your favorite 3d app, then bake the shadows and textures at will (in a single skin, usually).
-Import in WED. Add lights (*SEE BELOW) and set the mesh as SHADED (not FLAT).
-Let WED create the lightmaps as usual. WED will generate a second entSkin to store the shadows of the mesh.

-Assign a little material to the meshes so it doesn't render the shadows!

This is the most simple material. The only thing it does is to 'paint' the mesh with its own skin, ignoring the shadowmap skin. So, basically your mesh will look exactly as FLAT shaded (showing only the beautiful baked shadows), but the lightmaps will be still working, so the entities standing on it will still be lit correctly.

Code:
material mtl_nolightmap
{
effect=
	"
	
	texture entSkin1;

	technique nolightmap
	{
		pass p0
		{
		  Texture[0] = <entSkin1>;
		  			
	  	  ColorArg1[0] = Texture;
		  ColorOp[0] = AddSigned;
		  ColorArg2[0] = Current;
		}
	}
	";
}




Please forgive me because I never coded materials before, so I don't know if this is correct way to code it. I just stole scraps of code from other complex materials I found around. It works so far.

* About adding lights: You may have to manually recreate in WED the light positions you used in your modeling 3d app, so the lightmaps will correspond to the baked shadows. But the good news are that very soon we'll be able to import whole arbitrary 3D levels including lights:

http://www.conitec.net/beta/wed_import.htm

Re: Baked shadows and entity lighting [Re: eleroux] #207304
05/19/08 03:19
05/19/08 03:19
Joined: Jul 2005
Posts: 366
eleroux Offline OP
Senior Member
eleroux  Offline OP
Senior Member

Joined: Jul 2005
Posts: 366
Again, it's my first time with materials. But this mat is shorter and it works. Is it wrong?

Well, it was about time I started with Materials anyway.. *goes studying*

Code:
material mtl_nolightmap
{
effect=
	"
	technique disable_lightmap
	{
		pass p0
		{
		    ColorOp[2] = Disable;		
		}
	}
	";
}


Re: Baked shadows and entity lighting [Re: eleroux] #207346
05/19/08 09:37
05/19/08 09:37

F
Fear411
Unregistered
Fear411
Unregistered
F



why not use the supertrace plugin from ventlator.
Search for it in the Forum. There is a A6 and a A7 version.

Re: Baked shadows and entity lighting [Re: ] #207479
05/20/08 02:04
05/20/08 02:04
Joined: Jul 2005
Posts: 366
eleroux Offline OP
Senior Member
eleroux  Offline OP
Senior Member

Joined: Jul 2005
Posts: 366
I seaarched for it and I found it. It's an awesome plugin!

I am sure I will use it - but in this case I think the solution was rather simple, since the lighting of the entities (PVR) will be handled by the engine as usual.

Re: Baked shadows and entity lighting [Re: eleroux] #207641
05/21/08 12:34
05/21/08 12:34
Joined: Oct 2006
Posts: 470
Balkan
Ganderoleg Offline
Senior Member
Ganderoleg  Offline
Senior Member

Joined: Oct 2006
Posts: 470
Balkan
Hello,

I am extremely interested in this topic and the possibility of making shadows outside Game Studio that can interact with my in-game models.

But I have a little problem- I don’t see how I can import my wed-made models (with textures) in Blender? I only seen option to export them to FBX.

Is there a way to do this with Blender or is there some other program that you would recommend for this? Max and Maya and everything over 100 Euros is out of my budget (if you can call it budget) grin


>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<

Re: Baked shadows and entity lighting [Re: Ganderoleg] #207643
05/21/08 12:43
05/21/08 12:43
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
blender has no fbx importer at the moment.

you could look for my obj exporter script which i posted in the lite-c contributions forum. with some small changes it would also work with level geometry.



...
there is no need for supertrace anymore. c_trace can do that too now (at least in the beta - i am not sure about the last official release).

Re: Baked shadows and entity lighting [Re: ventilator] #207647
05/21/08 13:07
05/21/08 13:07
Joined: Oct 2006
Posts: 470
Balkan
Ganderoleg Offline
Senior Member
Ganderoleg  Offline
Senior Member

Joined: Oct 2006
Posts: 470
Balkan
Thanks I will look it up smile

…I’m not much of a programmer frown so I don’t think I will be able to handle it if it needs difficult modifications but I will give it a try.

What about this Milkshape thing? I can see on their page that it supports Alias FBX? Has anyone worked with Milkshape and is it possible maybe to do something with this software?


>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<

Re: Baked shadows and entity lighting [Re: Ganderoleg] #207649
05/21/08 13:21
05/21/08 13:21
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
you could also try to export as mdl from WED and then use my unmodified obj exporter with the mdl.

Re: Baked shadows and entity lighting [Re: ventilator] #207681
05/21/08 16:52
05/21/08 16:52
Joined: Oct 2006
Posts: 470
Balkan
Ganderoleg Offline
Senior Member
Ganderoleg  Offline
Senior Member

Joined: Oct 2006
Posts: 470
Balkan
Half of baking work went o.k. grin

I convert my wed-model to fbx, then I convert fbx to obj and I import obj file in Blender.

I adjust default light and I do Render->Render Current Frame just for fun: Everything is there from textures to shadows.

Then I try Render->Bake Render Meshes->Full Render and Blender displayed error: No images found to bake to.
… so I select model and do the same Full Render- Blender goes crazy and all black???

Is there a tutorial about this Blender-baking thing… or maybe if it’s not really difficult someone can just tell me few important steps…? smile

Thanx...


>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<

Page 2 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