Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: projector perspective
joseph.poc-
h
Newbie
Posts: 3
Permalink
Post projector perspective
on: November 17, 2013, 04:55
Quote

Hello,

I am doing a projection mapping on a house. I have my content and I have also successfully exported a mesh from blender of the house and gotten it into MWS. The content is rendered in blender to a camera that has approximately the same optics as the projector and I want to do final corrections.

My issue is that once I load the mesh object the perspective is completely corrected in the output window to a front view. I would like my starting point from the output window to just be the perspective I started at with the original rendered video like how it looks when I select "texture" for the meshEditor viewport.

Thanks,
Joe

joseph.poc-
h
Newbie
Posts: 3
Permalink
Post Re: projector perspective
on: November 17, 2013, 05:00
Quote

I should also add that the UV Map is "project from view" from the perspective of the blender camera

maybites
Administrator
Posts: 32
Permalink
Post Re: projector perspective
on: November 18, 2013, 11:35
Quote

Hi Joe

there are a couple of things to say:

While your approach is ok (rendering the scene from an aproximate position where the projector is located) and makes sense in certain situations (see the demo-project "richti" and the result here: http://meshwarpserver.org/?p=50), the reason MWS works the way it works is to detangle the position of the projector and the position of the viewpoint from where you want to render your scene. Since I dont know what you wanna achieve I assume your aproach is the best for your problem, and you have two possibilities: Either you turn your whole scene inside blender in such a way that the camera looks from the front onto your scene and export your mesh again, or you use the transformation boxes that can be found for each mesh inside the MeshEditor. Here the approach would be a bit try and error, and since MWS only renders in orthogonal projection, it can be a bit hard to figure out how you look onto the model. once your output window looks okay, you can apply these transformations onto the mesh (press position/rotation/scale) - the values in the numberboxes jump back to 0 (rsp. 1 in scale) and the mesh for editing is transformed. now you can start making your ajustments.

the way you made your UV map sounds fine to me, before you do all the ajustments of the modelvertices I would test inside MWS if the UV mapping is actually acurate and works with your rendered content - there is nothing more frustrating than finishing a mapping and then figuring out that you have made a mistake (or even forgotten) with the UV-mapping.

joseph.poc-
h
Newbie
Posts: 3
Permalink
Post Re: projector perspective
on: November 18, 2013, 16:01
Quote

Thanks for the detailed reply. After some trial and error and your suggestions I ended up finding a solution that worked well. I imported an image of the rendered animation into blender as a background video. Then I created a mesh around the perimeter of the architecture in the picture (the canvas I am projecting onto) and added additional mesh vertices that match the mapping. Then I exported THIS mesh (a 2D mesh) instead of the actual architectural 3D mesh as an obj. Alas it has a perfect outline and verts in the mesh that I can just click and drag to their proper spot and the corrections will be made for any errors.

Its kind of a mapamonk/camshnappr approach but a little bit easier to wrap my head around then learning touchdesigner fully.

Here is the workflow completely:
1. Create 3D model in Blender
2. Animate
3. Render to blenders virtual cameras that match the projectors approximate real world position and optics.
4. Render a JPEG wire frame of the 3d Mesh from projectors position
5. Create new Blender file and add the JPEG (step 4) as a background image.
6. Draw a 2D mesh that matches the rendered image
7. Draw a plane that matches the bounds of the image (this is to ensure proper UV mapping that matches the image)
8. Select everything and UV Project with bounds from the front
9. Export the 2D mesh but don't select the plane created in step 7 so only the building 2D mesh will export.
10. Import into MWS

The result is a mesh that perfectly matches the projectors perspective rendered from Blender and it will also already be masked. Now you just drag the vertices to the respective real world position and the projected image will perfectly line up.

maybites
Administrator
Posts: 32
Permalink
Post Re: projector perspective
on: November 18, 2013, 16:52
Quote

glad you found a solution you are happy with. In some cases it really makes sense to create a simplyfied and 2d mesh to do the mapping.

Since I dont know any details of you project I can not advise you otherwise, but instead of recreating a mesh with the help of a background image, another solution would be to

1. copy the model used for the animation (unless it has so many vertices that is would be a pain to map)
2. look at it from the cameras perspective and remove all faces (and vertices) that are hidden.
2b. do the UV mapping "project from view".
3. select pivot point "view"
4. select all vertices.
5. press "s" and then "z" twice and then 0. this will push all vertices into a plane perpendicular to the view-direction. this makes the mesh two dimensional. unfortunately the scale works orthogonally, so
6. grab each vertice and place it back over its original position with just pressing "g" for grab. (assuming the original mesh is visible). using just "g" to grab will make sure that the vertice stays on the plane.
7. turn the mesh so that it faces to the "front" and export it.
8. keep on mapping in MWS

cheers - m

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.016 seconds.