Stefan, thanks for pointing that out, i have added to vtTiledGeom:
if (vNormal)
m_pMiniLoad->getnormal(p3.x, p3.z, &vNormal->x, &vNormal->y,
&vNormal->z);
That would only affect Jodie's slope query in the case Jodie is using a
tileset for elevation. In all other cases, the FindAltitudeAtPoint method
already returns the normal, which as you pointed out can easily give slope.
Slope wouldn't need adding as a method in vtHeightfield, except perhaps for
convenience.
-Ben
> -----Original Message-----
> From: Stefan Roettger
> Sent: Saturday, August 22, 2009 7:26 PM
>
> bool vtTiledGeom::FindAltitudeAtPoint(const FPoint3 &p3, float
> &fAltitude, bool bTrue, int iCultureFlags, FPoint3 *vNormal) const
> {
...
> // TODO: support other arguments?
> float alt = m_pMiniLoad->getheight(p3.x, p3.z);
...
> Analogue to that, you can get the normal by replacing that call with
> miniload->getnormal(x,z,&nx,&ny,&nz). With the normal the gradient
> computes as (-nx,-nz) To expose that to the higher levels of enviro,
> it needs to be a added as a virtual method in vtHeightfield.
> Stefan
Sunday, August 23, 2009, 3:21:49 AM, you wrote:
> Stefan, thanks for pointing that out, i have added to vtTiledGeom:
> if (vNormal)
> m_pMiniLoad->getnormal(p3.x, p3.z, &vNormal->x, &vNormal->y,
&vNormal->>z);
Ok - I think I'm lost again. :-) Like I say - 3D game dev is
outside of my expertise. If I wanted the slope and I had two
coordinates in 2space, (x[1], y[1]) and (x[2], y[2]), then the slope
would be simply (y[2] - y[1]) / (x[2] - x[1]) - perpendicular slope
(and the tangent normal at this point) would be the reciprocal of
that. Right?
So pardoning my noob-ness - advice for finding that in this context?
I'm adding a generic communications class so that I can send my data
out over the serial or USB port so that I can drive my
microcontroller for servo control. I'll finish it after a little
nap (it's 04:30 here now...)
Thanks again for your patience and advice to the Noob! :-)
--- Jodie
> In all other cases, the FindAltitudeAtPoint method
> already returns the normal, which as you pointed out can easily give slope.
> Slope wouldn't need adding as a method in vtHeightfield, except perhaps for
> convenience.
--
Best regards,
--- Jodie Reynolds, jodier@...
mailto:jodier@...
Jodie,
what it means is that you need to query the height field
(vtHeightField) with the FindAltitudeAtPoint method to get the height
of the height field at a given point in the plane. If you are looking
for the normal/gradient you additionally pass a pointer to a Float3
vector in the vNormal parameter. Then you will get the normal in that
vector. And with the normal (nx,ny,nz) the gradient/slope you are
looking for computes as (-nx/ny,-nz/ny).
Hope that helps,
Stefan
On Aug 23, 2009, at 1:34 PM, Jodie Reynolds wrote:
>
>
> Sunday, August 23, 2009, 3:21:49 AM, you wrote:
>
>> Stefan, thanks for pointing that out, i have added to vtTiledGeom:
>
>> if (vNormal)
>> m_pMiniLoad->getnormal(p3.x, p3.z, &vNormal->x, &vNormal->y,
> &vNormal->>z);
>
> Ok - I think I'm lost again. :-) Like I say - 3D game dev is
> outside of my expertise. If I wanted the slope and I had two
> coordinates in 2space, (x[1], y[1]) and (x[2], y[2]), then the slope
> would be simply (y[2] - y[1]) / (x[2] - x[1]) - perpendicular slope
> (and the tangent normal at this point) would be the reciprocal of
> that. Right?
>
> So pardoning my noob-ness - advice for finding that in this context?
>
> I'm adding a generic communications class so that I can send my data
> out over the serial or USB port so that I can drive my
> microcontroller for servo control. I'll finish it after a little
> nap (it's 04:30 here now...)
>
> Thanks again for your patience and advice to the Noob! :-)
>
> --- Jodie
>
>> In all other cases, the FindAltitudeAtPoint method
>> already returns the normal, which as you pointed out can easily
>> give slope.
>> Slope wouldn't need adding as a method in vtHeightfield, except
>> perhaps for
>> convenience.
>
>
>
> --
> Best regards,
> --- Jodie Reynolds, jodier@...
mailto:jodier@...
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
> That would only affect Jodie's slope query in the case Jodie is
> using a
> tileset for elevation. In all other cases, the FindAltitudeAtPoint
> method
> already returns the normal
Ok, I see, vtTiledGeom was the only implementation of vtHeightField
that forgot to implement to return the normal. Good that we found out
now.
> Slope wouldn't need adding as a method in vtHeightfield, except
> perhaps for
> convenience.
Yes, it is not required as a distinct method for vtTiledGeom, but I
think it would be indeed convenient to have such a wrapper for the
slope in vtHeightField.
Side note: Looking at the current code in TiledGeom, the altitude is
exaggerated, but the normal is not. Is that intentional? I would have
expected to have analogue behavior both for altitude and normals when
returned by the same function.
Stefan
I have uploaded a new VTP release.
For people who installed from the Windows installers, you can un-install and
re-install from the download folder.
If you used the Windows binaries zip instead, you can grab:
http://vterrain.org/dist/vtp-apps-bin-090826.zip
Some highlights:
Enviro:
Added command "Write Elevation to BT".
Support for a TIN water surface, as a terrain parameter under 'Ephemeris'.
Support image layers on tilesets with non-meter-unit CRS (KG).
Fixed fog distance in runtime ephemeris dialog (KG).
Fixed CLOD behavior when switching between multiple tileset terrains (KG).
Added control in Layer Dialog of structure shadows.
Support for saving shadow state per structure (true/false) to VTST.
VTBuilder:
Fixed sampling of elevation to not exclude exact edge case.
Fixed display of RGB under cursor for image layers.
Command "Select structure by index".
UI: reduce excessive dialog open/close on elevation layer rendering.
Extended 'generate TIN from Raw' to support 2D polygons with height from a
field.
Most-Recently-Used menus for projects, layers, and imports.
I am particularly happy about the water surface in Enviro and the MRU in
VTBuilder, which are features i've been meaning to add for years.
For a complete list of what's changed, please see the ChangeLog
(http://vterrain.org/Implementation/ChangeLog/)
-Ben
Hi,
I am trying to create four extra plant models for vtp but they do not
appear to be displaying in enviro (see the attached images). They were
downloaded from the internet and modified in photoshop according to the
vtp website instructions (http://www.vterrain.org/Plants/Create/) although
I did not know how to use the alpha channel and instead of a solid
background a blank background was used. The blank background was chosen as
all the other plant images that come with vtp appeared to have a blank
background.
The bioregions text file and species list xml file are also attached.
These refer to two extra plants as well, papaya and mango. The papaya and
mango are from the original set of plant models that come with VTP and
they display perfectly, none of the ones I created display at all.
Do you have any advice? I have played around with the bioregions file and
set the papaya to display in a different region and one of the models
which wasn't working to display in the original papaya bioregion but still
not luck. This makes me think that there is something wrong with the
images.
I would appreciate your feedback,
Kind regards,
Wil
----------
bioregion1.0
types: 3
species: 2
Rough_Tree_Fern 0.03
Blackwood 0.03
species: 2
Mango 0.07
Papaya 0.08
species: 2
Banks_Grevillea 0.7
Sago_Flower 0.7
[Non-text portions of this message have been removed]
I see that attachments can't be made to this forum. If anyone is
interested, email me and i will send the attachments to your email.
Kind regards,
Wil w.waters@...
> Hi,
>
> I am trying to create four extra plant models for vtp but they do not
> appear to be displaying in enviro (see the attached images). They were
> downloaded from the internet and modified in photoshop according to the
> vtp website instructions (http://www.vterrain.org/Plants/Create/) although
> I did not know how to use the alpha channel and instead of a solid
> background a blank background was used. The blank background was chosen as
> all the other plant images that come with vtp appeared to have a blank
> background.
>
> The bioregions text file and species list xml file are also attached.
> These refer to two extra plants as well, papaya and mango. The papaya and
> mango are from the original set of plant models that come with VTP and
> they display perfectly, none of the ones I created display at all.
>
> Do you have any advice? I have played around with the bioregions file and
> set the papaya to display in a different region and one of the models
> which wasn't working to display in the original papaya bioregion but still
> not luck. This makes me think that there is something wrong with the
> images.
>
> I would appreciate your feedback,
>
> Kind regards,
>
> Wil
>
> ----------
>
> bioregion1.0
> types: 3
> species: 2
> Rough_Tree_Fern 0.03
> Blackwood 0.03
> species: 2
> Mango 0.07
> Papaya 0.08
> species: 2
> Banks_Grevillea 0.7
> Sago_Flower 0.7
>
>
> [Non-text portions of this message have been removed]
>
>
Wil,
I tried your plant models, and they worked well. We just need to
troubleshoot why they are not working for you. Please confirm:
1. You have added your species (Acacia_melanoxylon, etc.) to the main
species.xml file.
2. You have put your plant png files into the 'PlantModels' folder, on any
data path.
3. When you launch Enviro's 'Plants' dialog, your species should appear on
the drop-down list (e.g. 'Blackwood')
-Ben
> -----Original Message-----
> From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of
Wilfred
> David Waters
> Sent: Thursday, October 22, 2009 8:22 PM
> To: vtp@yahoogroups.com
> Subject: [vtp] [Fwd: plant models for vtp]
>
> Hi,
>
> I am trying to create four extra plant models for vtp but they do not
> appear to be displaying in enviro (see the attached images). They were
> downloaded from the internet and modified in photoshop according to the
> vtp website instructions (http://www.vterrain.org/Plants/Create/) although
> I did not know how to use the alpha channel and instead of a solid
> background a blank background was used. The blank background was chosen as
> all the other plant images that come with vtp appeared to have a blank
> background.
>
> The bioregions text file and species list xml file are also attached.
> These refer to two extra plants as well, papaya and mango. The papaya and
> mango are from the original set of plant models that come with VTP and
> they display perfectly, none of the ones I created display at all.
>
> Do you have any advice? I have played around with the bioregions file and
> set the papaya to display in a different region and one of the models
> which wasn't working to display in the original papaya bioregion but still
> not luck. This makes me think that there is something wrong with the
> images.
>
> I would appreciate your feedback,
>
> Kind regards,
>
> Wil
Hi Ben
Thanks for your reply!
We made a separate species.xml file with the following content:
<?xml version="1.0" encoding="utf-8"?>
<species-file file-format-version="1.1">
<species name="Acacia_melanoxylon" max_height="35.00">
<common name="Blackwood" />
<appearance type="1" filename="Acacia_melanoxylon2.png" height="23"
width="6.5" />
<appearance type="1" filename="Acacia_melanoxylon20.png" height="35"
width="19.3" />
</species>
<species name="Cyathea cooperi" max_height="25.00">
<common name="Rough_Tree_Fern" />
<appearance type="1" filename="Cyathea_cooperi.png" height="4" width="2" />
</species>
<species name="Carica papaya" max_height="5.00">
<common name="Papaya" />
<common name="باباي" lang="ar" />
<common name="Melontrę" lang="da" />
<common name="Papayer" lang="fr" />
<common name="Melonenbaum" lang="de" />
<common name="Papajabaum" lang="de" />
<common name="Papaya" lang="es" />
<common name="Papayero" lang="es" />
<common name="Papaija" lang="fi" />
<common name="Papaia " lang="it" />
<common name="פפאיה" lang="he" />
<common name="パパイヤ" lang="jp" />
<common name="Meloenboom" lang="nl" />
<common name="Papaja" lang="nl" />
<common name="Papaja" lang="pl" />
<common name="Mamoeiro" lang="pt" />
<common name="Papaeira" lang="pt" />
<common name="Папайя" lang="ru" />
<common name="பப்பாளி" lang="ta" />
<common name="มะละกอ" lang="th" />
<common name="番木瓜" lang="zh" />
<appearance type="1" filename="papaya1_v2_256.png" width="2.00" height="4.00"
shadow_radius="0.6" shadow_darkness="0.2" />
</species>
<species name="Grevillea_banksii" max_height="25.00">
<common name="Banks_Grevillea" />
<appearance type="1" filename="grevillea_banksii.png" height="10"
width="5" />
</species>
<species name="Ozothamnus_diosmifolius" max_height="1.00">
<common name="Sago_Flower" />
<appearance type="1" filename="Ozothamnus_diosmifolius.png"
height="0.5" width="0.9" />
</species>
<species name="Mangifera indica" max_height="10.00">
<common name="Mango" />
<common name="Manguier" lang="fr" />
<common name="マンゴー" lang="jp" />
<common name="Манго" lang="ru" />
<common name="芒果" lang="zh" />
<appearance type="1" filename="mango_2m_512.png" height="2" width="1.6"
shadow_radius="0.8" shadow_darkness="0.5" />
<appearance type="1" filename="mango_3m_512.png" height="3" width="3.6"
shadow_radius="0.8" shadow_darkness="0.5" />
<appearance type="1" filename="mango_7m_512.png" height="7" width="7"
shadow_radius="0.8" shadow_darkness="0.5" />
</species>
</species-file>
You will see that the entries for papaya and mango from the main species list
have been copied in there because we want to use those as well.
We also made our own bioregions text file, trying to put the species from the
xml file in those bioregions:
bioregion1.0
types: 3
species: 2
Rough_Tree_Fern 0.03
Blackwood 0.03
species: 2
Mango 0.07
Papaya 0.08
species: 2
Banks_Grevillea 0.7
Sago_Flower 0.7
So we are not adding plants one by one in Enviro using the 'Create plants'
button, but rather trying to populate whole regions with them using the
bioregions text file.
Is this the right way to do it?
In your response you suggest adding the new species code to the main species xml
file - we also tried this but it did not work.
I'm wondering if we are becoming confused here amongst all the various steps.
Are you able to tell me the steps you went through to successfully get the
plants to display?
Thanks so much!
Wil
--- In vtp@yahoogroups.com, "Ben Discoe" <ben@...> wrote:
>
> Wil,
>
> I tried your plant models, and they worked well. We just need to
> troubleshoot why they are not working for you. Please confirm:
>
> 1. You have added your species (Acacia_melanoxylon, etc.) to the main
> species.xml file.
> 2. You have put your plant png files into the 'PlantModels' folder, on any
> data path.
> 3. When you launch Enviro's 'Plants' dialog, your species should appear on
> the drop-down list (e.g. 'Blackwood')
>
> -Ben
>
> > -----Original Message-----
> > From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of
> Wilfred
> > David Waters
> > Sent: Thursday, October 22, 2009 8:22 PM
> > To: vtp@yahoogroups.com
> > Subject: [vtp] [Fwd: plant models for vtp]
> >
> > Hi,
> >
> > I am trying to create four extra plant models for vtp but they do not
> > appear to be displaying in enviro (see the attached images). They were
> > downloaded from the internet and modified in photoshop according to the
> > vtp website instructions (http://www.vterrain.org/Plants/Create/) although
> > I did not know how to use the alpha channel and instead of a solid
> > background a blank background was used. The blank background was chosen as
> > all the other plant images that come with vtp appeared to have a blank
> > background.
> >
> > The bioregions text file and species list xml file are also attached.
> > These refer to two extra plants as well, papaya and mango. The papaya and
> > mango are from the original set of plant models that come with VTP and
> > they display perfectly, none of the ones I created display at all.
> >
> > Do you have any advice? I have played around with the bioregions file and
> > set the papaya to display in a different region and one of the models
> > which wasn't working to display in the original papaya bioregion but still
> > not luck. This makes me think that there is something wrong with the
> > images.
> >
> > I would appreciate your feedback,
> >
> > Kind regards,
> >
> > Wil
>
I should also say that when I go through the generate vegetation dialog in vt
builder and it shows the veg distribution results the new plants are listed
along with the number of instances generated... so all appears to be going well
(except often the second plant in biotype 2 shows no instances generated). it is
only when i then load enviro that they do not display.
I had never checked if i could add plants manually from the drop down list and
just checking now they are not listed there...
lastly i should say that i experimented by deleting the original path which
loads up in enviro terrain manager and only linked to the folder with my saved
vt builder project. this produced a strange scene in enviro where the plants
were represented by white blocks and the water was a flat expanse of beige. at
least here i could see that vtp was placing the plant models, it just did not
appear to be attaching a texture to them so we could see!
Anyway, hope you can understand all these details! It's getting a bit late now
for us the project is due Monday, but if you can get back to us before then it
would be great to try to solve it!
Wil
the--- In vtp@yahoogroups.com, "Ben Discoe" <ben@...> wrote:
>
> Wil,
>
> I tried your plant models, and they worked well. We just need to
> troubleshoot why they are not working for you. Please confirm:
>
> 1. You have added your species (Acacia_melanoxylon, etc.) to the main
> species.xml file.
> 2. You have put your plant png files into the 'PlantModels' folder, on any
> data path.
> 3. When you launch Enviro's 'Plants' dialog, your species should appear on
> the drop-down list (e.g. 'Blackwood')
>
> -Ben
>
> > -----Original Message-----
> > From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of
> Wilfred
> > David Waters
> > Sent: Thursday, October 22, 2009 8:22 PM
> > To: vtp@yahoogroups.com
> > Subject: [vtp] [Fwd: plant models for vtp]
> >
> > Hi,
> >
> > I am trying to create four extra plant models for vtp but they do not
> > appear to be displaying in enviro (see the attached images). They were
> > downloaded from the internet and modified in photoshop according to the
> > vtp website instructions (http://www.vterrain.org/Plants/Create/) although
> > I did not know how to use the alpha channel and instead of a solid
> > background a blank background was used. The blank background was chosen as
> > all the other plant images that come with vtp appeared to have a blank
> > background.
> >
> > The bioregions text file and species list xml file are also attached.
> > These refer to two extra plants as well, papaya and mango. The papaya and
> > mango are from the original set of plant models that come with VTP and
> > they display perfectly, none of the ones I created display at all.
> >
> > Do you have any advice? I have played around with the bioregions file and
> > set the papaya to display in a different region and one of the models
> > which wasn't working to display in the original papaya bioregion but still
> > not luck. This makes me think that there is something wrong with the
> > images.
> >
> > I would appreciate your feedback,
> >
> > Kind regards,
> >
> > Wil
>
Wil,
> Thanks for your reply!
> We made a separate species.xml file with the following content:
> So we are not adding plants one by one in Enviro using the 'Create plants'
> button, but rather trying to populate whole regions
Please just confirm that you have done the steps i indicated:
1. You have added your species (Acacia_melanoxylon, etc.) to the main
species.xml file.
2. You have put your plant png files into the 'PlantModels' folder, on any
data path.
3. When you launch Enviro's 'Plants' dialog, your species should appear on
the drop-down list (e.g. 'Blackwood')
Once that's known to be working, then you could try distributing plants with
a bioregion as well.
-Ben
Wil,
> I had never checked if i could add plants manually from the drop down list
> and just checking now they are not listed there...
That means either:
A. You didn't add your species to the species.xml that's being used, or
B. The plant images aren't found - you must not have put them in the right
place (in your PlantModels folder).
If you can't determine what isn't right, you could email me your debug.txt
file to help troubleshoot.
It may help, in Enviro, Startup dialog -> Global options -> uncheck "Show
only species with available appearances". If your plants still don't appear
in Enviro's plant dialog, then the problem is (A) above. If they do appear,
but the plants look plain white, then problem is (B) above.
> lastly i should say that i experimented by deleting the original path
which
> loads up in enviro terrain manager and only linked to the folder with my
> saved vt builder project.
Just FYI, a "VTBuilder project" is a list of layers, which generally isn't
the data that Enviro will visualize. I recommend to save your data (BT, VF,
etc.) into the regular folders on your data path, where Enviro will find it.
-Ben
Hi Ben,
Thanks for your replies. I think I will have to send you the debug.txt file but
i am not sure how to get this?
Wil
--- In vtp@yahoogroups.com, "Ben Discoe" <ben@...> wrote:
>
> Wil,
>
> > I had never checked if i could add plants manually from the drop down list
> > and just checking now they are not listed there...
>
> That means either:
> A. You didn't add your species to the species.xml that's being used, or
> B. The plant images aren't found - you must not have put them in the right
> place (in your PlantModels folder).
>
> If you can't determine what isn't right, you could email me your debug.txt
> file to help troubleshoot.
>
> It may help, in Enviro, Startup dialog -> Global options -> uncheck "Show
> only species with available appearances". If your plants still don't appear
> in Enviro's plant dialog, then the problem is (A) above. If they do appear,
> but the plants look plain white, then problem is (B) above.
>
> > lastly i should say that i experimented by deleting the original path
> which
> > loads up in enviro terrain manager and only linked to the folder with my
> > saved vt builder project.
>
> Just FYI, a "VTBuilder project" is a list of layers, which generally isn't
> the data that Enviro will visualize. I recommend to save your data (BT, VF,
> etc.) into the regular folders on your data path, where Enviro will find it.
>
> -Ben
>
Ok I followed your steps in the following way (unfortunately I have not done
this before as i was following a tutorial made by the lecturer for the
bioregions method of applying plant models):
1. I started a new project in vtbuilder.
2. I added an aerial image and a digital elevation model.
3. I clicked 'vegetation > species list' and added the entire species list which
had the new species we created, the code for which i included in a previous post
(and which I am hoping is correct).
4. I did not save the project or any layer and simply opened enviro and started
the vegetation dialog. The four new species were not there (i also clicked the
global option to display species without available appearances).
I hope I am not having this problem due to a simple user error, please forgive
me if I am. I appreciate your patience in clarifying these processes.
Kind regards,
Wil
--- In vtp@yahoogroups.com, "Ben Discoe" <ben@...> wrote:
>
> Wil,
>
> > Thanks for your reply!
> > We made a separate species.xml file with the following content:
> > So we are not adding plants one by one in Enviro using the 'Create plants'
> > button, but rather trying to populate whole regions
>
> Please just confirm that you have done the steps i indicated:
>
> 1. You have added your species (Acacia_melanoxylon, etc.) to the main
> species.xml file.
> 2. You have put your plant png files into the 'PlantModels' folder, on any
> data path.
> 3. When you launch Enviro's 'Plants' dialog, your species should appear on
> the drop-down list (e.g. 'Blackwood')
>
> Once that's known to be working, then you could try distributing plants with
> a bioregion as well.
>
> -Ben
>
Oh, and i forgot to say that I did add the new .png files to the plant models
folder.
:-)
Wil
--- In vtp@yahoogroups.com, "naivesceptic" <rednorth@...> wrote:
>
> Ok I followed your steps in the following way (unfortunately I have not done
this before as i was following a tutorial made by the lecturer for the
bioregions method of applying plant models):
>
> 1. I started a new project in vtbuilder.
> 2. I added an aerial image and a digital elevation model.
> 3. I clicked 'vegetation > species list' and added the entire species list
which had the new species we created, the code for which i included in a
previous post (and which I am hoping is correct).
> 4. I did not save the project or any layer and simply opened enviro and
started the vegetation dialog. The four new species were not there (i also
clicked the global option to display species without available appearances).
>
> I hope I am not having this problem due to a simple user error, please forgive
me if I am. I appreciate your patience in clarifying these processes.
>
> Kind regards,
>
> Wil
>
> --- In vtp@yahoogroups.com, "Ben Discoe" <ben@> wrote:
> >
> > Wil,
> >
> > > Thanks for your reply!
> > > We made a separate species.xml file with the following content:
> > > So we are not adding plants one by one in Enviro using the 'Create plants'
> > > button, but rather trying to populate whole regions
> >
> > Please just confirm that you have done the steps i indicated:
> >
> > 1. You have added your species (Acacia_melanoxylon, etc.) to the main
> > species.xml file.
> > 2. You have put your plant png files into the 'PlantModels' folder, on any
> > data path.
> > 3. When you launch Enviro's 'Plants' dialog, your species should appear on
> > the drop-down list (e.g. 'Blackwood')
> >
> > Once that's known to be working, then you could try distributing plants with
> > a bioregion as well.
> >
> > -Ben
> >
>
> ----------
> From: naivesceptic
>
> think I will have to send you the debug.txt file
> but i am not sure how to get this?
You'll find it in the same folder as the app, after it runs.
> Ok I followed your steps in the following way
>
> 1. I started a new project in vtbuilder.
> 2. I added an aerial image and a digital elevation model.
> 3. I clicked 'vegetation > species list' and added the entire species list
Those aren't the steps i suggested. You don't need to run VTBuilder at all.
To add plants and confirm they are working, all you need is to add them to
your data path, then run Enviro.
There are the steps again, summarized:
1. Add the new .png files to the plant models folder.
2. Add your species to the species.xml in your plant data folder.
3. Run Enviro.
4. Open the Plant Dialog and look for your plant in the list.
5. If it's there, try putting your plant on the terrain.
To troubleshoot, enable the Enviro global option as previously described,
and describe the results.
I suspect you are doing something else - perhaps you have more than one
species.xml, or some other file you are editing instead of the one in
Data/PlantData.
-Ben
Ben,
we 'solved' the problem.
these are university computers and unfortunately we are not allowed access
to the program folder. therefore we cannot put the new .png files in the
plant model folder of the program, or update the species list. we thought
it was enough to have our own model folder and species list on our usb
drive and refer to them with a new path in enviro, but this did not work.
we verified this in two ways. firstly by deleting the original path which
loads in enviro (whilst still having the path to the project on the usb
drive), which made a visualisation of the instances of the vegetation (in
white blocks) without the .png textures appended to them. the other way
this was verified was by deleting the plant models folder from the usb
drive and loading enviro. the plant models were still displayed, despite a
path to the project folder on the usb having been created in enviro.
We attempted to get around this by changing the parameters of the original
path in enviro which presumably refers to the folders on the computer hard
drive but there was no option for specifying a particular model folder to
use, such as the one on the usb.
Hence we are happy because we understand the problem and can submit the
assignment with this explanation of the fault, which is only caused by
access restrictions. We also can't get the debug.txt due to not being able
to access the program folder.
Wil
>> ----------
>> From: naivesceptic
>>
>> think I will have to send you the debug.txt file
>> but i am not sure how to get this?
>
> You'll find it in the same folder as the app, after it runs.
>
>> Ok I followed your steps in the following way
>>
>> 1. I started a new project in vtbuilder.
>> 2. I added an aerial image and a digital elevation model.
>> 3. I clicked 'vegetation > species list' and added the entire species
>> list
>
> Those aren't the steps i suggested. You don't need to run VTBuilder at
> all.
> To add plants and confirm they are working, all you need is to add them to
> your data path, then run Enviro.
>
> There are the steps again, summarized:
>
> 1. Add the new .png files to the plant models folder.
> 2. Add your species to the species.xml in your plant data folder.
> 3. Run Enviro.
> 4. Open the Plant Dialog and look for your plant in the list.
> 5. If it's there, try putting your plant on the terrain.
>
> To troubleshoot, enable the Enviro global option as previously described,
> and describe the results.
>
> I suspect you are doing something else - perhaps you have more than one
> species.xml, or some other file you are editing instead of the one in
> Data/PlantData.
>
> -Ben
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
Wil,
> we 'solved' the problem.
> these are university computers and unfortunately we are not allowed access
> to the program folder.
That is amazing. I have heard of such a limitation in some installations of
Vista. It is for that reason, the VTP installation instructions recommend that
you either (A) avoid Vista or if not possible, (B) install to another folder
like C:\VTP instead of C:\Program Files\VTP.
Are you on Vista? I suppose it could be some other administrative restriction,
even on XP.
> We attempted to get around this by changing the parameters of the original
> path in enviro which presumably refers to the folders on the computer hard
> drive
That should work: you could copy C:/Program Files/VTP/Data to another place
(your USB drive), then change your data path to point to it.
> but there was no option for specifying a particular model folder to
> use, such as the one on the usb.
The option is there, it is in the Terrain Manager, where you can remove the
standard data path and add your own. (Unless your OS is preventing you from
writing anything to your hard drive at all!)
> We also can't get the debug.txt due to not being able
> to access the program folder.
That is sad to hear. I can imagine some situation in which you are preventing
from Writing to the program folder, but not even being able to Read it is
baffling.
I'm very happy to hear that you got it to work in the end.
-Ben
yeah i knew it wouldn't be too complicated, it was just the good old access
restrictions at uni, coming back to bite us in the worst way possible! i
said 'solved' as we knew how to fix it but couldn't as we only had the uni
computers to use not our vtp on our own computers... if there'd been more
time we would have done that but the assignment was due yesterday.
it wasn't vista, just xp.
basically the problem seemed to be that they wouldn't allow us to write
anything to the hdd at all...
anyway, it was nice to understand what was happening, was feeling like a
bumbling buffoon for a while there!
wil
2009/10/26 Ben Discoe <ben@...>
>
>
> Wil,
>
>
> > we 'solved' the problem.
> > these are university computers and unfortunately we are not allowed
> access
> > to the program folder.
>
> That is amazing. I have heard of such a limitation in some installations of
> Vista. It is for that reason, the VTP installation instructions recommend
> that you either (A) avoid Vista or if not possible, (B) install to another
> folder like C:\VTP instead of C:\Program Files\VTP.
>
> Are you on Vista? I suppose it could be some other administrative
> restriction, even on XP.
>
>
> > We attempted to get around this by changing the parameters of the
> original
> > path in enviro which presumably refers to the folders on the computer
> hard
> > drive
>
> That should work: you could copy C:/Program Files/VTP/Data to another place
> (your USB drive), then change your data path to point to it.
>
>
> > but there was no option for specifying a particular model folder to
> > use, such as the one on the usb.
>
> The option is there, it is in the Terrain Manager, where you can remove the
> standard data path and add your own. (Unless your OS is preventing you from
> writing anything to your hard drive at all!)
>
>
> > We also can't get the debug.txt due to not being able
> > to access the program folder.
>
> That is sad to hear. I can imagine some situation in which you are
> preventing from Writing to the program folder, but not even being able to
> Read it is baffling.
>
> I'm very happy to hear that you got it to work in the end.
>
> -Ben
>
>
>
[Non-text portions of this message have been removed]
If you can hand edit your VTP path file then put the path with your
species file first in the list. VTP uses the first species file etc. it
encounters on the paths.
Roger
red north wrote:
> yeah i knew it wouldn't be too complicated, it was just the good old access
> restrictions at uni, coming back to bite us in the worst way possible! i
> said 'solved' as we knew how to fix it but couldn't as we only had the uni
> computers to use not our vtp on our own computers... if there'd been more
> time we would have done that but the assignment was due yesterday.
>
> it wasn't vista, just xp.
>
> basically the problem seemed to be that they wouldn't allow us to write
> anything to the hdd at all...
>
> anyway, it was nice to understand what was happening, was feeling like a
> bumbling buffoon for a while there!
>
> wil
>
> 2009/10/26 Ben Discoe <ben@...>
>
>
>> Wil,
>>
>>
>>
>>> we 'solved' the problem.
>>> these are university computers and unfortunately we are not allowed
>>>
>> access
>>
>>> to the program folder.
>>>
>> That is amazing. I have heard of such a limitation in some installations of
>> Vista. It is for that reason, the VTP installation instructions recommend
>> that you either (A) avoid Vista or if not possible, (B) install to another
>> folder like C:\VTP instead of C:\Program Files\VTP.
>>
>> Are you on Vista? I suppose it could be some other administrative
>> restriction, even on XP.
>>
>>
>>
>>> We attempted to get around this by changing the parameters of the
>>>
>> original
>>
>>> path in enviro which presumably refers to the folders on the computer
>>>
>> hard
>>
>>> drive
>>>
>> That should work: you could copy C:/Program Files/VTP/Data to another place
>> (your USB drive), then change your data path to point to it.
>>
>>
>>
>>> but there was no option for specifying a particular model folder to
>>> use, such as the one on the usb.
>>>
>> The option is there, it is in the Terrain Manager, where you can remove the
>> standard data path and add your own. (Unless your OS is preventing you from
>> writing anything to your hard drive at all!)
>>
>>
>>
>>> We also can't get the debug.txt due to not being able
>>> to access the program folder.
>>>
>> That is sad to hear. I can imagine some situation in which you are
>> preventing from Writing to the program folder, but not even being able to
>> Read it is baffling.
>>
>> I'm very happy to hear that you got it to work in the end.
>>
>> -Ben
>>
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>
i wonder if there's a problem with the program as when i deleted the
original path to the program folder where the original species list/models
were, and only had a path to my list/models on my usb, it did not display
any plant textures, only white blocks.
wil
> If you can hand edit your VTP path file then put the path with your
> species file first in the list. VTP uses the first species file etc. it
> encounters on the paths.
>
> Roger
>
> red north wrote:
>> yeah i knew it wouldn't be too complicated, it was just the good old
>> access
>> restrictions at uni, coming back to bite us in the worst way possible! i
>> said 'solved' as we knew how to fix it but couldn't as we only had the
>> uni
>> computers to use not our vtp on our own computers... if there'd been
>> more
>> time we would have done that but the assignment was due yesterday.
>>
>> it wasn't vista, just xp.
>>
>> basically the problem seemed to be that they wouldn't allow us to write
>> anything to the hdd at all...
>>
>> anyway, it was nice to understand what was happening, was feeling like a
>> bumbling buffoon for a while there!
>>
>> wil
>>
>> 2009/10/26 Ben Discoe <ben@...>
>>
>>
>>> Wil,
>>>
>>>
>>>
>>>> we 'solved' the problem.
>>>> these are university computers and unfortunately we are not allowed
>>>>
>>> access
>>>
>>>> to the program folder.
>>>>
>>> That is amazing. I have heard of such a limitation in some
>>> installations of
>>> Vista. It is for that reason, the VTP installation instructions
>>> recommend
>>> that you either (A) avoid Vista or if not possible, (B) install to
>>> another
>>> folder like C:\VTP instead of C:\Program Files\VTP.
>>>
>>> Are you on Vista? I suppose it could be some other administrative
>>> restriction, even on XP.
>>>
>>>
>>>
>>>> We attempted to get around this by changing the parameters of the
>>>>
>>> original
>>>
>>>> path in enviro which presumably refers to the folders on the computer
>>>>
>>> hard
>>>
>>>> drive
>>>>
>>> That should work: you could copy C:/Program Files/VTP/Data to another
>>> place
>>> (your USB drive), then change your data path to point to it.
>>>
>>>
>>>
>>>> but there was no option for specifying a particular model folder to
>>>> use, such as the one on the usb.
>>>>
>>> The option is there, it is in the Terrain Manager, where you can remove
>>> the
>>> standard data path and add your own. (Unless your OS is preventing you
>>> from
>>> writing anything to your hard drive at all!)
>>>
>>>
>>>
>>>> We also can't get the debug.txt due to not being able
>>>> to access the program folder.
>>>>
>>> That is sad to hear. I can imagine some situation in which you are
>>> preventing from Writing to the program folder, but not even being able
>>> to
>>> Read it is baffling.
>>>
>>> I'm very happy to hear that you got it to work in the end.
>>>
>>> -Ben
>>>
>>>
>>>
>>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> ------------------------------------
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>
>
Is there a way to have Enviro pre-load all objects and textures to avoid
stuttering as I fly around for the first few minutes? When I'm doing demo's I
have to make sure I fly around the entire scene ahead of time to ensure all
objects, textures etc. are loaded. I'd like to avoid having to do this, even if
it means longer start times.
Any thoughts? I've spent a bunch of time looking through the code and have a
feeling I've probably missed something simple. I've thought of perhaps starting
with the LOD distances set really high and then dropping them back to their
proper settings once things get going but I wonder if there's a simpler
approach.
Cheers,
Drew.
Drew,
The default behavior of Enviro is to pre-load everything (roads, trees,
structures, textures) into RAM. You don't get delayed loading into RAM
unless you enable it, e.g. with the Structure Paging. Do you have that
enabled? Are you using a tileset or single base texture?
What kind of stuttering are you seeing - what length of time is the stutter?
Depending on your computer and 3D card, there should be a /very/ short pause
the first time an object is rendered, with a display list being cached on
the CPU and the geometry being sent down to the GPU. On most modern
machines and recent 3D cards, this should be negligable, the experience
should be smooth. What's your CPU/GPU?
-Ben
> -----Original Message-----
> From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of
> drew_stainton
> Sent: Wednesday, November 18, 2009 7:56 AM
> To: vtp@yahoogroups.com
> Subject: [vtp] Loading all objects...
>
> Is there a way to have Enviro pre-load all objects and textures to avoid
> stuttering as I fly around for the first few minutes? When I'm doing
demo's
> I have to make sure I fly around the entire scene ahead of time to ensure
all
> objects, textures etc. are loaded. I'd like to avoid having to do this,
even
> if it means longer start times.
>
> Any thoughts? I've spent a bunch of time looking through the code and
have a
> feeling I've probably missed something simple. I've thought of perhaps
> starting with the LOD distances set really high and then dropping them
back
> to their proper settings once things get going but I wonder if there's a
> simpler approach.
>
> Cheers,
> Drew.
Ben,
Thanks for your help.
I don't have structure paging turned on.
I have a single TIN. Texturing has been modified - the triangles are coded
to use a variety of textures, including georeferenced ones. I don't believe
that's the problem, however, because the same stuttering occurred before I
made those changes.
CPU is Intel Core 2 Quad Q6600 @ 2.40 GHz, 4 Gig RAM & GPU is Nvidia 8800GTX
with 768 MB RAM.
I've tried turning removing all culture layers, stuttering still happens.
I'm now looking into the textures themselves. Is it possible that, perhaps
in OSG itself, there's a delayed texture loader/scaler at work?
Cheers,
Drew.
> -----Original Message-----
> From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On
> Behalf Of Ben Discoe
> Sent: November 18, 2009 2:37 PM
> To: vtp@yahoogroups.com
> Subject: RE: [vtp] Loading all objects...
>
>
> Drew,
>
> The default behavior of Enviro is to pre-load everything
> (roads, trees, structures, textures) into RAM. You don't get
> delayed loading into RAM unless you enable it, e.g. with the
> Structure Paging. Do you have that enabled? Are you using a
> tileset or single base texture?
>
> What kind of stuttering are you seeing - what length of time
> is the stutter? Depending on your computer and 3D card, there
> should be a /very/ short pause the first time an object is
> rendered, with a display list being cached on the CPU and the
> geometry being sent down to the GPU. On most modern machines
> and recent 3D cards, this should be negligable, the
> experience should be smooth. What's your CPU/GPU?
>
> -Ben
>
> > -----Original Message-----
> > From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of
> > drew_stainton
> > Sent: Wednesday, November 18, 2009 7:56 AM
> > To: vtp@yahoogroups.com
> > Subject: [vtp] Loading all objects...
> >
> > Is there a way to have Enviro pre-load all objects and textures to
> > avoid stuttering as I fly around for the first few minutes?
> When I'm
> > doing
> demo's
> > I have to make sure I fly around the entire scene ahead of time to
> > ensure
> all
> > objects, textures etc. are loaded. I'd like to avoid having to do
> > this,
> even
> > if it means longer start times.
> >
> > Any thoughts? I've spent a bunch of time looking through
> the code and
> have a
> > feeling I've probably missed something simple. I've thought of
> > perhaps starting with the LOD distances set really high and then
> > dropping them
> back
> > to their proper settings once things get going but I wonder
> if there's
> > a simpler approach.
> >
> > Cheers,
> > Drew.
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
> -----
> From: Drew Stainton
> Sent: Wednesday, November 18, 2009 1:10 PM
>
> I have a single TIN. Texturing has been modified - the triangles are
coded
> to use a variety of textures, including georeferenced ones.
If you mean you've actually modified the vtTin3d code (rather than using
surface types and vtTin3d::SetTextureMaterials) then i'm afraid it's a bit
more difficult to help..
> I don't believe that's the problem, however, because the same stuttering
> occurred before I made those changes.
If you have a replicable case with the standard code, you could send example
data to try.
> Core 2 Quad, Nvidia 8800GTX
Definitely not your system, then - there should be no discernable pause with
such a system.
> I'm now looking into the textures themselves. Is it possible that,
perhaps
> in OSG itself, there's a delayed texture loader/scaler at work?
One possible cause is that your textures are very large or not power of 2.
OSG's default behavior with non-power-of-2 is to resize them to power-of-2
on the fly, which can give a discernable pause on the CPU side.
-Ben
> One possible cause is that your textures are very large or not power
> of 2.
> OSG's default behavior with non-power-of-2 is to resize them to
> power-of-2
> on the fly, which can give a discernable pause on the CPU side.
Mipmapping and S3TC compression will also lead to a stutter if
enabled. It is best to precompress and pre-mipmap the textures in
Windows DDS format.
Stefan
Ben,
I have modified the vtTin3d code however it still uses surface types and
SetTextureMaterials - just adds code to load the TIN directly from dxf and
uses the layer names to know which textures to apply.
I believe the textures are power of 2 however I'll re-check them all to make
sure (there are quite a few). Some are large (vary between 512 x 512 to 4k
x 4k) so that could be part of the problem.
Thanks for your help - that gives me a direction to concentrate on.
Cheers,
Drew.
> -----Original Message-----
> From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On
> Behalf Of Ben Discoe
> Sent: November 18, 2009 10:52 PM
> To: vtp@yahoogroups.com
> Subject: RE: [vtp] Loading all objects...
>
>
> > -----
> > From: Drew Stainton
> > Sent: Wednesday, November 18, 2009 1:10 PM
> >
> > I have a single TIN. Texturing has been modified - the
> triangles are
> coded
> > to use a variety of textures, including georeferenced ones.
>
> If you mean you've actually modified the vtTin3d code (rather
> than using surface types and vtTin3d::SetTextureMaterials)
> then i'm afraid it's a bit more difficult to help..
>
> > I don't believe that's the problem, however, because the same
> > stuttering occurred before I made those changes.
>
> If you have a replicable case with the standard code, you
> could send example data to try.
>
> > Core 2 Quad, Nvidia 8800GTX
>
> Definitely not your system, then - there should be no
> discernable pause with such a system.
>
> > I'm now looking into the textures themselves. Is it possible that,
> perhaps
> > in OSG itself, there's a delayed texture loader/scaler at work?
>
> One possible cause is that your textures are very large or
> not power of 2. OSG's default behavior with non-power-of-2 is
> to resize them to power-of-2 on the fly, which can give a
> discernable pause on the CPU side.
>
> -Ben
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
Stefan,
Hmm, I hadn't thought of doing that. I see NVidia has their texture tools
online so I'll grab those and give it a try.
Thanks for your help!
Cheers,
Drew.
-----Original Message-----
From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of Stefan
Roettger
Sent: November 19, 2009 4:08 AM
To: vtp@yahoogroups.com
Subject: Re: [vtp] Loading all objects...
> One possible cause is that your textures are very large or not power
> of 2.
> OSG's default behavior with non-power-of-2 is to resize them to
> power-of-2
> on the fly, which can give a discernable pause on the CPU side.
Mipmapping and S3TC compression will also lead to a stutter if
enabled. It is best to precompress and pre-mipmap the textures in
Windows DDS format.
Stefan
[Non-text portions of this message have been removed]
drew_stainton wrote:
> Is there a way to have Enviro pre-load all objects and textures to avoid
stuttering as I fly around for the first few minutes? When I'm doing demo's I
have to make sure I fly around the entire scene ahead of time to ensure all
objects, textures etc. are loaded. I'd like to avoid having to do this, even if
it means longer start times.
>
> Any thoughts? I've spent a bunch of time looking through the code and have a
feeling I've probably missed something simple. I've thought of perhaps starting
with the LOD distances set really high and then dropping them back to their
proper settings once things get going but I wonder if there's a simpler
approach.
>
> Cheers,
> Drew.
>
>
Are you using the four by four texture option. If so you can get them to
load in by just doing a 360 on the spot. If that cures the problem then
you could try switching to a single large texture if your card will
handle it.
Roger
Roger,
Unfortunately in this case, I'm using a TIN and the area in question is
about 50 square kilometres, so I use a single 4k texture and a bunch of 2k
detail textures along the area of interest (I modified the code to handle
this and other texturing options).
Thanks for the tip, though - that could help with other projects.
Cheers,
Drew.
-----Original Message-----
From: vtp@yahoogroups.com [mailto:vtp@yahoogroups.com] On Behalf Of Roger
James
Sent: November 19, 2009 11:48 AM
To: vtp@yahoogroups.com
Subject: Re: [vtp] Loading all objects...
drew_stainton wrote:
> Is there a way to have Enviro pre-load all objects and textures to avoid
stuttering as I fly around for the first few minutes? When I'm doing demo's
I have to make sure I fly around the entire scene ahead of time to ensure
all objects, textures etc. are loaded. I'd like to avoid having to do this,
even if it means longer start times.
>
> Any thoughts? I've spent a bunch of time looking through the code and have
a feeling I've probably missed something simple. I've thought of perhaps
starting with the LOD distances set really high and then dropping them back
to their proper settings once things get going but I wonder if there's a
simpler approach.
>
> Cheers,
> Drew.
>
>
Are you using the four by four texture option. If so you can get them to
load in by just doing a 360 on the spot. If that cures the problem then
you could try switching to a single large texture if your card will
handle it.
Roger
[Non-text portions of this message have been removed]