Game Development Community

Beta Bug with Foliage Replicator

by Kira · in Torque 3D Professional · 05/02/2009 (11:51 pm) · 20 replies

Please excuse me if this has been reported however I couldn't find if anyone has...I'm also quite confused about this. I'm trying to add my own dds grass but I'm unable to find fxfoliage replicator. In the demos there is fxfoliage replicator and I'm able to change textures and how many instances. However when I try and add my own there is no such fxfoliage replicator. Has this been replaced by ground cover option which also doesn't seem to work. There is no flashing border to say where it is and when you use camera to selection to go to the ground cover that you put in there's nothing there. There are no error messages.

#1
05/03/2009 (12:57 am)
fxFoliageReplicator does appear to be missing from the editor. The engine still implements / supports it and most of the needed code for the editor is there except for one line.

In tools\missionEditor\scripts\editors\creator.ed.cs locate
function EWCreatorWindow::init( %this )
{  
   %this.array = new ArrayObject();   
   %this.setListView( true );
   
   %this.beginGroup( "Environment" );

and inside of there add:
%this.registerMissionObject( "fxFoliageReplicator" );

This will add fxFoliageReplicator back to the editor.

When you're done function EWCreatorWindow::init( %this )
should look like

function EWCreatorWindow::init( %this )
{  
   %this.array = new ArrayObject();   
   %this.setListView( true );
   
   %this.beginGroup( "Environment" );
   
      %this.registerMissionObject( "SkyBox" );
      %this.registerMissionObject( "CloudLayer" );
      %this.registerMissionObject( "Sun" );
      %this.registerMissionObject( "Lightning" );
      %this.registerMissionObject( "WaterBlock" );
      %this.registerMissionObject( "SFXEmitter" );
      %this.registerMissionObject( "Precipitation" );
      %this.registerMissionObject( "ParticleEmitterNode" );
      %this.registerMissionObject( "fxSunLight" );
      %this.registerMissionObject( "fxFoliageReplicator" );
      %this.registerMissionObject( "fxShapeReplicator" );
      %this.registerMissionObject( "Light" );
      %this.registerMissionObject( "VolumeLight" );
      %this.registerMissionObject( "GroundCover" );
      %this.registerMissionObject( "TerrainBlock" );
      %this.registerMissionObject( "GroundPlane" );
      %this.registerMissionObject( "WaterPlane" );
      
   %this.endGroup();

   %this.beginGroup( "Level" );
   
      %this.registerMissionObject( "MissionArea" );
      %this.registerMissionObject( "Path" );
      %this.registerMissionObject( "PathMarker" );
      %this.registerMissionObject( "Trigger" );
      %this.registerMissionObject( "PhysicalZone" );
      %this.registerMissionObject( "Camera" );
      %this.registerMissionObject( "LevelInfo" );
      
   %this.endGroup();
   
   %this.beginGroup( "System" );
   
      %this.registerMissionObject( "SimGroup" );
      
   %this.endGroup();  
}
#2
05/03/2009 (3:29 am)
You're a star Matt!! Thanks HEAPS!
#3
05/03/2009 (4:02 am)
Thanks a lot Matt !

Cheers
#4
05/03/2009 (5:40 am)
Yay
#5
05/03/2009 (5:20 pm)
Is there a trick to getting the foliage to display? Sometimes I can, sometimes I can't.
#6
05/03/2009 (5:26 pm)
We have found it only works with .DDS textures
Thats just a first obsevation ,have not gone into the source yet
#7
05/03/2009 (6:13 pm)
oh ok.. I guess it's intermittent with pngs?
#8
05/03/2009 (6:46 pm)
We had no luck with png files at all....the only files that worked for us were dds...
#9
05/03/2009 (7:14 pm)
I can show you a movie where I have some of the included PNGs from TallGrass.png or whatever it's called. It has worked twice in a row now.

I have no idea if twice in a row constitutes "working" though.
#10
05/04/2009 (1:31 am)
I didn't have any problems getting it working.
Just ensure that the radius is large enough, at 55 x and y outer it refused to work for me for example so I made it larger and it worked.

What thought does not work is the debug info for anything, be it cells or radius of impact.
#11
05/04/2009 (3:32 pm)
Logged for further investigation.
#12
07/15/2009 (1:37 pm)
Related to this, and in BETA 3, the PNGs seem to only function with powers of 2. So it might be worth checking to see if that fixes the issues your having Richard.
#13
07/15/2009 (2:50 pm)
@ Lino thanks
But we always use power of 2 regardless , its just good practice this post is quite old and is no longer an issue for us
We have had .DDS in the replicator no problems for since a least when beta 3 came out
#14
01/13/2010 (1:29 pm)
FoliageReplicator won't produce anything for me if OuterRadiusX/Y is set to < 75. Anything >= 75 and it works perfectly with both .png and .dds files.

Hope this helps someone.

Cheers,
Ken
#15
01/20/2010 (7:19 pm)
Heads up to people that might appreciate forward notice... fxFoliageReplicator and fxShapeReplicator will likely be removed from the codebase in the next release.
#16
01/20/2010 (9:56 pm)
Been away from torque for a while so I'm not up to speed. Is it being replaced by something?

Maybe a foliage painting tool a la UDK ? =D
#17
01/20/2010 (10:51 pm)
I guess that GroundCover and ForestEditor have superceded fxReplicators.

Can't say I'm too upset to see them go, the amount of issues fxShapeReplicator threw up with phantom collisions - grrrrr. Something which I've noticed doesn't happen in the Alpha with ForestEd - huzzar!.
#18
01/21/2010 (9:13 am)
Sounds great.

BTW not to compare Engines, but I've been playing around with that other one and it has a system of volumes where you can define effects or load in or out of the game etc...

That would be a nice thing to put in the suggestion box. Also, while I'm here for a bit, I haven't tried importing a Collada file in a while to Torque but if it still auto assumes triangle strips due to legacy DTS I'd like to throw getting rid of that assumption in as well.

This post is intended to be constructive (some times I have to be explicit about that).

Edit - Oh and perhaps a series of video tutorials for the major parts of the engine like... adding characters, data-block editing, vehicles, particle effects etc. Or if that's too time consuming for the size of the company, maybe provide some fully featured sample assets.

I literally just woke up so this post might not make sense.

#19
01/21/2010 (12:21 pm)
Joshua... you mean triggers? You can easily setup triggers to do stuff like make it rain or load a different level, and that has been around forever.

And the triangle strips are long gone. The Collada loader generates indexed geometry only. The strip code might still be there to support loading legacy dts files, but I'm not sure.
#20
01/21/2010 (12:47 pm)
@Manoel

Not Triggers, Volumes (e.g PostProcessEffectVolume)

One application would be the elimination of the River/Water volume specialization that exists in the engine. Instead, you'd have a volume where you can define your own properties such as fogging, physical drag, gravity (for boyancy) etc.

The way volumes work is much more orthogonal and is a personal preference.

I may have gotten the name slightly wrong but I don't feel like firing up the engine to do get it right.

That's good to know about triangle strips. I mentioned it because I had a Torque3D thread about 6 months ago with a bug where it was determined the Collada importer assumed strips. I haven't been reading updates lately.

Thanks.