Home › Forums › Graphics / Blender › How to fix ground plane
- This topic has 10 replies, 3 voices, and was last updated 4 years, 7 months ago by mrburns.
-
AuthorPosts
-
2020-04-16 at 11:10 am #25926mrburnsParticipant
Hi,
I am a newbee in Verge3D and need some help.
I use Blender 2.82, have a simple plane and a cube above the plane in my scene.
Now I want the ground plane stay fixed and the cube rotating if I drag my mouse.How can I do that?
If I click ‘Sneak Peak’ in Blender then the ground plane and the cube rotate together. But as I told already I want the cube rotate above a fixed ground plane.
Thanks for any help…
2020-04-16 at 4:15 pm #25941jemCustomer@mrburns, try this set up:
1. Add a ground plane to the default cube scene.
2. Move the default cube to a location above the ground plane.
3. Point the camera at the center of the cube.
4. Parent both the ground plane and the light source to the camera.
5. Disable panning in the Verge3D camera controls
6. Press sneak peek.Technically, the cube is stationary and the world moves, but to the end-user, it seems that the cube is moving.
Here is a quick screen capture of these steps:
Here is a video of the result:
…(while tenting hands) excellent…
Jeremy Wernick
2020-04-17 at 6:54 am #25968Yuri KovelenovStaff2020-04-17 at 7:13 am #25970mrburnsParticipantHi jem,
thanks – that helped!
2020-04-19 at 10:45 am #26035mrburnsParticipantHi,
following jem’s proposal I created a simple scene.
I put a backplane, a cube hovering over the backplane, a spot light and of course a camera in this scene.
The backplane and the spot light as well I parented to the camera as jem suggested.With this I have following problems:
1.
If I hit ‘Sneak peak’ in Blender (2.82) I can see that the camera view of Blender and Verge3D do not match.
In Blender the cube is fully visible but in Verge3D ‘Sneak Peak’ it is cut at the top.How can I match boths views?
2.
If I drag the mouse in Verge3D ‘Sneak Peak’ the cube rotates as expected.
(better: the camera rotates and it seems the cube rotates)
If you now watch the backplane carefully you can see that the color of the backplane changes slightly. It turns reddish and then back greyish if you rotate 360 degree.How can I keep the color of the backplane the same?
3.
In Blender I set the output size to 800px x 800px but in Verge3D ‘Sneak Peak’ it shows up as full screen.
Is there any way that Verge3D overtakes these 800px x 800px (creates a window with 800px x 800px) and not always shows full screen?
And further: if the users screen is smaller than 800px x 800px shrink it and fit it to users screen size?The Blender scene I attached as zip file.
Thanks for any help!
2020-04-20 at 2:51 am #26073jemCustomerHello @mrburns,
Please post your test Blend file to the thread and we can take a look at it.
1. I am not sure if you are saying that the cube is clipping the camera or if it is improperly framed by the web page in sneak peek mode. I think that this relates to your #3 question.
2. I suspect that you have an HDRI lighting your scene in addition to the point light that is parented to your camera. HDRIs do not move with the camera, so that might explain your color shift. You can test this. Go to the world tab. Deselect use nodes. Try sneak peek again.
3. The standard behavior of the v3d-container div is to fill whatever HTML container it is placed within. When you view the 3D scene in a browser, the container is a browser and it fills your screen. You could embed the V3D application in a simple 800x800px iframe and you will be guaranteed that your scene would render at 800x800px. There are other HTML techniques to do the same thing (and better) if you want to play with CSS. I suspect that this issue (#3) is the cause of your first issue. Your viewport in Blender has a different aspect ratio than your viewport in the browser. You have blender set to 1:1 and browsers are often close to 2:1 (depending on your monitor and a bunch of other factors). That could easily explain the undesired framing. You should also check your camera limits. If they are set to tight, your camera will be pushed towards the subject.
Again, if you could post your file, I could take a look.Jeremy Wernick
2020-04-20 at 7:28 am #26106mrburnsParticipantHi jem,
thanks for reply.
1.
To make it more clear I attached two images and a new blend file to this message.
ViewInBlender.jpg shows the camera view in Blender where the cube is completeley inside the camera border.
ViewInVerge3D.jpg shows the Verge3D window after clicking ‘Sneak Peak’ in Blender.
Here you can see the cube gets cut at the top.2.
You are right I ha HDRIs on (thanks :yahoo:). If I turn it off the reddish color change disappears.
But then the scene is very dark. So I think I have to add some more light sources to my scen and parent them to the cam as well – right?3.
Thanks for this detailed explanation, I understand now.
I changed my browser window to a more squared one and clicked ‘Sneak Peak’ in Blender again. But unfortuneately the cube ist still cut at the top, see ‘ViewInVerge3D_squared_browser.JPG‘
The blend file is attached now to this message.Attachments:
You must be logged in to view attached files.2020-04-20 at 10:18 am #26149mrburnsParticipantHi,
I further tried to figure out why Verge3D view and Blender camera view do not match.
I pressed the 0 (zero) key on the numpad to get into camera view into blender.
Then I activate the camera. If I now click the ‘Update View’ button inside the Verge3D settings of the camera the camera angle and/or position gets aligned somehow.
This makes the cube cut off at the top same as one can see in Verge3D ‘Sneak Peak’.I really don’t know the rules behind how the camera gets aligned if I press ‘Update view’.
Then in Blender in thge camera’s Verge3D settings I saw the option ‘Target Object/Point’ and manual setting options for X/Y/Z.
If I change the Y-value from 0.00 to 0.75 then the cube appears completely inside Blenders camera view. But in ‘Sneak Peak’ the rotation’s center is no more the cube’s center it is somewhat off the center of the cube.So I still need some help to get the cube in Verge3D ‘Sneak Peak’ appear the sam as in Blender’s camera view – but how to get there?
I created a screencast to show it more clearly:
Thanks for any further help…
2020-04-20 at 12:49 pm #26163Yuri KovelenovStaffVerge3D view and Blender camera view do not match
please pay attention to camera target setting in Blender
2020-04-20 at 3:06 pm #26181jemCustomer…yep, what Yuri said. Use the Verge3D camera settings to point the camera at your desired spin-center (probably the center of your cube). Verge3D uses this setting to point the camera. It does not use the camera orientation from the Blender scene.
Yes, you can add more lights to brighten the scene. I will often use three-point lighting in my scene, but it is not a perfect replacement for an HDRI. HDRIs provide more realistic illumination, and multiple shadow casting lights are probably not a great idea because of technical limitations with realtime shaders on some platforms. I wonder if we can make the HDRI track with the camera? I did a simple experiment to do this with puzzles, but it produced weird results. Maybe someone from the Soft8soft team has a better approach?
Jeremy Wernick
2020-04-21 at 7:08 am #26217mrburnsParticipantHi Jem and Yury,
thanks for reply – that really helped. I pointed the camera now to the cube using the Verge3D setting of the camera.
Thanks again – great help here!
-
AuthorPosts
- You must be logged in to reply to this topic.