Author Topic: Rotating objects?  (Read 6405 times)

Offline 3DGuy

  • Member
  • *
  • Posts: 340
    • The Glass Eye Photography
Rotating objects?
« on: January 23, 2007, 04: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?

Offline rcallicotte

  • Member
  • *
  • Posts: 9542
Re: Rotating objects?
« Reply #1 on: January 23, 2007, 05: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?
So this is Disney World.  Can we live here?

Offline 3DGuy

  • Member
  • *
  • Posts: 340
    • The Glass Eye Photography
Re: Rotating objects?
« Reply #2 on: January 23, 2007, 05:13:16 PM »
Well, angular position rotates it around a point (I assume around 0,0,0). But it keeps facing the same way.

Offline rcallicotte

  • Member
  • *
  • Posts: 9542
Re: Rotating objects?
« Reply #3 on: January 23, 2007, 05:43:26 PM »
Oh.  I thought when I was moving my planet by using the angular position it actually moved it around.  Crap.   ???
So this is Disney World.  Can we live here?

Offline gradient

  • Member
  • *
  • Posts: 119
Re: Rotating objects?
« Reply #4 on: January 23, 2007, 07:42:43 PM »
We have bounding boxes for objects...sure would be nice to be able to click and drag, click and rotate etc...

Offline Volker Harun

  • Member
  • *
  • Posts: 1490
  • Let there be Rock!
    • NWDA-Net
Re: Rotating objects?
« Reply #5 on: January 23, 2007, 07:56:56 PM »
The question does not concern the boundary boxes, but rotating the displacement.
And this is tricky ,-)

Am brainstorming.

V.Harun

Offline gradient

  • Member
  • *
  • Posts: 119
Re: Rotating objects?
« Reply #6 on: January 23, 2007, 08: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...

Offline 3DGuy

  • Member
  • *
  • Posts: 340
    • The Glass Eye Photography
Re: Rotating objects?
« Reply #7 on: January 23, 2007, 08: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

Offline Volker Harun

  • Member
  • *
  • Posts: 1490
  • Let there be Rock!
    • NWDA-Net
Re: Rotating objects?
« Reply #8 on: January 23, 2007, 08: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

Offline 3DGuy

  • Member
  • *
  • Posts: 340
    • The Glass Eye Photography
Re: Rotating objects?
« Reply #9 on: January 23, 2007, 09: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.

Offline JemDaddyO

  • Member
  • *
  • Posts: 7
Re: Rotating objects?
« Reply #10 on: January 24, 2007, 04: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?

Offline 3DGuy

  • Member
  • *
  • Posts: 340
    • The Glass Eye Photography
Re: Rotating objects?
« Reply #11 on: January 24, 2007, 05: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..

Offline dhavalmistry

  • Member
  • *
  • Posts: 2478
Re: Rotating objects?
« Reply #12 on: January 25, 2007, 03:41:55 PM »
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???!!!!!
« Last Edit: January 25, 2007, 03:48:01 PM by dhavalmistry »
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12594
  • Holy snagging ducks!
Re: Rotating objects?
« Reply #13 on: March 24, 2007, 06: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