home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Search

The search engine will only find messages which match all the keywords you enter below, much like other search engines do.

Keywords

21 results in messages

#1: Re: Caustics without water

by suicizer03 on 09/08/2014 22:55 in General Thread

Try the next line into your map's config-file;

setshader stdworld
texture 0 "textures/nieb/autumn/leaves.jpg"
texlayer 353 "<rotate:3>brushes/gradient_64.png" 4 5
texscale 0.5

An addition to that would be;
texscroll 0 -0.5

There you go, a texture which isn't using any material to achieve so.
However, it can't make the exact movements like caustics and it can only occupy 2 textures.

If you're too lazy to actually implement that, download the map on the next node on Quadropolis and dive into the well.

http://quadropolis.us/node/3858

But for you're concern; if you really want to do it right, I still would advice you to write a shader in glsl (and OpenGL Assembly). Although probably not the easiest thing to do.

I hope that helped.

P.S.
There one has been made a shader in OpenGL (use "/forceglsl 0" to see so) which actually looks a lot like caustics but isn't supporting glsl shadersettings (as there were no back then). So it's not really useful nowadays.

http://quadropolis.us/node/3090

#2: Random Heighmaps

by Pyccna on 05/10/2013 22:25 in Bug Reports

1.) Windows 7
2.) Intel(R) HD Graphics Family (Intel)
3.) Collect Edition
4.) None

Making Ch. 2 of the Warzone SP series & some textures appear with heightmaps from the trak5 package.

For example:
texture 0 textures/waterfall.jpg
texscroll 0 1

texture pops up with different trak5 hightmaps depending on the viewing angle. Anyway to fix this?

#3: Re: ..

by suicizer01 on 06/10/2011 14:35 in Sauerbraten trailer video contest

0:45, is that an original crosshair?
What about textureblending, texscrolling, etc?

Nice vid tough, what kinda program you used?

#4: cartoony water...

by suicizer01 on 02/11/2011 12:10 in General Thread

What about just using a texture and alpha material?
If necassery, you can still try to modified the texscroll feature, so it wont go only 1 direction, but moves from 1 point to another?
Or just use the "movie" script that has been released several times last years?

I don't think it's necassery to modified the sourcecode for what you want.
If this is false, explain better what you would like to get...

#5: Re: Animated Textures

by Quin on 09/12/2010 02:07 in General Thread

The anim texture command is only available in Red Eclipse. In Sauerbraten you may need to use texscroll [x] [y] or a shader, but neither of these methods are totally optimal for your purposes.

#6: ..

by .sCaSd. on 06/01/2010 23:57 in CubeScript Enhancement project

I wrote a function which creates corresponding obj.cfg files for exported models generated by the writeobj(...) function. Located in worldio.cpp. If you implement such a function I would turn to Sauer-enhanced. Below is the example code and the documentation. You have to paste it into worldio.cpp file of Sauerbraten:



<code>
/*
Write a Cube 2 level as model file and create a matching texture config.

usage: writemodel [name] [scale 0/1.0] [noclip 0] [ambiente 0/100%] [specscale 0/1.0] [info]

This command writes Cube 2-map geometry as textured wavefront obj file to packages/model/[name] folder.
Multiple subdires are allowed and - if required - created. Shaderparameters are translated as good as possible.
Alpha-blending is only supported for images with alpha channel. Dont use the alpha-material,
just apply an alpha-texture as normal stdworld texture or with spec/bump/env/glow parameters. The created model will turn it on.
Alpha-materials and sky-surfaces are removed. Use a plain, white diffuse-map with envworld shader turned on to get a skybox-effect then.
Also mdlenvmap command with the required skybox has to be added manually to the object config. See mdlenvmap of the model-doc.

Supported shaders: *specworld, *envworld, specmap or glowmap, envmap, bump*, alpha-channel

Shaderparams (monochrome only): envscale, specscale, glowcolor



Parameters:

name: model name, located in the packages/models folder.
scale: size of the model, default is 1.0 (400%).
noclip: create a clip-box by default (0) or disable clipping, if specified (1).
ambient: see mdlambient command, zero means default value (100%) or -1 turns ambient off.
specscale: specularity scale of the model, see mdlspec in the models-doc: zero means default (100%, 1.5?) or -1 turns specularity off entirely.
This value is usefull to adjust specularity of textures, for example phillipk textures require a higher value (3.0)
while mitaman's meters are looking better with values <1.0
info: write shader info, in case manual adjustment of the output file is required



Example script commands:
mapmodelreset;writemodel test;mmodel test;newent mapmodel 0;

Those commands called in editing mode writes the curent level as model test and loads it as model number 0.
Note: the mapmodel list is also cleared and an instance of the model is being created - near the curent selection.



Bugs:
* parallax is not working and if glow-map is specified, the specularity is disabled because masks have to contain
spec- and glowmap which mismatches then. Also texscroll, alpha-material and pulseglow are ignored.
* Sometimes the glow is too dark, when glow is enabled and the underlaying diffusetexture has dark pixels at this position.
* Glow, spec and envmap-colors are interpreted as monochrome values.
* When plain envworld shaders is specified, the reflection of the model is not plain, because the chrome-map has to be enabled.
Use a plain diffuse-map with envworld shader to get mirror, or skybox-effects then.
* The texturedata of your model must have the same packadir as your model when using two or more subfolders.
Sauerbraten would requires a objdir command or similar to fix this issue.
* The *.mtl file can be removed, its not required.
* When stencil-buffer is disabled, alpha-blending cuts off models behind an alpha surface (this is a cube-specific blendfunc bug)



Tested with textures of aard(default), philipk(glow, spec), lunaran, mitaman(spec) and painkillah(envmap) and some envworld/specworld shaders.
License of this code-snipped: zlib, author: scasd
*/

void writemodel(char *name, char *scale, char *noclip, char *ambient, char *spec, char *noremip, char *writeinfo)
{
if (strlen (name) <= 0)
{
conoutf("usage: writemodel [name] [scale 0/1.0] [noclip 0] [ambiente 0] [specscale 0/1.0] [info 0]");
return;
}
if (strchr(name, '/') || strchr(name, '\\'))
conoutf("WARNING: the texturedata of the model must have the same packadir as the model when using two or more subfolders !");

defformatstring(mdldir)("packages/models/%s", path(name));
defformatstring(fname)("%s/model", mdldir);
extern void remip_(); remip_(); writeobj(fname); // write optimized obj model - bloat snatch

extern vector<vtxarray *> valist; // find used materials...
vector<int> usedmtl;
loopv(valist) loopj(valist[i]->texs) if(usedmtl.find(valist[i]->eslist[j].texture) < 0) usedmtl.add(valist[i]->eslist[j].texture);
usedmtl.sort(mtlsort);

// create relative texture path, the makerelpath() function bugs with painkillah's texture config
int slashes = 2; { char *p = name + strlen(name); while(--p > name) if (*p == '/' || *p == '\\') slashes++; }
char *fixpath = new char[3 * slashes + 1]; fixpath[0] = 0; while (slashes--) strcat (fixpath, "../");
#define EXBRAC(s) (s[0] == '<' ? ( &((strrchr(s, '>')) ?: ">")[1] ) : s) // remove <brackets> of path, painkillah textures require this

// generate texture config file
defformatstring(cfgname)("%s/obj.cfg", mdldir);
stream *f = openfile(cfgname, "w");
if(!f) return;
f->printf("// config file of Cube 2 obj-model\n\n");

float specscale = (atof(spec) ?: 1.0f) * 2.0f; // default scale is 1.0 = 100% specularity
int defaultspec = (specscale < -0.0f) ? -1 : (int)(100.0f * specscale);
f->printf("objload \"model.obj\"\nmdlglare 0.1 1\nmdlalphatest 0.01\nmdlscale %i\nmdlcollide %i\nmdlambient %i\nmdlspec -1\n\n",
(int)(atof(scale) * 400.0f) ?: 400, atoi(noclip) ? 0 : 1, atoi(ambient) ?: 100);
int info = atoi(writeinfo);

loopv(usedmtl) // collect shader data of material slots...
{
int id = usedmtl[i]; VSlot &vslot = lookupvslot(id, false); Slot *slot = vslot.slot;
int shtype = slot->shader->type, sw = shtype & SHADER_NORMALSLMS, ew = shtype & SHADER_ENVMAP; // specworld, envworld
int mask = (sw||ew) ? 0 : -1, gm = slot->texmask & (1<<TEX_GLOW), sm = slot->texmask & (1<<TEX_SPEC); // glowmap, specmap

// write shader info, in case manual adjustment of the output file is required
if (info)
{
f->printf("// shader-type: %i%s%s, shader params: %i\n", shtype, (sw?", specworld":""), (ew?", envworld":""), slot->params.length());
if (slot->params.length()) loopvj(slot->params)
{
ShaderParam *param = &vslot.slot->params[j];
f->printf("// %s: %.3f, %.3f, %.3f, %.3f\n", param->name, param->val[0], param->val[1], param->val[2], param->val[3]);
}
if (gm) f->printf("// glowcolor: %.3f, %.3f, %.3f\n", vslot.glowcolor[0], vslot.glowcolor[1], vslot.glowcolor[2]);
else if (sm) f->printf("// envscale: %.3f, %.3f, %.3f\n", vslot.envscale[0], vslot.envscale[1], vslot.envscale[2]);
}

// cycle slots and write skin/mask with their custom properties
if (slot->sts[0].t->bpp == 32) f->printf("objcullface slot%d 0\n", id);
loopvj (slot->sts) if (slot->sts[j].type == (gm ? TEX_GLOW : TEX_SPEC)) mask = j; // only address specmap, if no glow is specified
else if (slot->sts[j].type == TEX_NORMAL) f->printf("objbumpmap slot%d %s%s\n", id, fixpath, EXBRAC(slot->sts[j].name));
f->printf("objskin slot%d %s%s", id, fixpath, EXBRAC(slot->sts[0].name));
if (mask >= 0)
{
vec *vses = &vslot.envscale; float maxenv = max(vses->x, max(vses->y, vses->z)), minenv = min(vses->x, min(vses->y, vses->z));
f->printf(" %s%s %.4f %.4f\n", fixpath, EXBRAC(slot->sts[mask].name), (ew ? 1.0 : maxenv), (ew ? 1.0 : minenv) );

// toggle objspec and objglow
if (!gm && (sw || sm))
{
int slotspec = defaultspec; ShaderParam *param; // find specscale shader parameter, index: 1
if (sm) loopvj(slot->params) if ((param = &slot->params[j])->type == SHPARAM_LOOKUP && param->index == 1)
slotspec = (int)((param->val[0] + param->val[1] + param->val[2]) * 33.3333333f * specscale);
f->printf("objspec slot%d %i\n", id, slotspec);
}
f->printf("objglow slot%d %i\n\n", id, gm ? (int)(max(vslot.glowcolor[0], max(vslot.glowcolor[1], vslot.glowcolor[2])) * 300.0f) : -1);
} else f->printf("\n\n"); // plain texture without masks
}
delete f; conoutf("wrote model %s", mdldir);
delete fixpath;
#undef EXBRAC
}

COMMAND(writemodel, "ssssss");



</code>



PS: I made a mappack containing top-rated quadropolis maps, mostly not in svn. It consists of maps with at least 8.5/10 points and more than 15 votes. If you want to include those in Sauer-enhanced, just tell me, and I will upload it. There are lots of textures and Mapmodels in it. By the way, nice work with your map spaceshift, I love the texture which change its color when looking to one of the flags.

#7: Re: Programmers wanted!

by SheeEttin on 09/24/2009 18:31 in Programmers wanted!

Just save after you calclight. (Editing invalidates lightmaps, so just don't edit after calclighting.)
Mapshots are just cropped and scaled screenshots. Use /screenshot or the key (default F12, I believe) or MeatROme's Pretty Screenshot script: http://quadropolis.us/node/276 .

Also texscroll: http://sauerbraten.org/docs/editref.html#texscroll .

#8: Re: ..

by SheeEttin on 08/11/2009 22:31 in Map Editing

It's not in the wiki, as far as I know, but here it is in the docs.
http://sauerbraten.org/docs/editref.html#texscroll
Just posted this link a few days ago, too...

By the way, eihrul, it might be a good idea to mention searching the forums in the links section of README.html. As it is, there's a lot of repeated questions.

#9: Re: ..

by SheeEttin on 08/08/2009 04:50 in very starnge (and annoying) issue

http://sauerbraten.org/docs/editref.html#texscroll

#10: Re: moving textures

by MeatROme on 06/11/2009 17:16 in Map Editing

Another good idea .. try using "search":
http://cubeengine.com/forum.php4?action=display_search&keywords=texscroll&submit=+GO+

#11: Re: ..

by |ice|sub-zero|L on 06/10/2009 22:55 in Textures

i am quite sure you can type /bind o [texture 0 sub/a.png;texture g sub/a.png;texscroll 1 0]
then all you have to do is press O. there is also some scripting that gives you the texture GUI (F2), all you have to do is copy that and script it a bit then submit it as a mod on quadropolis.us.

#12: ..

by WakeField on 06/09/2009 03:28 in Textures

he means just as a simple command that you can use, as MeatROme said "on-the-fly", rather than having to go to the cfg to use texscroll.

#13: Re: texscroll

by Hirato Kirata on 06/08/2009 08:04 in Textures

or if you want to let two textures scroll over the exact same area, as an example (don't forget to apply the blendmaps)

texture 0 aard/boxtex/sketch128.png
texscroll 1 0

texture 0 aard/boxtex/sketch128.png
tesscroll 0 1
texlayer -1

#14: Re: texscroll

by |ice|sub-zero|L on 06/08/2009 04:54 in Textures

unless of coure you want two diffrent texture to move at the same time, then it should look like this:
texture 0 sub/a.png
texture g sub/b.png
texscroll 1 0
(or jpg if that is the file type)
its just that simple, but it also works like so:
texture 0 sub/a.png
texture g sub/a.png
texscroll 1 0
(note: its texture 0, then texture g)

#15: Re: texscroll

by MeatROme on 06/07/2009 16:22 in Textures

this is a command you use in your CFG .. not on-the-fly!

Example:

texture 0 egyptsoc/wood17.jpg
texscroll 3 0

HTH

#16: Re: ..

by Fischkopf on 06/07/2009 14:42 in Textures

How does texscroll work? type /texscroll and 2 numbers and the the texture moves? doesn't work for me :(

#17: ..

by Megagun_ on 06/01/2009 00:54 in Textures

texscroll
http://sauerbraten.org/docs/editref.html#texscroll

#18: Re: Texture rotation

by SheeEttin on 07/03/2008 16:26 in Map Editing

Well, each time you load (and use) a texture, you load it into memory, evenjust a rotated version of the same texture.

You CAN do texture alterations (not to the image, if that's what you mean), but with texrotate, texscale, texscroll, and texoffset (did I miss any?) you can change those attributes for the most recently-loaded texture (the last in the texture browser).
You might be able to execute those from a CFG (e.g. rotate the texture every five seconds or something), but I don't know if it'll work (and I'm too lazy to test right now). (This, of course, can only affect the most recent texture, so you'll only be able to do it to one texture, and it has to be the last.)

#19: ..

by SheeEttin on 06/16/2008 21:33 in Map Editing

http://sauerbraten.cvs.sourceforge.net/*checkout*/sauerbraten/sauerbraten/docs/editref.html#texscroll

#20: Re: ..

by Hirato Kirata on 05/28/2008 09:56 in My review on Sauerbraten

very well, starting in /packages/ do you know what the path of the texture is?
if you do place this in a configuration file (eg, like data/default_map_settings.cfg, just open it with notepad or something)

setshader stdworld

texture 0 <brick texture>


now save, and be sure to put it at the very end. now go into the game and load up a new map, and select your brick texture

then press T and type /texscale 0.5, or maybe 1, or 20, but have a little play around... keep in mind the texscale, texoffset, texscroll, texrotate, etc only work on the newest texture slot

#21: texscroll

by %username% on 05/01/2008 19:49 in Map Editing

Is `texscroll` command allows me to make texture scrolls vertically?


content by Aardappel & eihrul © 2001-2021
website by SleepwalkR © 2001-2021
42366081 visitors requested 58071183 pages
page created in 0.225 seconds using 6 queries
hosted by Boost Digital