home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Script for making holes

by Goober on 01/15/2011 20:30, 16 messages, last message: 02/16/2011 10:15, 2957 views, last view: 05/04/2024 08:14

I'm just wondering what sort of script I would need to make a hole (sphere-like) in a wall if I shoot it... any ideas?

   Board Index   

#1: ..

by SheeEttin on 01/15/2011 22:26

If you're talking about Red Faction-like dynamic geometry deformation, you're sure as hell not going to get in in Cubescript.

You'll have to mod the source a LOT. Pretty much rewrite large parts of the engine. You'd be better off using another engine or writing your own from scratch.

If you're all right with just a cube hole, that's been done before. Try searching the forums and Quadropolis. (You'd probably have the most luck searching for the commands someone pasted, i.e. "edittoggle", "universaldelta", etc.)

reply to this message

#2: ..

by Goober on 01/18/2011 00:11

Why would it be impossible to use the heightmap tools say to cut out a hole using a custom brush?

reply to this message

#3: Re: ..

by tempest on 01/18/2011 17:28, refers to #2

I think it's clear why you can't do this in script.

And you will have to rewrite large parts of the engine because every time you edit geaometry, you need to recalculate the lightmaps. You'd have to implement fully dynamic lighting and shadowing.

reply to this message

#4: ..

by suicizer01 on 01/18/2011 18:46

A better idea is to mod the sourcecode that decals also support bump-, spec-, depth- and glowmaps...
This would create the illusion that there is a hole in the wall, but it's actually a flat texture.
Because of that, you don't need to change anything to a map's geometry neither the lighting of it...

P.S.
Not sure if decals already support such thing, maybe you should try out by your own?

reply to this message

#5: Re: ..

by SheeEttin on 01/18/2011 20:53, refers to #4

Bumpmaps don't do much in the way of creating depth... If you use them for anything more than details, the illusion falls apart.

reply to this message

#6: ..

by Goober on 01/19/2011 03:07

Decals aren't suitable because I need the player to be able to go through the holes into other parts of the map.

I don't need to recalc the lighting, fullbright would be fine for the idea I have.

reply to this message

#8: Re: ..

by suicizer01 on 01/19/2011 19:25, refers to #5

0.0?
Isn't a bumpmapped texture used in cube engine 2 to create "a layer on top" of the original textures?
Like a depthmapped texture is used to create "a layer under" the original texture?
Or am I confusing that specmapped textures aren't making the original texture more "shiny" :S?

reply to this message

#9: Re: ..

by tman elite on 02/14/2011 19:09, refers to #6

If this is an SP map, you could use the barrel entity made to look like part of a wall. When you shoot it with a rocket or grenade they'll both blow up and disappear. It'll look pretty bad if you shoot it with anything else though.

reply to this message

#10: Re: ..

by suicizer01 on 02/14/2011 21:21, refers to #9

Or you make a mapmodel wich is "wall"-shaped, put it before the crater and make sure it blows up just like a barrel...

reply to this message

#11: Re: ..

by tman elite on 02/15/2011 03:18, refers to #10

That's what I meant by a "barrel entity made to look like part of a wall." You could put some barrels that actually look like barrels too and have the player shoot them instead of the wall, making the illusion more realistic.

reply to this message

#12: we just finished...

by |ice|sub-zero|L on 02/15/2011 09:42

we just finished a thread about this, before you post useless threads on subjects that have been posted before, please look inside the forums: http://cubeengine.com/forum.php4?action=display_thread&thread_id=2408

that right there is talking about lighting on a similar idea. the basis of which it F**k's up the lighting so they wanted something to be done with the lighting, however they had the same idea.

and this: http://cubeengine.com/forum.php4?action=display_thread&thread_id=1953

which is commenting on exactly what you are saying. again, please read around in the forums for the following: terrain destruction, lighting deformations, vehicles, monsters (e.g. hellpigs) in multiplayer, new materials, ideas for addition to sauer, server mods, and the list continues.

reply to this message

#13: Re: we just finished...

by tman elite on 02/16/2011 01:17, refers to #12

the second thread you linked to is closed (and I don't know why, because it seemed tentus was on to something in his last post)...

reply to this message

#14: Re: we just finished...

by |ice|sub-zero|L on 02/16/2011 05:41, refers to #13

tentus's last post explains why its a bad idea. besides, there are many reasons why that thread was closed, but i figure it was because it was getting pointless to talk about it since there is almost no way it would be done, unless someone with no life came in and re-wrote a lot of the code, but even then, your still talking about a major change that eihrul might not allow (its possible he would depending on if everything in it was clean)

all in all, a mod like this would be too much for one person to take on them-self and like the other thread, this one i bet will soon be closed since it is a pointless discussion.

reply to this message

#15: Message censored by administrator

by charms0 on 02/16/2011 06:20, refers to #1

#16: Re: we just finished...

by tman elite on 02/16/2011 07:58, refers to #14

Quoting tentus:

"I've been doing some playing around with extremely quick-and-dirty lightmapping. Not being a real programmer per se, I haven't produced anything worth showing, but I did find that you could make much less ugly lighting by simply grabbing the first adjacent pixel of intact lightmap (I suspect that the best method would be a rough average of several adjacent lightmaps, but again, not a real programmer).

I'm currently playing around trying to use this so that editing a map you've already mostly produced isn't so hard on the eyes (that first adjustment just kills me), but perhaps you could extend the idea to make very basic destructible terrain. I like the idea of having to mark geometry as destructible (by an air-like material seems like the most logical method.) "

Sounds to me like there's hope yet. Although I agree with you that a change like this would most likely not make it in the main release. But I would personally like to see a mod like this, just to see how well something like this would work.

I guess a start would be making the geometry deform in full bright first so that it looks natural and convincing. Once this is done, the next step would be to create a "destructible" material and apply step one only to materials labeled destructible. (Of course this is all based on assumptions, since I have very little programming experience so I don't know how others would approach this.) Once you get it to look right in fullbright, then you can start to figure out how to apply lightmaps. As tentus said, you could try averaging several adjacent lightmaps.

Of course, if you want this in multiplayer as well, you'd have to figure out how to send and receive destruction data. Although if the effect is achieved through "damage" done to the block, shouldn't the damage be done equally on each client since the explosion or bullet that caused it would be the same? (sorry if that's a noobish question, I don't have much experience in the area.)

Anyway my point is there are a lot of people saying "no no no don't do this." I'm saying I'd like to see someone try.

reply to this message

#17: Re: ..

by suicizer01 on 02/16/2011 10:15, refers to #11

nah that is only realistic if those barrels make any sense why they are standing there.
But adding just a few barrels next to the "explosive wall", gives way more reality, because it looks like the barrels are so vurnable that they explode even by a pistolshot close to it...

reply to this message

   Board Index   


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


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