Game Development Community

Is it possible in TGE

by Marcin Zygmunt · in Torque Game Engine · 03/24/2005 (3:22 am) · 8 replies

Can we play with geometrical objects in runtime? Is it possible to create a simple box and scale it? Do we have access to a texture coordinates of vertices in chosen mesh? I plan a quite interesting system but it won't be possible without modifying and adding objects.
EDIT: These objects are in .dif format

#1
03/24/2005 (4:31 am)
I think the main problem is lighting objects. Static objects get lit and cached on your program startup. There is rendering done every frame however, you could do some lighting calculations there... Probably wouldn't want to do them all in one frame (performance issues).... but you could do it in chuncks over 5 frames or whatever. It would take some changes to the engine... but it shouldn't be too too difficult. This is just my opinion thouhg.
#2
03/24/2005 (7:48 am)
And what about texture coordinates? Can I modify them during runtime?
#3
03/24/2005 (11:19 am)
Dif's don't store uvs. It stores planar texgens that are somewhat...interesting...to edit.
#4
03/24/2005 (11:56 am)
Do you know where can I read something more about this?
#5
03/24/2005 (12:47 pm)
Question: do your objects *need* to be .difs? If you want to manipulate theyr geometry, it's better to go with DTS shapes.

If all you want is a box, code your own object class deriving from shapebase and create the box directly via code.
#6
03/24/2005 (1:03 pm)
This gives a basic description of how the planar texturing is stored for brush-based models. If you refer to the map2dif code you can see how these are transformed into the texgens in the dif rendering.
#7
03/24/2005 (11:18 pm)
I want to build some interiors from these boxes; DTS shapes aren't good for that. There may be problem with collision response.

EDIT: Any suggestions?
#8
04/02/2005 (1:59 pm)
If you want to do interesting procedural manipulation of geometry, why not write your own object type rather than abusing existing things?