Game Development Community

Small water blocks limited to non-square shapes?

by Jon C · in Torque Game Engine Advanced · 10/20/2005 (4:06 am) · 12 replies

Well my modeler along with myself, have finally gotten a model into TSE (A fountain), and want to add some water to it.
However, when I tried to copy the water from terrain_water_demo, and resize it - I got an error (Something like 'waterblock must be the same size as terrain block size') (Is this just a matter of not being divisible by 8 or is it something worse?)
So my question is: Is it possible to shrink the TSE water down to a smaller size, and a non-blocked shape? Or at the very least, find a way to make it fit in something thats circular?

Also: Why is it that when I try to create a water block via the world creator, it creates a waterblock with no texture data at all; is there a way to make it automatically do this?

A few random things that I haven't personally tested or tried to do yet, but am curious if they're hard or easy to accomplish (Saves me time in the long run, to know now rather than later):
-Is it easy to add foliage to TSE? Sprite-based foliage, that is.
-Is there a way to mimic water in a bsp or model with a texture, rather than a waterblock? It does use a shader, after all.


I think thats all for now :-)

#1
10/20/2005 (5:32 am)
I was wondering about this as well, you could probably throw a water shader on an object and shape it accordingly.
#2
10/20/2005 (5:35 am)
I was just talking about doing that with my modeler, but a few things I'm worried about with that:
If we do that, it'd be hard to apply splash effects (Once we get around to making them) to the water, since its just a shader on a normal texture. Although we could technically base splashing based on the shader, it would take a slightly bit more processing power (If possible at all), then if we based it off of a water block.
Not to mention an underwater effect would be impossible with just a texture.
#3
10/20/2005 (6:20 am)
Depends on how large your fountain is i guess.

If its a small one with not much water stored i would just create a small IFL animation for the normal maps and then just using it for refraction. Reflection can be approximated by using a very low precomputed resolution cubemap (if it looks good just take the same one you used for the founty shader).

Dont know if you can enter the fountain deep enough so that the camera get lower than water level... havent seen any fountain that allowed that.

Florian
#4
10/21/2005 (2:26 am)
Thanks.
Something that has been bugging me: What about rivers that go down hills? Water falls? I think I've come up with an idea (Apply water shader to a long object) that would work, but I'm not sure if that would work unless you can stretch and rotate models in TSE.
Can you?
#5
10/21/2005 (5:48 am)
Certainly can: take a look at ::setTransform(), setScale(), and in some cases (depending on the object), setPosition()/setRotation().
#6
10/21/2005 (6:10 am)
I was moreso referring to ingame editing with the object inspector... Unless thats what you're referring to?
#7
10/21/2005 (6:14 am)
Those values are also adjustable using the object inspector, yes :) IIRC, Transform, Scale, and Position are all dynamic fields that can be modified. Keeping in mind that this is TSE-EA, they might not yet be re-functional (I honestly don't know).
#8
10/21/2005 (10:38 am)
The scale of the waterblock currently needs to be above 100. I think this is due to some other constants within the waterblock code.

The waterblock seems to respond well to other transforms though! I've flipped the water to be vertical and at random angles and it handled it just fine.

Also, I've recently ported the fxFoliageReplicator for the TSE bounty. If you go to the TSE bounty site: tdn.garagegames.com/mantis/ you can download and test what I've submitted. It works pretty well for me (TM) let me know how it goes for you.
#9
10/21/2005 (2:32 pm)
The scale has to be larger than the grid size ... if you reduce the gridsize you can reduce the scale

at least that is what i remember
#10
11/10/2005 (6:25 am)
There are magical keyboard combos that allow you to rotate (hold down ALT, then click and drag the object to rotate around the Z axis, or click and drag on one of the object's axis gizmos to rotate around an individual axis) and scale (hold down CTRL+ALT, click and drag on the axis gizmos to scale along that axis, or click on one of the bounding box faces to drag it and do a finer scaling.)
#11
11/11/2005 (9:50 pm)
Another thing is when I rotate the angle of a waterblock, saving the mission resets the position settings for angle.
#12
11/15/2005 (5:01 pm)
On the water size - Florian is correct, the scale has to be larger than the gridsize - so just reduce that value a whole lot. The value is the number of meters between verts on the grid.

Yes, there is a known problem with creating WaterBlocks from the editor - will be fixed in MS3.

Resetting of angle is also a bug, and it's fixed internally, we'll have it out in a few weeks when MBU is done. Sorry for the delay.