home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Dynamic lighting for real time deformation

by lidra on 12/14/2010 15:35, 29 messages, last message: 02/01/2011 19:02, 10044 views, last view: 05/05/2024 20:41

I prefered to put this message in the general forum due to the fact that it's programmer stuff.

Our team is making a little game with the cube 2 engine which will have real time terrain deformation for the university (a worms 3d clone).
Now the only deformation we've implemented is to remove an octree for every shot :).

As you know this f**ks up the lighting so we're wondering if it's worth to implement a dynamic light system .
Can anyone give us some tips (theorical or practical).
Is there another way of lighting in cube 2 engine?

Last thing: is it possible to code stuff like the weapons in the cube scripting language? If not is it better to use lua or python? How (in theory) can we implement them?

Thanks,

lidra

Go to first 20 messagesGo to previous 20 messages    Board Index   

#10: i want to edit my posts!!!

by derWalter on 12/16/2010 09:45

just found some beautiful ingame screenshots:

http://img10.imageshack.us/img10/4831/ns22010120717343123.jpg

http://img9.imageshack.us/img9/4825/ns22010120721313982.jpg

http://i33.photobucket.com/albums/d93/WhiteZero/ns22010-11-2518-49-15-38.jpg

http://img231.imageshack.us/img231/5009/32911963.jpg

http://img251.imageshack.us/img251/3319/ns22010120120310189.jpg

http://img27.imageshack.us/img27/8302/ns22010120120493844.jpg

this was definitely a bug, but looks awesome:
http://img33.imageshack.us/img33/5668/ns22010120322390980.jpg

want to edit my postst!!!

reply to this message

#11: ..

by eihrul on 12/16/2010 10:38

I think it is critical to point out that some slime covering the walls does not equal geometry deformation on the scale this guy is looking for...

Hell, if all that is needed is some destructible terrain, then just making a heightmapped terrain or voxels/marching cubes is not really that difficult for rolling your own small engine.

reply to this message

#12: ..

by derWalter on 12/16/2010 15:28

the infestation is GROWing over the actual geometry and you can push it back by using the flamethrower, so it is some kind of geometrycreation and deformation.

reply to this message

#13: Re: ..

by SheeEttin on 12/17/2010 06:06, refers to #12

I doubt it's actual geometry deformation. Probably more like additional geometry coming through the floor/wall/whatever.

But back to dynamic lighting: Nothing good will come of dynamic lightmaps. If you want dynamic lights, you'll want REAL dynamic lights.

I'm actually interested to see what performance would be like if light entities were dynamic lights.

reply to this message

#14: ..

by derWalter on 12/17/2010 09:03

ns2 is 100% dyn lightning.

maps got around 2000-3000 light sources

and fps get better and better with every patch :)

reply to this message

#15: Re: natural selection 2

by lidra on 12/17/2010 14:33, refers to #8

thanks to all you.
I took a look at the spark engine,but it wasn't what we're searching for because of the fact that only one of our team use windows so the engine must be opengl based ( and i prefer it open source :) ).
By the way, remember that's nothing big game, it's only an university project.
We have a lot of time to spend (till April) and we've chosen the cube engine 2 just because initial mapping is veeery simple.
Now I took a look at the termite engine (ogre based I think with a voxel/polygon terrain) http://www.thermite3d.org/joomla/
can someone tell me if we can model the maps in sauerbraten or in a modeling program (we use maya and blender) an make them destructible in this engine?

reply to this message

#16: Re: natural selection 2

by eihrul on 12/17/2010 14:56, refers to #15

Sauerbraten can produce maps in .obj format, but that only gives you a textured shell which doesn't map well to voxels. Honestly, it is not that hard to make a simple level editor if you're already making something that can create/destroy geometry. Sure, the levels may not look spectacular, but it is a university project so I don't see that being a big deal.

reply to this message

#17: Re: natural selection 2

by lidra on 12/17/2010 16:32, refers to #16

you're right :)

reply to this message

#18: Re: natural selection 2

by derWalter on 12/17/2010 21:34, refers to #15

in future it will support lnx and osx too - but not now ^^ - and if its a little thing to do, than do it scripted if you can, without all the heavy cpp stuff loaded :)

i hope for the new cube engine released 2011


cube3?

reply to this message

#19: Re: natural selection 2

by baby~rabbit on 12/18/2010 01:28, refers to #8

One post of advertising was enough, this forum is for cube after all.

reply to this message

#20: Message censored by administrator

by derWalter on 12/18/2010 01:48

#21: Re: ..

by suicizer01 on 12/18/2010 15:22, refers to #14

Can that guy spam around on Natural Selection 2 forums, instead of Cube Engine's forum :P?

Ah well, thx anyways for the info derwalter...

reply to this message

#22: ..

by derWalter on 12/19/2010 16:04

QQ - I AM!! :D

you are welcome ^^

reply to this message

#23: ..

by .sCaSd. on 01/09/2011 03:54

There is no dynamic light currently. You have to optimize Sauerbratens patchlight function.
A very small map together with high lightprecision (512 upwards) might be fast enough. Also set lightthreads to your machines core-count.

example-script of a tiny (and slow) geometry-blow mod:



lightthreads 4 // quad-core
map metl4
lightprecision 1024
gridpower 4 // big holes
pvs 0 // disable potential-visibility-set culling
bind mouse1 [attack; sleep 1 [edittoggle;sleep 1 [editdel;patchlight -1;edittoggle]]]



Now left clicking in coop-edit gamemode digs you holes into walls. This also works in multiplayer as long as everyone is at server when match starts. Otherwise you have to call sendmap function to sync levels. Setting server to mastermode 2 and toggling spectator-mode for every new player per script when a new map loads is another quick & dirty sulution.

Maybe rewriting the lightmap-code and use sauerbratens blendmap-feature to darken unlit areas is a good plan. showblendmap script command is much faster. You dont have to patchlight/remip in this case but parallax is not working without proper lightmap.

Best is you turn lightmaps into inverted blendmap with a dark texture as layer and back to lightmap later in shader. This requires some knowledge of Sauerbratens core.
See file stdshader.cfg/glsl.cfg and search "worldshader" or "bumpvariantshader" to get started. Good luck.



PS: Doom3 also supports destructive 3D objects and is lit realtime. You can get it for 5$ in stores plus it has thousands of tutorials.

reply to this message

#25: What you want

by charliegeeza on 01/25/2011 02:50

Here is an open source engine with destructible everything:

http://www.thermite3d.org

Video:

http://www.youtube.com/watch?v=qmZrdBBQThk

reply to this message

#26: ..

by Fischkopf on 01/29/2011 18:28

Some programming-god should eventually rewrite large parts of the cube 2 engine and add dynamic lighting, real time deformation to make minecraft competition, new editing features and all the other features which the community requests for years and that would be cube engine 3. :P

reply to this message

#27: Re: ..

by Razgriz on 01/29/2011 20:14, refers to #26

the last thing we need right now is to go on full scale war with minecraft fanboys while others are already making mods which allow maps to be ported from-and-to both games for the sake of awesomeness.

GREAT IDEA!!1!

reply to this message

#28: ..

by Fischkopf on 01/30/2011 00:34

i've never played minecraft. its shitty graphics have always deterred me. but i've seen videos of it and the editing seems similar to the cube engine editing.

reply to this message

#29: Re: ..

by Blarget2 on 01/31/2011 18:59, refers to #28

you have no idea the huge difference between minecaft and sauerbraten. shut up before you get yourself hurt.

reply to this message

#30: Re: ..

by suicizer01 on 02/01/2011 19:02, refers to #29

Just google images for "minecraft", then you can imagen.
It's a game wich looks incredible crappy, like if the past 20 years of research, programming, improving hardware and software were for nothing.

The set up of editing seems to look like sauerbraten, push and pull cubes. Even tough, it looks like minecraft has never heard of anything else than cubes, unlike sauerbraten wich has heard of traingles.

I agree the idea of dynamic "push and pull" sounds nice, but completly unnecaserry.

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53873296 visitors requested 71648518 pages
page created in 0.023 seconds using 10 queries
hosted by Boost Digital