PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Sun Sep 24, 2017 5:28 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Terrain edition tools ?
PostPosted: Thu Sep 10, 2009 8:36 pm 
Offline

Joined: Thu Sep 10, 2009 8:18 pm
Posts: 5
Hi team

I'm working in my terrain editor for a work of my university.
I want implement a brush like PnP terrain Creator.

I am not able to implement the modes that are in the screenshot.

I don't request the source code . Only some idea of how I can make this.
If it is possible ..

Advanceds thanks


Attachments:
mode2.JPG
mode2.JPG [ 43.1 KiB | Viewed 355 times ]
mode1.JPG
mode1.JPG [ 54.41 KiB | Viewed 359 times ]
Top
 Profile  
 
 Post subject: Re: Terrain edition tools ?
PostPosted: Fri Sep 11, 2009 9:08 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
Hi,

these brushs are based on simple mathematics, computing the height at a given terrain position using a given slope value.
The source code for the PlugIns are contained in the PlugIn SDK.

However, maybe you should think about whether it might be a better approach to use the editing tools of PnP and just develop some PlugIns for it to support the features you need for you project (editing features, file formats, scene export, etc...). So you don't have to develop everything from the start. We can usually offer some discounts for universities, so maybe it is worthwhile to discuss in more detail about your project.


Ralf


Top
 Profile  
 
 Post subject: Re: Terrain edition tools ?
PostPosted: Fri Sep 11, 2009 7:01 pm 
Offline

Joined: Thu Sep 10, 2009 8:18 pm
Posts: 5
Hi Ralf

Thanks to reply

Quote:
you wrote:
However, maybe you should think about whether it might be a better approach to use the editing tools of PnP and just develop some PlugIns for it to support the features you need for you project (editing features, file formats, scene export, etc...). So you don't have to develop everything from the start. We can usually offer some discounts for universities, so maybe it is worthwhile to discuss in more detail about your project.


I understand.
But I have to implement it from the beginning
I have implemented the base of the project.
Now I want to add some brushes for terrain edition as "PnP Terrain editor"

Thanks again

dolphin


Top
 Profile  
 
 Post subject: Re: Terrain edition tools ?
PostPosted: Mon Sep 14, 2009 8:31 pm 
Offline

Joined: Thu Sep 10, 2009 8:18 pm
Posts: 5
Hi Ralf

Sorry please. Two question more:
How do you calculate this ?

Code:
// PnPTCGradientFallOffPlugIn.cpp
// gradient fall-off-effect PlugIn implementation.
fDistance=Brush.DistanceSquare(posTest,&posBrush);
.

I don't understand the calculate.
For example:
posTest= 8@8
posBrush= 9@9.
fDistance = 0.68.

And. How do you calculate posBrush ?

Advanced thanks
dolphin


Top
 Profile  
 
 Post subject: Re: Terrain edition tools ?
PostPosted: Tue Sep 15, 2009 8:00 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
For performance reasons it is often better to skip root computations and instead use squared values.
Please understand that I cannot tell you how to code a terrain editor.


Top
 Profile  
 
 Post subject: Re: Terrain edition tools ?
PostPosted: Tue Sep 15, 2009 1:23 pm 
Offline

Joined: Thu Sep 10, 2009 8:18 pm
Posts: 5
Hi Ralf

Thanks to reply.

Quote:
you wrote:
For performance reasons it is often better to skip root computations and instead use squared values.
Please understand that I cannot tell you how to code a terrain editor.


I understand, but I don't request the source code .

What is Brush.DistanceSquare(posTest,&posBrush) ?
Is the distance from a point to another point?.

My Code:
Code:
Point>>dist: aPoint
   "Answer the distance between aPoint and the receiver."

   ^(aPoint - self) r
Point>>r
   "Answer the receiver's radius (magnitude) in a polar coordinate
   system."

   ^(self dotProduct: self) sqrt.


If I calculate :
(8@8 dist:9@9) squared = 1.99999988079071 .
I you code is = 0.68.

I only want to know.
What are you calculating?

Not the implementation in code.

Advanced thanks

dolphin

PD: Sorry for my english, is not very good


Top
 Profile  
 
 Post subject: Re: Terrain edition tools ?
PostPosted: Tue Sep 15, 2009 2:07 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 891
Location: Braunschweig
It computes the squared distance to the center of the brush minus the squared size of the brush... resulting in the squared distance to the brush.

The returned brush element is just the heightmap element on the border of the brush with the shortest distance to the tested heightmap element.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron