Home › Forums › General Questions › How To Rotate Object Not Camera with a Static Background
Tagged: environment, fixed background, illumination
- This topic has 6 replies, 4 voices, and was last updated 1 year, 3 months ago by xeon.
-
AuthorPosts
-
2022-05-30 at 11:03 am #52511tsanni07Participant
Hi,
I am trying to rotate my object and not my camera when I click it as I am hoping to use a static background.
I have tried using the ‘Drag Rotate’ and ‘When Dragged Over’ puzzels and the best I get is the object rotating on one axis.
Also, I am trying to project a background through my Camera in Maya using an Image Plane but I dont get the desired result on the webapp.
I am sure it is an easy fix for both but I can’t seem to get it to work, please help.
Link: https://v3d.net/7od
2022-05-30 at 8:47 pm #52519kdvParticipantplace your static background on a plane behind the model and parent this plane to the scene camera
ExamplePuzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-05-31 at 12:24 am #52522xeonCustomerOk…so you want to rotate an object with an image plane that is always the background.
I wouldn’t recommend this approach if you are using an Orbit camera as its counter-intuitive and will cause the user to probably get confused as far as how to navigate.
However, in the example kdv77kdv provided the image plane is linked to the camera…so you get a static background that you are requesting. However the movement is still the camera orbit not the cube rotating.
When you get the cube to rotate, the rotating the cube will not change the orientation, or rotation of the background HDR.So…lets say our object is a cube that we want to rotate. This could be a group of objects parented to an empty…etc. But we will just keep it simple with Cube as our object.
Start with the Event Puzzle “when dragged over”. Change the selected object to “Cube” in this example.
From the Objects Puzzles insert the “change object local positon” puzzle. For this puzzle replace the Object with Cube. You can use either a vector input or use the standard x y z values. For this test, use the x y z and enter .2 for any of the x y and z or any combination you choose. You can adjust the number as you desire.
Thats it..mouse over the cube and drag…..the cube will rotate.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2022-05-31 at 9:27 am #52534tsanni07ParticipantThank you kdv77kdv and Xeon for your responses. I tried linking the plane to the camera and that worked. However, the camera still rotates which is not what I am after.
I also followed the steps suggested by Xeon and the camera still rotates instead of the object.
I am not sure what I am doing wrong. Apologies again as I have only started using Verge3d a few days now.
I am happy to provide you with my Application folder or whatever files you need, please let me know.
Many thanks!
2022-05-31 at 10:10 am #52538kdvParticipantI tried linking the plane to the camera and that worked. However, the camera still rotates which is not what I am after.
but it looks like the model rotates if the “static” background is large enough ))) and the rotation is along two axles. the puzzle
drag-rotate
works only along one axis…Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-09-21 at 2:24 pm #67026stefanpCustomerHi, the solution from @kdv works very well, however as the background plane rotates with the camera it changes illumination (as is moving relatively to the environment map that is fixed). is there a way to get the background plane to NOT receive the environment illumination (and control illumination via emission in texture properties)? like you can turn off receiving shadows on individual elements? Or another solution to avoid the illumination change on the background plane? thanks for your help!
2023-09-21 at 6:02 pm #67029xeonCustomerYou can:
– parent your lights to camera.
– set your emmission on your image plane high enough that it is not influenced by the environmental map
– you can modify the image planes object properties to not receive shadows
– you can add a value node to the world texture rotation mapping node and rotate it based on the rotation of the camera.I am sure there are others
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com -
AuthorPosts
- You must be logged in to reply to this topic.