Planetside Software Forums

General => Terragen Discussion => Topic started by: 3DGuy on January 23, 2007, 12:24:22 PM

Title: Rotating objects?
Post by: 3DGuy on January 23, 2007, 12:24:22 PM
I ran into this when I the water render times came up. So I created a sphere and added displacement. So one custom iceberg. I liked it, but it was facing the wrong way so I thought I'll rotate it... that's where I got lost. How in the world do I rotate an object like a displaced sphere?
Title: Re: Rotating objects?
Post by: rcallicotte on January 23, 2007, 01:07:15 PM
I know how to rotate regular objects, but things like a sphere...hmmm.  I haven't done that.  Seems like it would be in the properties of the object - Angular Position.  Or not?
Title: Re: Rotating objects?
Post by: 3DGuy on January 23, 2007, 01:13:16 PM
Well, angular position rotates it around a point (I assume around 0,0,0). But it keeps facing the same way.
Title: Re: Rotating objects?
Post by: rcallicotte on January 23, 2007, 01:43:26 PM
Oh.  I thought when I was moving my planet by using the angular position it actually moved it around.  Crap.   ???
Title: Re: Rotating objects?
Post by: gradient on January 23, 2007, 03:42:43 PM
We have bounding boxes for objects...sure would be nice to be able to click and drag, click and rotate etc...
Title: Re: Rotating objects?
Post by: Volker Harun on January 23, 2007, 03:56:56 PM
The question does not concern the boundary boxes, but rotating the displacement.
And this is tricky ,-)

Am brainstorming.

V.Harun
Title: Re: Rotating objects?
Post by: gradient on January 23, 2007, 04:13:47 PM
@voulge...yes, I know that...but if you have used Bryce, you can move/rotate/size the object by click and drag in the view window.
I think 3dguy just wants to rotate his object easily...
Title: Re: Rotating objects?
Post by: 3DGuy on January 23, 2007, 04:16:23 PM
Indeed, I just want to be able to rotate the resulting object. I am assuming displacment fractals are based upon the objects coordinates and not world coordinates. If I'm wrong, animating asteroids is going to be interesting :P
Title: Re: Rotating objects?
Post by: Volker Harun on January 23, 2007, 04:59:59 PM
@gradient: Yep, I did and do use Bryce. And I understand your point.  ;)
and @3DGuy: I believe that most shaders are worldmapped (except distance shader and so on)

As I assume that you are more into TG2 than me, I presume that you used the heading in 'angular position' to turn the sphere. Well, and I also guess that this did not show any result. Thus world coordinates!?!  ???

What about a transformshader to the displacement? ??? I am rendering heavily at the moment, so I cannot give it a try now.

Volker
Title: Re: Rotating objects?
Post by: 3DGuy on January 23, 2007, 05:14:37 PM
Since I moved the sphere out of the center, it rotated around 0,0,0. But it kept facing the same way. The transform shader only gives me the option to translate (i.e. move) and scale.
Title: Re: Rotating objects?
Post by: JemDaddyO on January 24, 2007, 12:33:58 PM
Rather than using the native sphere, could you use an imported sphere object which you could then rotate on it's own axis?
Title: Re: Rotating objects?
Post by: 3DGuy on January 24, 2007, 01:21:47 PM
Might be an option. Just don't know if the displacements work as good as on imported objects. But maybe I can save the distorted sphere as a tgo object and rotate that.. hmm..
Title: Re: Rotating objects?
Post by: dhavalmistry on January 25, 2007, 11:41:55 AM
I have an idea but I dont know if it is possible or if it will work or not, but here it is:

If possible you can change the centre of the sphere to it current location (co-ordinates) and then try Angular Position

But I dont think this is possible.... :-\

I am in similar situation...I have an asteroid in the scene and I want to rotate it and make it face it other way, but I cant try anything untill I finish my current rendering (dont wanna burn-up my core 2 duo  :D)

Oshyan where are YOU???!!!!!
Title: Re: Rotating objects?
Post by: Oshyan on March 24, 2007, 02:12:45 AM
It seems a few threads slipped under my radar. Sorry about the long delay in replying folks!

Unfortunately most textures are handled in world space, not object space. This includes displacement. So that does mean that if you move a displaced object, the displacement on it will change unless you also translate the texture by the same amount.

Currently rotation of noise functions is not possible, thus a displaced sphere can't be rotated. However it should be possible in the future to do this, possibly as an addition to the Transform shader.

- Oshyan