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, 10074 views, last view: 05/18/2024 06:57

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

   Board Index    Go to next 20 messagesGo to last 20 messages

#1: ..

by eihrul on 12/14/2010 16:15

Honestly, the Cube 2 engine is not really intended for stuff like this, so the best you can hope for I think is leaving the lighting on fullbright. There's no way to modify gameplay without digging into C++ currently.

If anything, AssaultCube's engine based on Cube 1 is a lot more effective for this scenario because the lighting was made to be fully dynamic, although it is limited along a 2D plane so looks worse.

reply to this message

#2: ..

by lidra on 12/14/2010 16:21

"Honestly, the Cube 2 engine is not really intended for stuff like this..."

why?

reply to this message

#3: Re: ..

by Razgriz on 12/14/2010 18:27, refers to #2

One reason could be that eihrul is not being paid to do what he currently does. :)

reply to this message

#4: Re: ..

by eihrul on 12/14/2010 20:30, refers to #2

The engine is designed around map EDITING, which has a distinct publishing stage that is too slow to be done in real time but still fast enough to not hugely detract from map editing, i.e. remip, calclight, t-joint fixing, etc.

Even the octree format is designed in a way that is good for map editors but bad for destructible environments. Each cube has a different texture for each face which is simple for map editing, but you'd really want each cube to have the same texture on all sides (a uniform substance), so that if you carve chunks out of it it still is sane.

But then you of course still have the t-joint problem so volumetric formats that don't have variable sized nodes are ideally better at least for simplicity.

All in all, Cube 2 stinks for destructible environments. It's intended for deathmatching in static environments, and it does that really well.

reply to this message

#5: Re: ..

by Razgriz on 12/14/2010 22:36, refers to #4

Though we all know that the only dynamic lighting available in the game is the one produced by the weapons, i can't help but wonder how that can't be "implemented" into the light entities.

I mean, static, flashing lights should be fairly easy, since they don't change position, so the only extra step in the procedure is adjusting the calclight to include the new lightmaps when the flash is activated right?

reply to this message

#6: ..

by suicizer01 on 12/15/2010 00:13

As far as I know, when you calclight, you get a "picture" with "pieces of lighting", that form the contrast on surfaces.
What about that the engine would render a 2nd picture (or any other number) that forms the contrast on surfaces?
Maybe on that way, you could let a trafficlight give red light when it's red and green light when it's green.

There was a command to get that "picture" as .png file, just like a screenshot but don't know how the command is called tough :S.

reply to this message

#7: ..

by Razgriz on 12/15/2010 00:34

Also, cubescript is really a way simpler "language" which is easy to learn, but to this date its pretty much restricted, requiring complex use of lesser commands to get something easily accessible by other languages. I'd say cubescript is ideal to to its coding simplicity, but its in no way effective as a true developer language like python, so you might want to stick to it.

reply to this message

#8: natural selection 2

by derWalter on 12/16/2010 09:16

you ever heard of the spark engine?

the spark engine is developed by unknown worlds entertainment for their upcoming game natural selection 2.

natural selection started as a mod for half life 1 back in 2001 and was a huge success.

now they are realizing the successor as standalone game. after starting with the source engine they decided to build up their own engine.

but why i am talking about this in the cube forum?

because the engine is probably exact that what you are looking for, why?

the game is COMPLETELY lua scripted
the game is COMPLETELY dyn light
the game got real time deformation code in it, because they doing "dynamic infestation" - a covering slime which grows dynamically over the areas alien are controlling.
if you buy the game you get ALL their development tools (lua decoda, spark editor, cinematic editor and so on) with it and thereby its completely coded in lua, you can have a look at the complete game code.

the engine got script hot loading, so if you change something in a luafile you can see the changes instantly in the game.

because the game started as a mod, uwe wanted to make their game as easy to mod as possible and heavily support modding.



if i wanted to build up a game nowadays i would definitely stick with this engine. not only because its so easy to build up a game in top of this engine but also because its graphic quality and capability is bleeding edge.

www.unkownworlds.com/ns2 = development page (have a look at the progress page too)

good luck to you and your team!

reply to this message

#9: ns2

by derWalter on 12/16/2010 09:30

a i forgot:

NS2 HD a guy from Australia making a continuous series of HD-videos of NS2.
there you can see the capabilities of the engine and furthermore the gameplay of the game ;) :

http://www.youtube.com/user/NaturalSelection2HD



the screenshotthread in the official ns2 forums. but dont forget they start with alpha screenshots till nowadays: http://www.unknownworlds.com/ns2/forums/index.php?showtopic=111580


so long :)

reply to this message

#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

   Board Index    Go to next 20 messagesGo to last 20 messages


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


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54040419 visitors requested 71821498 pages
page created in 0.030 seconds using 9 queries
hosted by Boost Digital