Question Help rendering image as 3d box

newcodeguywd

New member
Joined
May 21, 2012
Messages
3
Programming Experience
Beginner
Hello,

I have some code that grabs 3 images from separate pictureboxes and creates 1 image from them in a different picturebox
The code works but the image is flat I want the image to be a box
I have tried using ControlPaint.DrawBorder3D(g, New Rectangle(10, 10, 200, 200))
to no avail. after quite a few hours today doing this and searching with not much success I decided to join this forum and see if anyone could help me out
I must be missing something. Here is my code for grabbing the images and creating the image from them
VB.NET:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click        Dim Image1 As New Bitmap(picside.Image)
        Dim Image2 As New Bitmap(pictop.Image)
        Dim image3 As New Bitmap(picfront.Image)
        Dim Image4 As New Bitmap(400, 400)
        Dim g As Graphics = Graphics.FromImage(Image4)


        g.DrawImage(Image1, New Point(5, 0))
        g.DrawImage(Image2, New Point(5, -390))
        g.DrawImage(image3, New Point(40, 10))
        g.DrawImage(Image4, New Point(0, 0))


        g.Dispose()


        g = Nothing
        picmain.Image = Image4








    End Sub
If anyone would mind taking time out of their day to help me I would appreciate it
thanks and have a great day
-WD
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,335
Location
Sydney, Australia
Programming Experience
10+
If you want to do this sort of thing then you should be using WPF rather than WinForms. WPF was built from the ground up to support animation, 3D, etc. WPF will handle the perspective, etc, for you.
 

newcodeguywd

New member
Joined
May 21, 2012
Messages
3
Programming Experience
Beginner
Hi,

I am sorry I have no idea about this wpf. I don't know programming I paid someone to do this and they messed me over so I am left with no program, having now lost money on this I decided to try and do it myself.
Kind of cool to see things happen once you input but that is my limitation. Because I know what I want it to do I have gone about seeking the ways. and have things rendering but darn if I can figure out how to make it render 3d instead of a combined flattened image.:)
 

newcodeguywd

New member
Joined
May 21, 2012
Messages
3
Programming Experience
Beginner
Hi,
I figured it out. I was on the right track just had to tweak it. There was 0 need for anything else, just a matter of calculating the angles for the image to be saved. There was a fantastic example on planet source code by Mohandes Zalatan I used his example and write it to meet what I want. If anyone else ever gets stuck for 3d plotting check this thread out
Pack Designer by Mohandes Zalatan
cheers
-WD
 
Top Bottom