Game Development Community

Show all 3d models in wireframe possible in torque?

by Highlander · in General Discussion · 11/29/2005 (12:20 am) · 25 replies

Hello,

I have been looking around for this answer but cannot find it. Is it possible to set Torque to render game scenes in wireframe mode?

Thanks,
-Mike
Page «Previous 1 2
#1
11/29/2005 (12:35 am)
Umm... I think theres a debug rendering mode that does this. It should be a small piece of code somewhere that has this.
#2
11/29/2005 (2:03 am)
Yeah you just have to press F9.
#3
11/29/2005 (4:38 am)
Hi lander,

Yes you can also do this in a typical release build by using the following console command . . .

glenableoutline(true);

It's a quick and easy way to examine the meshes of your objects.


However, if you need to switch in and out of wireframe view fairly often, then you might want to bind the commands as part of one of your .CS files.

Here's what I do . . .

moveMap.bindCmd(keyboard, "n", "glenableoutline(true);", "");
moveMap.bindCmd(keyboard, "b", "glenableoutline(false);", "");

If you do this, you might want to keep your 'on' and 'off' bind keys fairly close to each other. :)

I hope that helps,

Aaron E.
#4
11/29/2005 (9:56 am)
Hello Aaron,

I pressed ~ and a console appeared in the FPS demo. I then typed glenableoutline(true); and got
(0): Unable to find function GLEnableOutline

I'm using the engine and fps demo that was included on the Finney book cd. Can anyone get this to work on the licensed engine?

Thanks,
Mike
#5
11/29/2005 (10:10 am)
This method does work in the 1.3 release and the 1.4 release.
#6
11/29/2005 (10:52 am)
The version that comes with Finney's book is 1.2.
#7
11/29/2005 (11:16 am)
Hmm. Interesting. Yes it looks like that command won't work with book version. But that's ok. An easy solution, if you've got the Torque 1.3 demo lying around somewhere is to copy the DEMO.EXE file and then paste it into your Torque book directory. Then you can rename it to TGE.EXE. Using this approach, all of Ken's examples should still work and you will be able to use the glenableoutline command.

If you don't have the 1.3 demo already installed, then I'm sure someone around here can send you the EXE file.

I hope that helps
#8
11/29/2005 (12:35 pm)
Where can I get the torque 1.3 demo as its not lying around :) And, how can you tell what version you have?

Thanks,
Mike
#9
11/29/2005 (12:48 pm)
You can download demo of TGE 1.4 right from this site.

demos.garagegames.com/tge/TorqueDemo-Installer-1-4.exe
#10
11/29/2005 (1:05 pm)
Highlander,

The 1.4 demo is very cool (for a lot of reasons) and I highly recommend exploring it. Unfortunately, it won't work well with the book examples "as is". Currently, directory structure issues between the two versions will cause some minor headaches. The easiest way to get the most out of the book examples is to use an older 1.3 execuable. If you want, you can download it from my personal site at www.aaronellis.net/tge.zip. Then just unzip the file and place it in your book folder (overwriting Ken's version). I think this will solve a few lighting problems as well. Once you've downloaded it, I'll pull it off the site and edit this post. :)

If you have any problems, just let me know.

Aaron E.
#11
11/29/2005 (1:15 pm)
Oops. I forgot to answer that last question.

The best way to find out your current running version of Torque is to pop open the console and type . . .

echo(getversionstring());

For more info, you can find it on page 694 in Ken's book. That whole section (Appendix A) is a great place to learn cool stuff.

Anyway, using that command should tell you what you need to know -- and it should appear in the console text log.
#12
11/29/2005 (1:40 pm)
Highlander, this works only if you run debug build version of TGE. And, btw, TSE does not support it, as shaders runs in DX mode only
#13
11/29/2005 (4:05 pm)
@bank

Yes, F9 outlines only work in debug builds of TGE. However glenableoutline (described above) does almost the same thing and works perfectly for debug and release builds. My own 'release' stuff currently allows it. And I just tried it for the Warzone demo, Leave No Survivors and the TST Pro a few minutes ago -- glenableoutline still works ok in all of those. All of them are considered 'release' builds.

However, a company could easily kill glenableoutline functionality in their release version if they wanted to. In my opinion, most multiplayer games probably should remove it. Think Tanks does that and probably several others. It's a great tool for developers testing out their release builds, but it's too tempting for gamers.

And yes, TSE operates differently and the command won't work in it.

I hope that clears things up a bit.

Aaron E.


[Edit: one thinko]
#14
11/29/2005 (4:29 pm)
I got the zip if you want to take it down now Aaron, thanks!

-Mike
#15
11/29/2005 (7:21 pm)
OK next question- how do you make the wireframe opaque? I want to see the edges of the triangles but i dont want to see through them...

-Mike
#16
11/29/2005 (7:25 pm)
Another strange thing I should mention- the FPS demo's text on all screens (menu, in the chat box, the clock) gets corrupted when I glenableoutline and it look like they're in klingon or something. Anyone else see this with the 1.3 engine?
#17
11/29/2005 (8:27 pm)
I notice that as well.
#18
11/30/2005 (5:28 am)
Hi guys,

Ah. You've found the two primary limitations of the glenableoutline command; garbled text and visible lines. For those reasons, the command isn't a perfect solution for every need. However, a variety of rendering modes are possible . . . with some engine rewriting/coding. David Wyand has added several new mesh rendering options into the engine for his TST Pro software. If you don't have the full or trial versions of it, I highly recommend giving it a try. If nothing else, it will at least give you a good idea of what's possible with a modified Torque engine. But if you're serious about Torque development, then the TST Pro is definitely worth buying.

With that in mind, however, getting different rendering features into your own project will require an engine license and some hacking. For me, the glenableoutline command does all I need it to do while I'm positioning world objects in a level/mission. Whenever I need to carefully examine an individual model, I open up TST Pro for the .DTS or gameSpace for the original.

I hope that helps,

Aaron E.
#19
11/30/2005 (5:51 am)
If you are using a debug build (which you apparently aren't :)) you can use interior rendor modes:

holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/editing/interiorRender.shtml

Is there any way for non SDK owners to get a debug build to play around with?
#20
11/30/2005 (6:28 am)
Sure just buy the SDK ;)
Page «Previous 1 2