keeping the exact measurement during export

 
Post new topic   Reply to topic    K3DSurf forum Forum Index -> K3DSurf Discuss/Discussions
View previous topic :: View next topic  
Author Message
samson



Joined: 19 Jan 2010
Posts: 2

PostPosted: Sat Jan 23, 2010 10:20 pm    Post subject: keeping the exact measurement during export Reply with quote

Hi,

first, I wanna thank you for this great application. It is really useful for me Very Happy

But I've one problem, which annoys me more and more.
What I do is: I define shapes in K3DSurf with exact measurements. I use the parametric way to define my shapes. My formulas, all the parameters of the formulas and also the variables u and v are setup exactly.
Then I export my shape to a povray mesh file and import this file with povray. This works, but my shape is about 100 times bigger than previously defined and shifted along the z-axis. Due to the fact, that this shape shall exactly interfere with other object defined in povray, I have to figure out a scaling factor and a z-shift value by hand, until my shape fits to the other ones. Doing this job once wouldn't be that problem, but the values to figure out are changing after every tiny change at my original formulas ! So I redo this again and again.

I assume, that there is an automatic scaling inside K3DSurf for displaying the shape. The export uses the scaled values and not the original values from the formulas.
Is there a trick, that I can get the exact raw values in my exported mesh file ?

Thanx in advance, Samson
Back to top View user's profile Send private message
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 539

PostPosted: Tue Jan 26, 2010 12:56 am    Post subject: Reply with quote

Hi all,
Thank you samson. I'm happy you like K3DSurf but I'm afraid there is no way to get the reel values of your parametric formulas from the exported mesh since it doesn't tell anything about the maximum/minimum values of the original mesh (ie: max and min of f(u,v), g(u,v) and h(u,v) ). These informations are lost in the process of scaling the original mesh to fit in a given 3D cube that stands in front of the camera along the z-axis (the file test.pov shows that the camera is always at the same place <0,0,800>) .
So, instead of moving the camera, we are moving/scaling the mesh to make it at the center of the window view: this make it easier for us to render a snapshot with PovRay as it looks in the K3DSurf window.
I have to add an option in the Pov menu for generating the reel values of the mesh but I'm sorry I can't tell when its going to be done...
We will also be happy to see our first PovRay rendred scene here in the forum Smile (most users here are using some cutting edge software and its time to show them the power of this great sotware Wink )
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
samson



Joined: 19 Jan 2010
Posts: 2

PostPosted: Tue Jan 26, 2010 4:55 pm    Post subject: Reply with quote

Hi Taha,

thank you for your reply. It looks a bit, like I supposed in the beginning.

I wanna offer to you, that I either help you for this change, as best as I can, for an official release, or I may try to do this changes to K3DSurf to get my own patched version, which fixes my "value problem" (sorry, "value" not "measurement", a stupid German-English translation fault, even in the subject of this thread). I prefer the first solution, even if it is more workload for you and me, but the community will benefit from it.
In both cases, it will be very helpful, if you can give me some hint, where / in which module(s) to start looking for the needed code change. I downloaded source code version 0.6.2.4. Is it the actual version ? I looked a bit at the code, and what I saw looks quit clear to me, so I'm hopeful to achieve it.

I really will understand, if you do NOT have any time currently for this task. Please let me know.

For you curiosity, I uploaded some first rendering results (pictures). Its a pre-release, nothing is really ready. My goal is some animations. I will update, if there is more to show. Here is the link:
http://www.7fun.de/rotation-engines/Gallery/K3DSurf/

Cheers, Samson
Back to top View user's profile Send private message
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 539

PostPosted: Tue Jan 26, 2010 11:35 pm    Post subject: Reply with quote

Hi all,
I'll try to make a development version as soon as possible and make it available here. Meanwhile (and if this interest you) you can take a look on the file "Model3D.cpp" in "k3dsurf-0.6.2.4":
1) in "void Model3D::calcul_objet3()" , the right values of your parametric formulas are stored in the matrix "Tre2[][]"
2) in "void Model3D::boite_englobante3() " the original values are irremediably changed (scaled/shifted) .
There is also "IndexPolyTabPt" that store the list of polygons and "NormVertexTabPt" that store the normal vectors (there is noting to change in these values however).
Let me say it right now: it's a messy code Very Happy (mostly because of the absence of OpenGL in earlier release of K3DSurf)
NB: your english isn't as bad as mine... Smile
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    K3DSurf forum Forum Index -> K3DSurf Discuss/Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


2005 Powered by phpBB © 2001, 2005 phpBB Group


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com