Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Camera perspective issue - Need No FOV

Author
Message
Maleck
22
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 10th Nov 2004 09:05
I am working on a util ofor the game I am working on and I have an issue that I do not know if there is a solution.

Ths util has 4 viewports for viewing the same model from different perspectives like many 3D modeling apps (top, front, left, 3D). I have all the viewports working mostly - #D can pan, rotate, and zoom, the others can zoom and pan, but no rotate. I am wanting to have the front/side/top views offer a straight view towards the model.

I am running into a small issue in that even with FOV set to 1, there is still some shifting due ot the depth of the model. I am looking for a way to have the top/front/side views not have a FOV, but a complete flat view of the model that does not have depth, to allow for easier placement of features for the game.

Any assistance would be great. Thanks for the help.
walaber
22
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 10th Nov 2004 21:26
i believe you can set the FOV to any float value, so a smaller value might work...

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Maleck
22
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 11th Nov 2004 05:45
Thanks, I'll give that a try. If I can set a floating value for it, I think that will get it low enough. I had tried 0 for FOV, but that does bad things to the camera display for that frame of the window.
Maleck
22
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 11th Nov 2004 07:30
I was able to set .1 as my FOV for the camera and that seems to be small enough to do the trick. Thanks for the help. I did not know that FOV would accept a float.
AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 11th Nov 2004 16:36 Edited at: 11th Nov 2004 16:36
There must be a way to create an orthographic camera in DX and probably DBP. Ask VanB how he did it for his modelling program.


Buy it
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 11th Nov 2004 17:13
I think he drew the 2D viewports with the line and box commands. I don't think there is currently any way to have true orthographic projection in DBPro.

Isn't it? Wasn't it? Marvellous!
Maleck
22
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 12th Nov 2004 01:38
Thanks for the help. I'll check and see if he has any insight.

As this is not for creating the models, merely adding effects points and such, the suggestion by Walaber may be enough for it to function, but I still need ot tweak the movement rates and test placing points to make sure setting the FOV so small does not have any side effects. Having true orthyographic project would be the icing on the cake.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Nov 2004 16:49
Yeah, your right Hamish, I have all the data internally, so simply drawing the model was straightforward for me.

There are a couple of options.

1.Make 4 copies of your model, and flatten the sides on 3 of them - really you want a different model in each viewport. I suppose you could use a single model and scale each time, but you need to flatten the axis that your viewing from, e.g. a plan view would scale the object by 100,0,100, front would scale by 100,100,0. By scaling the object you can flatten it perfectly - as long as your using wireframe mode and culling off - it should be peachy.

2.Take your mesh and make a memblock from it - then use that to get the vertice locations and draw them onto the screen with the line command. DBPro is actually better than most would expect for that sort of thing - but I think option 1 would be nice and smooth. If you want to go with memblocks then I could show you some code to quickly and easily get the data you need. I used a similar method to get the vert locations for a vert snapping thing I needed in a level editor.


Van-B


It's c**p being the only coder in the village.
Dmitry K
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 13th Nov 2004 01:56 Edited at: 13th Nov 2004 01:56
Othographic camera in DBPro?
Easily!



Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP
Maleck
22
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 13th Nov 2004 12:05
Thank you both so very much for the help.

I will give the function a try, DMitry (I noticed it on the Code base just before checking this thread).

Van-B, thank you very much for the info on the scaling option as well as the memblock option. I will probably need a snapping feature and that may work for it. Thank you so much for looking to this for me, and I would be interested in the vert info data from a memblock sample.
Maleck
22
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 1st Dec 2004 09:26 Edited at: 2nd Dec 2004 04:50
Thanks for the help. I was playing around with the Orthographic camera function from Dmitry and it is workign pretty good. I tweaked it a bit to be able to create a zooming effect.

I do have one small issue. The model I am testing with is not displaying some of the polygons that are on thr other side of the model from the camera. Not all the polygons, just some. Any thoughts?

Thnaks!

[EDIT]
My bad. I figured out that the poly's that were not showing in each view were completely behind other poly's, thus being culled. I turned off culling for the object, and viola, all is visible. Thanks.

Login to post a reply

Server time is: 2026-07-11 12:01:10
Your offset time is: 2026-07-11 12:01:10