Jump to content

How to rotate environment texture


ozRocker
 Share

Recommended Posts

6 minutes ago, Pryme8 said:

maybe by adding a UV offeset to the UVx of the environment.

I can't find any UV offsets that affects the texture anywhere.  I know environmentTexture has properties like wrapU and wrapV but they don't do anything.  I tried using the helper like this: var helper = scene.createDefaultEnvironment();

and rotating that but it didn't make any difference

Link to comment
Share on other sites

7 minutes ago, Pryme8 said:

why not rotate the object not the environment?

That's actually what I would prefer to do.  It would solve the lighting and reflection issues.

There's a lot of stuffing around to transfer camera movement to mesh though.  Need to intercept controls, add inertia.  I'm trying to make a simple demo that can be used as a tutorial.  If there is a new, simple way to rotate mesh just like its a camera then I'll do that.

Link to comment
Share on other sites

https://www.babylonjs-playground.com/#QJE3YB#15

Im not sure if this method would work, but make a fake camera and then use that to set the position of the mesh.lookat()?

I tried to do it here, but for some reason it seems to not work... ehh https://www.babylonjs-playground.com/#Z1VL3V#30

but that should be a hacky solution if I can get it working.
 

Link to comment
Share on other sites

28 minutes ago, Pryme8 said:

No I was saying  it does not do what you want but showing that other viewers do the same thing. 

If no one gives you a good solution, I’ll whip one up for you tommrow.

Thanks mate.

This is what I'm working on here http://preview.punkoffice.com/headmorph/

I'm trying to demonstrate the power of Babylon.js, how it can be used to make realistic facial expressions via morphing (vertex and textures)

I think the eyes look strange cos when you rotate the reflection moves with it

Link to comment
Share on other sites

I mean the light source stays in the same place in relation to the head.  When you're spinning a full scene around you can tell that the camera is spinning and it all makes sense but when there's one object on the screen it feels like the object is spinning, but then the light source and reflections make it feel a bit strange.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...