Jump to content

Archived

This topic is now archived and is closed to further replies.

jamesinsincity

How Do You Create This Kind Of Camera - Object Interaction?

Recommended Posts

  • Topic Author
  • Hi everyone,

    In Simon Danaher's "Creating 3D Worlds" the author shows how to create "Camera-optimized terrains," using Lightwave. The idea is that you create a pie-slice plane of geometry that moves (is parented) with the camera - so that it's always in view as an infinite groundplane (but obviously using waaaay less resources). The pie slice begins at the base of your active rendering camera and fans out from there until it looks like the infinite floor object.

    The trick is to get the material to be parented to the world coordinate system so that when you move the camera, the plane moves too and the texture animates over that plane. This is all relative to the viewer. In reality the camera is pivoting or transforming and the texture is still.

    I have a hunch that to do this effect in C4D you'd have to use null objects. I'm just having a difficult time getting my mind around how to rig this. Any ideas?

    Thanks!

    Jim

    Share this post


    Link to post
    Share on other sites

    I'm thinking on this. I used to do animations in Bryce that had the texture world based so that as the object moved the texture stayed where it was. The effect is the texture appears to move on the object. So if you had a camera as a child of the object it would give the illusion that the camera was moving over a surface. Could be just a matter of finding the right shader to use in C4D.

    3DKiwi

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Thanks SKP for the tutorial reference - that's a beautiful piece of work - but it's a bit over my head for the present.

    Hi Kiwi - the author states that he used a displacement based on the appropriate noise (or fractal) depending on what kind of terrain you want (sea, mountains, hills, etc.).

    The displacement channel is somehow locked to the world-space of the floor plane of the software's world. That means if you move the camera-plane rig in a forward, backward, or pivot move - the displacement will constantly change giving the impression of an infinite surface. Increasing sub-divisions will increase the detail (and of course slow down the renders).

    The author states: "When world coordinates are enabled for a texture, it is applied in world space as opposed to object space. A texture applied in object space stays fixed to the object if the object moves. When you move an object with a world space texture applied, the texture stays put and the object appears to move through the texture. ... Remember that the texture will stay locked to world space, so as the terrain moves it will actually look as though the camera is flying over an infinite landscape. In fact it is infinite, you can render an animation for hours and the landcape will never end."

    Now how would you tell the displacement channel in C4D to "stay put" (fixed to the C4D world space) and independent of the camera-terrain parented objects?

    The reason I'm interested in this is that I've been creating some giant worlds to make the camera animations through them look realistic - this author's method only generates geometry (well, displaced textures) as needed by the rendering camera - cutting way back on memory-processor demand.

    This is a waaaay cool technique - I'm just lost when it comes to translating this to C4D...

    Jim

    Share this post


    Link to post
    Share on other sites

    Well this one took me a while to come up with a creative solution. Part of the problem was i didn't really read all you wrote and understood the setup lol.

    I made an xpresso setup that keeps the texture at world 0,0,0 meaning it doesn't move while the plane moves along with the camera. The xpresso basically moves the texture in the opposite direction of the object (thus the negate node) of the object and that way keeps it put in the same place :)

    So with the attached file, you just move the plane around and the camera follows while the texture stays put.

    Hope this helps :)

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Terminator - that was really nice of you - and that's exactly the idea.

    I'm not well versed on Xpresso - I was wondering if you can do this same effect without it?

    Jim

    Share this post


    Link to post
    Share on other sites

    Can't think of a way without xpresso but the xpresso here is very very simple. You just drag the plane object and the texture tag into the xpresso editor. Add a negate node from the xpool and set its data type to vector in the attributes manager. Now connect the Global position output of the plane node to the negate node input. Next connect the negate node output to the position input of the texture tag. Simple as that :)

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Simple, eh?

    :)

    I can follow the gist of what you did - but I doubt I could have come up with that on my own...at least at this stage of my learning C4D.

    I guess the challenge would be to explain your thought processes when presented with the original problem.

    I was just looking at Vue xStream and it has a similar set up for world and object coordinates. I think, as Kiwi mentioned, Bryce also has this feature - maybe it's found primarily on landscape software.

    Thanks again !

    Jim

    Share this post


    Link to post
    Share on other sites

    My line of thought went through a weird process mostly since i didn't read carefully what was the setup. I first thought of using a projection shader and set it's coordinates but then i decided to simplify things and see what i really need to do. I began moving the plane and then moving the texture (projected as flat). I noticed that in order to get the desired effect i had to move the texture (using the texture axis tool) in exactly the opposite direction of which i move the plane. Here came in the negate node set to vector data type (since position is a vector) :) then it was left to just understanding where the position settings are (which wasn't hard since they are just there in the input ports).

    Hope this explains it a bit.

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    • Recently Browsing   0 members

      No registered users viewing this page.

    Latest Topics

    Latest Comments

    ×
    ×
    • Create New...