Destructable enviroment?

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Destructable enviroment?

Post by psYco »

I am taking on yet ANOTHER project, (that makes three now) but its just a little one, im not goning to give details till im done because its more the 'concept' than a story or whatever.

I dont think ill need much help with this project since its pretty basic and I dont foresee any real problems, just that it involves ALOT of destructable terrain, (its underground and you have to 'mine' your way out, like Digger in 3D. Well Im planning on having one prefab piece of 'earth' that is destructalbe so my question here is

How do I make a brush that i can shoot and then it crumbles clearing the way?

This is bearing in mind that this will be an FPS with MANY MANY of these destructable 'blocks' so they cant be too processor hungry and it has to look like your 'digging' your way through.

Thanks alot for any help :)
GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 »

I think you have two options here:

1) create the prefab as a pawn, and script it so that when its health reaches zero it will play an animation and fade out.

2) I believe there is an entity that can make a model distructible. you could use this and then trigger a particle fountain ('actspray' i think) to shoot off some rock particles.
Check out my band
Tougher Than Fort Knox
Image
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

thanks for the help ill give it a shot! :D
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

the way i see this is you have a "solid block" as your ground, in practice a cube that is solid, and to cut through the cube as it is at the moment is imposible "in game" the only way round this problem is to havean script that creates geometry that is masked as subtracted material at the possition and angle of the digging machine

*edit*
oops sorry never saw the rest of your post under the bold writing.

well that seems to solv one problem but creates others, blocs will make it look square and will probably see "steps" where the blox will be destroyed.

the only way around this is to make the blox small enuf not to notice too much of a difference and a balance with the amount of pollys left behind as the floor ceiling and walls, more blox, more pollys left behind biger the blocs the more jaged everything will be.

a way of cutting down on the pollies is mabe to have hint brushes or something to help the engine calculate the geometry better.
Last edited by scott on Wed May 02, 2007 6:44 pm, edited 1 time in total.
*GD*
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Well you have alot of good ideas Im not sure what you mean about this
balance with the amount of pollys left behind as the floor ceiling and walls
Can you eloborate on this bacause it 'sounds' very usefull and helpful but im not 100% sure of what you mean...

Oh and just to move forward with the questions about this, does anyone have any idea how im going to make up nearly a whole map out of blocks? And if I use LOADS like scott sugests well then itll just take forever! :(
User avatar
Spyrewolf
Posts: 450
Joined: Tue Jul 05, 2005 4:53 am
Location: Wellington::New Zealand

Post by Spyrewolf »

Destructable environments are totally do-able in RF,

depending on how detailed you want to be with your damage, will depend on how much processing power you have,

the best bet is as stated above with (BSP)models and gib(particle) effects,
also add a touch of dust and you should have a pretty realistic looking effect, if your planning on doing completly destructable environments i'd just check your frame rates, Im not sure how things will hold up, whether models require extra processing over ordinary BSP.....?

once we get full physics thing will become real fun for completly destructable environments
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

well to puit it simply here is two diagrams

Code: Select all

1
____________________________
____|____|____|____|____|____|
____|____|____|____|____|____|    
____|____|____|____|____|____|   
this is your world with big blocks for this  example there is 18
(6 sides per block, 2 pollys per side, total = 216 pollys this is fine, the engine will remove the non seen pollys and only the out edge could be vissible)

now your digging machine removes one line

____________________________
____|____|____|____|____|____|
____________________________  
____|____|____|____|____|____|  
this after the digging machine now there are only 12 blocks
total pollys = 144 now the walls of where your digger has been are now visible = more pollys visible total visible 24 more pollys than before

now if you have twice the amount of blocks, so not to get a stepy/jaggy edge so now you use half the size blocs to get it to look nice, this has just doubled the poly count visible to 48 blocks

2
___________________
____|____|____|        ____|
____|____|        ____|____|
____|        ____|____|____| 
____ ____|____|____|____| 
as you can see a path has been made in the blocks
this has caused it to look blocky

now double the blocks
________________
__|__|__|__|__|    __|
__|__|__|    __ __|__|  
__|    __ __|__|__|__|  
____|__|__|__|__|__|
now to get to the same pint it isnt so noticable steps, this diagram does not do it justice tho.
think of it like a sphere, the more pollys used the better quality the sphere looks.
sorry not as simple as i thought....

and the diagrams went a little funny as the spacing has changed but they almost right and dont forget that the figures apart from the total pollys are based on the 2 dimentional diagrams

in practice there would be about double amount of pollys per block you destroy, just used the figures above just to demonstrate that they go up as you digg more.
*GD*
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

I just want to point out that models cannot cull other level geometry. (and so, not each other) Bear that in mind when you build your levels.
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

WOW thanks scott that really explaind things well for me! I can see you put some time into that post but it realy does help! Im going to mess around with this and I think that it will end up looking quite good, with not too many blocks because with it being very dark (as I imagine mine cave-ins are) you wont really see the blocky effect...

Just one last question, I think I know how to do 'gibs of rocks' (using the actor spout?) but im not very familiar with 'dust' or 'particle effects' and I cant seem to find this in the docs... Can any one briefly explain how to get these effects into the level? I just need entity names, im sure ill be able to figure out how to use them :)

Thanks for all the help guys! I cant w8 to do my first frantic chipping away at a caved in tunnel! :D
User avatar
Spyrewolf
Posts: 450
Joined: Tue Jul 05, 2005 4:53 am
Location: Wellington::New Zealand

Post by Spyrewolf »

you will want to use the ParticleSystemProxy

http://docs.realityfactory.info/0.76.1/ ... mProxy.htm
GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 »

I am 90% sure that BSP MODELS are rendered in the same way as actors: when any portion of their bounding box is visible, the entire model is displayed. So all four sides of the model would be rendered even if only one side is visible, just like a pawn or SEP. So instead of rendering two polys for each visible side of the cube, you would be rendering all 12 polys that make up the cube.

With good level design you could pull off this plan using flat, single sided actors (two polygon planes) instead of cubes. But if you want to player to have complete freedom then cubes would be your best bet.
Check out my band
Tougher Than Fort Knox
Image
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

It would be kinda hard to place those perfectly in line with the rest of the geometry though. It would be easier if the editor was able to render the actors in realtime instead of having to move it, compile the level, then preview.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

It would be kinda hard to place those perfectly in line with the rest of the geometry though. It would be easier if the editor was able to render the actors in realtime instead of having to move it, compile the level, then preview.
Our editors can render actors...
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

Really? I did not know that. You learn something new everyday. That's what I get for not being an artist. :)
GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 »

You do have a point though Paradox, because the editor does get buggy when displaying a lot of actors. not to mention that the texture doesn't show. so it would be a bit more difficult to edit that way.
Check out my band
Tougher Than Fort Knox
Image
Post Reply