MoI discussion forum
MoI discussion forum

Full Version: Convert model from perspective to front view

Show messages:  1-6  7-26  27-31

From: Elang
21 Mar 2022   [#7]
Hi Pilou.

Yes that's exactly what I need. Can you please post the link for the tutorial from start to finish? I have the heightmap already...

Thank you in advance.
From: pixelhouse
21 Mar 2022   [#8] In reply to [#7]
Hi Elang,

in ZBrush you can follow this steps
http://docs.pixologic.com/user-guide/3d-modeling/sculpting/bas-relief/

Sometimes is it hard to get a clear and clean mesh from a 3d package to ZBrush. So make sure the mesh ist a solid, the normals showing in the right direction

Another solution can be:
Export this model as obj and import it to Cinema 4d and use the Volume Builder and the Volume mesher to generate a volume.
This solution is more flexible, but it can be need a lot of ressources of your hardware. Try first with a bigger voxel size!

https://www.youtube.com/watch?v=H-cykUwp4yU
From: Elang
22 Mar 2022   [#9]
Hi Pixelhouse,

Thank you very much for the info. I'm not a native English speaker so it's quite hard to determine the right keywords/terms for googling. I'll make it sure to check them out.

Cheers!
From: Phiro
22 Mar 2022   [#10]
Hi,

Sorry, I don't have a link on a tutorial to create an heightmap from a model.
It's only a possible workflow I found for your need.
I think it's possible with Blender to have a depthmap, but I haven't learned Blender yet.

So...

1/ you can export your model as STL file. Perhaps OBJ is OK too.
I don't have you file and took for the example a very old model of saloon, I made 30 years ago .


2/ import this mesh in the Meshlab program. You can find it here : https://www.meshlab.net/


3/ you go in the Tools/options menu to parameter the background top and bottom with white.


4/ in View menu, verify the options to avoid trackball and info Panel


5/ In the Render/Shaders, use the DepthMap shader.
Tune the sliders to have a grayscale.



6/ take a screenshot of the zone you want


7/ use your favorite bitmap editor to invert the colors.
The Moi's plugin to use heightmap use black to white grayscale.


8/ In MoI, use the heightmap plugin to have a serie of profiles


9/ use the Loft tool (using all the profiles) to create a relief.



It's not very orthodox use of MoI.
Apologies to Michael, the spirit of MoI is here deflected...
From: Elang
22 Mar 2022   [#11]
Hi, Phiro.

Thank you very much for your effort to post the quick but super useful tutorial.
Appreciate it very much. This forum is great!
From: BurrMan
22 Mar 2022   [#12] In reply to [#1]
Hi Elang,
So with the different "types" of relief, you can go 2 routes. For "3d printing" i think you want to stick with "low relief" or bas relief.

For this you would use a program that can generate an "emboss" from a bitmap, 2d graphic. There are various methods. All the way down to just screenshoting your model. Poly modeling apps and cnc CAM apps usually have this ability

I think you can generate a somewhat "ok" model as a "high relief" inside of moi. But a high relief will not be great for 3d printing with regard to all the undercutting. If you wanted to take the time, you could probably "fix" the major undercut areas, for a 3d print.

To do a high relief in MoI, i would "rotate the model" to get the perspective you need in one of the flat views, then use the edit frame to flatten the model to the desired height.

I'll see about making a video to demonstrate the 2 options.
From: Elang
22 Mar 2022   [#13] In reply to [#12]
Hi Burman, thank you for your help. Definitely waiting for the videos.

However, I've tried rotating the model in the front view, but since it is ortho view, I can't get the perspective as it is needed. Is there something I'm missing here?

Thank you very much in advance.
From: Elang
22 Mar 2022   [#14]
By the way, since it is a hobby project, please allow me to share the 3DM model.

It's not the best model, however. Some parts are still surfaces instead of solids.

Attachments:
Gedung Dakwah.rar


From: BurrMan
25 Mar 2022   [#15] In reply to [#14]
Hi Elang,
I think this is what you were looking for? I included the 2 scripts I used to make your perspective view a flat 2d workplace. Then Flattened the model to 2 units.



There is a bit of lag on some operations because I have my viewport mesh settings very high and the model is not a simple one.

I was a bit sloppy on rotating the flattened perspective back to a regular 2d view, but you could be more precise if you need.

I can show you a regular Bas Relief emboss in some other software if you need to see that.

Hope it helps.

Attachments:
perspective_to_flat.zip


From: Elang
26 Mar 2022   [#16] In reply to [#15]
Hi Burman

Thank you very much for your effort in making the video. Appreciate it very much!

The thing is: in the final result (front view), the building has 'the same height' from left to right, while for it to be seen as 'correct in perspective' the leftmost part should be somewhat shorter than the right one. I tried to do it the same way as your video, followed by flow-deform it from a rectangle to a trapezoid. But it gave me an unexpected result (and took quite a while to process).

So I decided to simulate it with a simple circle, and here's what I got.



1. Choose the circle
2. Apply Deform > Flow
3. Pick the upper right corner of the square as 'base curve'
4. Pick the upper right corner of the trapezoid as 'matching end'

I don't use deform quite often so surely I'm the one who's mistaken.

^_^;

Image Attachments:
flow_deform_failed.png 


From: BurrMan
26 Mar 2022   [#17] In reply to [#16]
Hi Elang,
"""""""The thing is: in the final result (front view), the building has 'the same height' from left to right, while for it to be seen as 'correct in perspective' the leftmost part should be somewhat shorter than the right one. """"""

Ah, i get it....

Not just a perspective emboss or relief but the model itself to actually be skewed.

I'll see if i can do that result in a bit.
From: BurrMan
26 Mar 2022   [#18] In reply to [#17]
So maybe this....




I have included the 2 surfaces i used to flow. you can just copy and paste them or import into your model to be ready for flow.

Select model. then flow from square to perspective shaped surfaces.

I am not a projection specialist. The "Perspective surface" was created by me by drawing the lines. Maybe Michael or someone who is familiar can discuss drawing the trapezoid shape as an exact "Perspective".

Attachments:
flow surfaces.zip

Image Attachments:
perspective model.jpg 


From: BurrMan
26 Mar 2022   [#19] In reply to [#18]
For your flow issue. I dont think it likes a closed curves for a curve to curve flow.

You can create surfaces in that condition.

A simple planar surface wont work here. you need to make a surface with some parameters. I used sweep to generate the 2 surfaces I have attached. Turn on points for those surfaces to see the difference between a planar surface and a swept surface.
From: Elang
26 Mar 2022   [#20]
Hi BurrMan.

Thank you very much!.. I'll check out and study the file you've attached soon.

Sincerely.
From: Elang
26 Mar 2022   [#21]
Got it to work now... thanks, BurrMan !




Now is the time to work with the real model. :)

Image Attachments:
2022-03-27_074806.png 


From: BurrMan
26 Mar 2022   [#22] In reply to [#21]
Alright!!

I have been fooling around with your model. Attempting to turn it into a solid. :o

Have fun!
From: Michael Gibson
26 Mar 2022   [#23] In reply to [#21]
Hi Elang, I was experimenting with a potential new ViewProject command for v5, is this the right kind of thing? :

https://moi3d.com/temp/Elang/Gedung%20Dakwah%20Muhammadiyah%20Gresik_projected_3dm.zip

- Michael
From: Elang
27 Mar 2022   [#24]
Hi BurrMan,

I just realized that we still have to work around the scaling (please forgive my English): so, for the arches, the nearer it is then the wider it should be. i.e.: the leftmost arch should be the narrowest compared to the others, and the rightmost should be the widest. I believe that I have to flow-deform the model once more (after narrowing the leftmost part) to achieve this... One step at a time.



Hi Michael.

That's very close to what I'm trying to achieve, expect for it to become a relief, the 'back part' of the model should be flat and aligned to the origin axis like so:



Please focus on the front and right views. All of its parts need to be extruded (based on the current Top View) along with the Z axis to the construction plane. So, the final model should be a single solid which qualified to be called as relief (that's what my 'client' said, and he is my little brother ^^)

Oh, and it is great if such a feature is added to the V5!


Thank you very much guys, for your help and attention.

Image Attachments:
2022-03-27_190636.png 


From: Michael Gibson
27 Mar 2022   [#25] In reply to [#24]
Hi Elang,

re:
> That's very close to what I'm trying to achieve, expect for it to become a relief, the 'back part' of the
> model should be flat and aligned to the origin axis like so:

I don't think it's possible to achieve that just using a perspective projective matrix transformation as is being done here.

To produce geometry like you're describing I think that after the perspective projection you would need to generate silhouette curves and then extrude those silhouettes down to the base plane, like described here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=10568.6

It's probably better to do it using a depth map rendering + height field approach or zbrush where there are specific tools for it.

- Michael
From: BurrMan
28 Mar 2022   [#26] In reply to [#20]
Made a solid out of your model. It took some work, but succeeded!

Image Attachments:
to solid.jpg 


Show messages:  1-6  7-26  27-31