#26 2017-08-23 18:21:00

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

Well I'm speechless and thankful, guys: I couldn't really imagine that you'd be willing to rewrite portions of the code to correct a bug that my makeshift waterfall has somehow helped discovering. This will be beneficial to the game and, even if useless for various reasons I've mentioned above, at least this map of mine has sparked new interest in Tesseract development.

I plan to release an update of it further on, with models showing the right bounding box thanks to Chasester, and I'll apply the triplanar shader rransom.8774 has suggested, to the waterfall texture in case it can be corrected, and if the changes are later added to SVN. Of course I'll also add a credit to you guys, both on my original post and in the map readme. Looking forward for it! :)

Offline

#27 2017-08-24 01:41:40

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

SO after posting that I did more research into this. I used a brick texture so i could tell orientation, and it simply just shows one layer going the correct direction and another layer going at 90 degree slant to this, hense the gray material.  It seems that something off causing essentially the axis to flip on each side, this may be an inherient problem to the shader. One thing I guess you could try is adding it as a vshadervarient rather then applying it as the main shader.

The reason this is important is cuz when you start adding scrolling you can see this problem 10 fold. If you add my code to the shader you can see this even with the waterfall. It works from some angles but from other angles it shows seems. Its a slight improvement to the normal bumpmap shader, but its still tecnically bugs out :p

I would just model a water fall and add a cool shader to it like what was done for sauerbrant. it seems this hack is flawed.

chasester

@models you could fix the rock models to have the correct bounds so they are easier to edit in the editor :)

@mesh bads colision, I would create 2 versions of all the rock models, one for collision and one for no collision, because doing mesh based collision is very expensive, so in some case it may be better to creat some sky texuture to build a colision over them. This way you can reduce the mesh. especially for the ones that are mostly in the terrrian. Also fixing the aabb on the models will improve the mesh based collision becuase the aabb is a first test to see if they are in the area, so the larger the aabb the more times you will have to test the mesh.

@map This would be a great test from some code ive been working on. Can I use this map for dev purposes?

Last edited by chasester1 (2017-08-24 01:46:06)

Offline

#28 2017-08-24 02:38:05

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

chasester1 wrote:

SO after posting that I did more research into this. [..] but its still tecnically bugs out :p

Even though I'm very grateful for your time and effort, I guess I'll wait for this problem to be fixed in SVN, in case Eihrul plans to do it (I believe your code might help): editing the shader to get a temporary workaround will not work for the other people downloading the map but me, and that would be a shame.

chasester1 wrote:

I would just model a water fall and add a cool shader to it like what was done for sauerbrant. it seems this hack is flawed.

See point #4 on my original post: as a 3D modeler I'm a complete n00b, that's why I've made most of my models directly in Tesseract and I've exported as *.obj/imported them again. Also, I don't understand very well shaders and the way they work, that's why I haven't been able to get Nieb's waterfall to show transparency. Perhaps it's just a matter of adapting the code in the *.cfg but... how?

chasester1 wrote:

@models you could fix the rock models to have the correct bounds so they are easier to edit in the editor :)

Those are Nobiax's, not mine (even though they are licensed as CC0 and can be edited) though they don't "weight" much. I've already been able to solve the problem using your helpful suggestion (mldtricollide collide) but I've applied that command only to the few rocks which required it, leaving out the small ones on the terrain, as I've too noticed that it's pretty CPU/GPU expensive. I'd consider this issue closed (I'll upload an updated version of the map further on, thanks for your help and expect a credit. :)

chasester1 wrote:

@map This would be a great test from some code ive been working on. Can I use this map for dev purposes?

I had planned to release everything as CC0, both the geometry (the map), my textures (perhaps the only useful part of the package) and my (totally useless and lame) mapmodels, but for the reasons I've mentioned on my original post (see "KNOWN ISSUES" intro) I've had to decide upon a more strict license, mostly because of copyrighted third-party textures and mapmodels. However, you are free do to anything you want with the geometry, as there's nothing copyrighted there, besides the cubes I've edited. :)

Offline

#29 2017-08-24 04:46:30

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

ill look at the model linciences, it would be for personal use so i Doubt there would be any problems there

Offline

#30 2017-08-24 15:16:37

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

If it's for personal use, feel free to do anything you want: all the included files span from a CC0 license to a "Personal Use Only", so it's fine I guess (at least for me). If there will be enough interest, I'd be willing to replace the only copyrighted texture of my set and release it as CC0 as originally planned. As for now, this thread seems more on the tech side than about the map and its content, save for Cisoun's comment. =:P

Last edited by Blindabuser1 (2017-08-24 15:18:23)

Offline

#31 2017-08-24 18:49:31

RaZgRiZ
Moderator

Re: Fantasy Castle VI + Texture Pack

So based on that checkerboard screenshot, i was spot on :P

Offsetting the texture just enough to account for the entry height difference should see this resolved without having to rely on a triplanar texture shader methinks - not the prettiest but then again, having to use geometry for water bodies at this age is not the prettiest approach either.

Offline

#32 2017-08-24 19:16:26

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

RaZgRiZ wrote:

So based on that checkerboard screenshot, i was spot on :P

Yes and not: I had applied the texture evenly to the whole block, but since one of those cubes is smaller by one row because of the geometry bending, there's no way to make the textures match while scrolling: I've re-textured the waterfall with the checkerboard, and even offsetting and/or rotating doesn't solve the issue. I guess I'll wait for an improved version of the triplanar shader... hope soon.

RaZgRiZ wrote:

but then again, having to use geometry for water bodies at this age is not the prettiest approach either.

Cough, cough... bending materials...  (it should have been a priority since a long while). :/

Aaand, as we are on it: may I ask your scripting Highness if there are plans on your part to kindly help this poor derelict with that simple (I know you'd do it in seconds) HUD script I have mentioned a few messages ago? :P

Last edited by Blindabuser1 (2017-08-24 19:21:55)

Offline

#33 2017-08-25 13:00:02

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

UPDATE - 25/8/2017:

- Uploaded a new revision of the map, which corrects the bounding box of certain mapmodels by using the "mdltricollide collide" command.
- Added credits to Chasester1, RaZgRiZ and rransom.8774 for their help and suggestions, both on the original post of this thread and on the map's readme (fc6.txt).

Offline

#34 2017-08-26 01:01:12

RaZgRiZ
Moderator

Re: Fantasy Castle VI + Texture Pack

Yeah sorry about that, been very busy this entire month and i'm hardly getting anything done :P

will get to work on that soonish by the end of the month when overtimes no longer pay double+ :D

Offline

#35 2017-08-26 01:46:08

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

Thanks man, I really appreciate and understand. Life's so busy when you're a grown up man: work, commitments, wife, kids, taxes and whatnot. I miss youth but, thankfully, this game helps. :)

I'm surprised mini-stats as part of the hud aren't already a default in Tesseract, but then I'll get the obvious (and legitimate) answer that, unless you get paid, programming in your free time isn't exactly fun. I wonder how Minecraft went so mainstream while Cube 2 didn't: I'd choose the latter hands-down.

Offline

#36 2017-08-26 15:46:07

rransom.8774
Member

Re: Fantasy Castle VI + Texture Pack

Here's a patch to add triplanar shaders with a distinguished axis: http://sprunge.us/YYjW

To use this for a waterfall, you'll need to set shader parameter triplanaraxis to one of 1 0 0, 0 1 0, -1 0 0, or 0 -1 0.

The detail-map variants also work.  I haven't tested the parallax shader variants yet.

Offline

#37 2017-08-27 02:10:45

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

Blindabuser1 wrote:

I wonder how Minecraft went so mainstream while Cube 2 didn't: I'd choose the latter hands-down.

you tube :P

Offline

#38 2017-08-27 03:33:02

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

rransom.8774 wrote:

Here's a patch to add triplanar shaders with a distinguished axis

Thank you very much: that's a pretty good help, even though these changes won't become global until implemented in SVN, but I'm open to test them and post screenshots of the results over here, of course.

Now, as dumb as it might sound, and after googling for help: is there a way to apply a patch to an original without using SVN? I don't have a client installed at the moment (I just download nightly builds directly) and even though I'm manually finding the matching lines, it doesn't seem as easy as I had thought.

chasester1 wrote:

you tube :P

Yeah, let's add marketing, money and the charm of pixel art... but I still prefer Sauerbraten. :P

Offline

#39 2017-08-27 07:45:09

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

no just youtube. You should read up on it. Its essentially, let's play videos + youtubes algorithm = perfect storm.

Offline

#40 2017-08-27 08:07:35

rransom.8774
Member

Re: Fantasy Castle VI + Texture Pack

Blindabuser1 wrote:
rransom.8774 wrote:

Here's a patch to add triplanar shaders with a distinguished axis

Thank you very much: that's a pretty good help, even though these changes won't become global until implemented in SVN, but I'm open to test them and post screenshots of the results over here, of course.

Now, as dumb as it might sound, and after googling for help: is there a way to apply a patch to an original without using SVN? I don't have a client installed at the moment (I just download nightly builds directly) and even though I'm manually finding the matching lines, it doesn't seem as easy as I had thought.

“patch <PATCH-FILE ” might work.

Or fetch config/glsl/world.cfg from my Git repo (https://gitgud.io/rransom/tesseract); you'll need either a Git client or a GitGud account for that.

Offline

#41 2017-08-27 10:58:50

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

you can define any shader you want in the map confg so you could fix it that way.

Offline

#42 2017-08-27 18:46:03

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

rransom.8774 wrote:

patch <PATCH-FILE ” might work

Please, bear with me: I'm mostly a graphic/sound designer, programming is a foreign territory to me.
I'm on windows, and there's no "patch" command if I use the DOS prompt (I guess it's for Linux/Unix-based systems, right?). May I ask you to kindly provide a link to an already patched "world.cfg", if it's not much of a hassle? It doesn't seem worth to me, to install a program or open an account I will use for just a single file. Thank you in advance.

chasester1 wrote:

you can define any shader you want in the map confg so you could fix it that way.

Do you mean I could use a portion of the code rransom.8774 provided to me, and paste it directly within the map's .cfg? That would be great, as it would bypass the need to use a patched "world.cfg" for every person downloading the map, until the changes make it to SVN. Correct me if I'm wrong, please.

Offline

#43 2017-08-28 07:43:27

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

Blindabuser1 wrote:
rransom.8774 wrote:

patch <PATCH-FILE ” might work

Do you mean I could use a portion of the code rransom.8774 provided to me, and paste it directly within the map's .cfg? That would be great, as it would bypass the need to use a patched "world.cfg" for every person downloading the map, until the changes make it to SVN. Correct me if I'm wrong, please.

oh it wouldnt be that simple, you whould have to rebuild the complete shader code cuz its function call a function of a function, so you whould have to take all that code and compile it into a nice bow and call it in your cfg. Lucky you dont care much about expandablity, so you only need to take the parts of the glsl code that you need the pesky @(if(expression) [] ) could all be elimiated and you just start the shader and finish the shader.

Offline

#44 2017-08-28 11:00:37

rransom.8774
Member

Re: Fantasy Castle VI + Texture Pack

Blindabuser1 wrote:

I'm on windows, and there's no "patch" command if I use the DOS prompt (I guess it's for Linux/Unix-based systems, right?).

Okay.

May I ask you to kindly provide a link to an already patched "world.cfg", if it's not much of a hassle?

I think I've fixed the parallax version of the triplanar-with-axis shader now.  Here's a zip file containing world.cfg:
https://drive.google.com/file/d/0BzjaIE … sp=sharing

When setshader fails, it leaves the current shader unchanged, so if you want to try this in your map without breaking it for everyone with an unpatched copy of Tesseract, use the following in your map config file:
setshader triplanarbumpspecmapworld
setshader triplanaraxisbumpspecmapparallaxworld


Then, to configure the waterfall in-game:
vscroll 1 0 // or whatever speed you want

Then try each of the following until the waterfall moves in the correct direction:
vshaderparam triplanaraxis 1 0 0
vshaderparam triplanaraxis 0 1 0
vshaderparam triplanaraxis -1 0 0
vshaderparam triplanaraxis 0 -1 0

Offline

#45 2017-08-28 23:27:27

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

rransom.8774 wrote:

Okay.

Thank you very much! :)

Let's see if I've done my homeworks correctly:
given that shaders in this case are being defined in each texture's *.tex directly, I've backed up and replaced "world.cfg" in "config/glsl/" with your copy as indicated, then I've opened "ba_waterfall.tex" in "media\texture\blindabuser" and here's how it looks after the changes:

//  setshader "bumpspecworld" // old shader

     setshader triplanarbumpspecmapworld
     setshader triplanaraxisbumpspecmapparallaxworld
	  vshaderparam triplanaraxis 1 0 0 // The one with the correct orientation

// The following code is borrowed from Lord Kv and RaZgRiZ's Anticube *.cfg.
	  setshaderparam specscale 4
	  texture 0 "mat_water/nieb/waterfall.png"
	  texture n "mat_water/nieb/waterfall_normal.png"
	  texrefract 0.08 0.35 0.6 0.8
	  texalpha 0.1
	  texscale 2

The outcome is that it only works on the vertical axis, but not on the horizontal one, no matter which vshaderparam I choose between the ones you gave me, or which +/- vscroll direction I apply.
Works partially
I really appreciate your efforts, but I don't really want to have you work that much for something perhaps not worth bothering, I don't know. The ideal solution, to me, would be giving certain materials, namely water and lava, some characteristics of game geometry such as the ability to bend cubes and have the engine understand in which direction the water should flow on such bent geometry, but that's up to Eihrul, I guess.

chasester1 wrote:

you whould have to rebuild the complete shader code cuz its function call a function of a function

That sounds pretty insane: almost as the map's *.cfg RaZgRiZ and LordKv made for Anticube 2 (honestly, I don't even know where to start!) :P

Last edited by Blindabuser1 (2017-08-29 00:04:45)

Offline

#46 2017-08-29 03:32:35

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

vshaderparam triplanaraxis 1 0 0 // The one with the correct orientation
this is wrong
it should be just shaderparam not the v

then to fix the side just do vshaderparam triplanaraxis 0 1 0 (i assume just throw around the one till it works)

and v* command is a directed command at a particular cube, not a global (like valpha or vscale etc) so you can change shader paramaters on a per cube basis (so essentially in the shader there is a varing triplanaraxis vec3 that you are changing via this function). This should fix your error i believe though ive not seen ragz code yet. Basically the triplane command needs to know which axis the cube is on, and the side is at a different angle than the front so it errors out. Again I would think a model would do a much better job :p

chasester

Offline

#47 2017-08-29 07:02:22

rransom.8774
Member

Re: Fantasy Castle VI + Texture Pack

Blindabuser1 wrote:
     setshader triplanarbumpspecmapworld
     setshader triplanaraxisbumpspecmapparallaxworld
	  vshaderparam triplanaraxis 1 0 0 // The one with the correct orientation

The outcome is that it only works on the vertical axis, but not on the horizontal one, no matter which vshaderparam I choose between the ones you gave me, or which +/- vscroll direction I apply.

vscroll and vshaderparam are in-game editing commands that apply to the cube faces you currently have selected.

Offline

#48 2017-08-29 18:41:17

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

Ok, things are going insane (48 messages for just a waterfall, really?) :P

rransom.8774 wrote:

vscroll and vshaderparam are in-game editing commands

Grrr, I should have known because of the "v" on vshaderparam. Anyway, I've been able to get the water animation work by using:

vshaderparam triplanaraxis 0 -1 0 // vertical axis Y
vshaderparam triplanaraxis 0 0 1 // horizontal axis Z

BUT... the horizontal line is still there. Also, I've restored the old "world.cfg" while keeping the changes on the texture to see if the engine would use an alternative shader as you said (but which one, since none has been declared?) though it just didn't show the animation on the whole waterfall. Thanks for your help, but I'm not sure this issue is worth these efforts, really.

chasester1 wrote:

Again I would think a model would do a much better job :p

I'd be more than glad to use a mapmodel, if only I could get to make transparency and animation work. I've made a rudimentary waterfall today, for testing purposes, but I've failed the same way I did when trying to adjust Nieb's mapmodel to Tesseract, so... I guess it's a no. :/

Last edited by Blindabuser1 (2017-08-29 23:26:01)

Offline

#49 2017-08-30 00:44:50

chasester1
Member

Re: Fantasy Castle VI + Texture Pack

theres one in sauerbraten if you need to know how it works. You have to make an md* (md3 or 4 or 5) or iqm. In your modeler you can make the texture scroll using the animation settings. and also handle transparency.

http://www.mediafire.com/file/r5lmaeksr … erfall.zip

This is the one from sauerbraten, It doesnt have an attatched licence that I could find, but neib made it so I doubt he would mind you using it.

In throery it should drop and play, the scale may be off, so you may have to fix that, but else it should drop and play.

You should also be able to import it into blender 2.4 (idb thats the version number check the wiki) and if you pray hard enough it may work :P.

chasester

Offline

#50 2017-08-30 04:25:52

Blindabuser1
Member

Re: Fantasy Castle VI + Texture Pack

It doesn't work. Period.

chasester1 wrote:

theres one in sauerbraten if you need to know how it works.

Thank you very much, but somebody's not reading my messages (they all are direct replies to you)! :P

Blindabuser1 wrote:

I had originally imported Nieb's waterfall model from Sauerbraten, but it didn't show the transparency on Tesseract, that's why I've made mine out of game geometry. (Post 2561)

Blindabuser1 wrote:

Also, I don't understand very well shaders and the way they work, that's why I haven't been able to get Nieb's waterfall to show transparency. Perhaps it's just a matter of adapting the code in the *.cfg but... how? (Post 2578)

Blindabuser1 wrote:

I'd be more than glad to use a mapmodel, if only I could get to make transparency and animation work. I've made a rudimentary waterfall today, for testing purposes, but I've failed the same way I did when trying to adjust Nieb's mapmodel to Tesseract, so... I guess it's a no. (Post 2601)

Animation works, but transparency fails miserabily, since some commands aren't supported in Tesseract.

chasester1 wrote:

You should also be able to import it into blender 2.4.

Then, concerning this one....

Blindabuser1 wrote:

Being incapable of using 3D-modeling software understanding why 3D-modeling software must be so complicated, I've attempted making most of the needed mapmodels directly in Tesseract (Post 2548)

Blindabuser1 wrote:

As a 3D modeler I'm a complete n00b, that's why I've made most of my models directly in Tesseract and I've exported as *.obj/imported them again. (Post 2578)

So, please stop it: I'm grateful for your help, but it's case closed to me. I don't wanna hear the word "waterfall" for the next year. -_-'

Offline

Board footer