SDK Question Moving UVs on a mesh group (or any better idea)

Moach

Crazy dude with a rocket
Addon Developer
Joined
Aug 6, 2008
Messages
1,581
Reaction score
62
Points
63
Location
Vancouver, BC
ok, i'll try to keep this short... it's for the G42-200 eicas panels on the VC...

if you're familiar with this craft, you might have noticed that around the 6 eicas screens (the not-MFD panels), there are a set of 12 little push buttons

those are the eicas mode seletors - they're meant to switch the displayed "pages" on their respective screens


anyways... in order to keep things at some degree of sanity, i figured i'd draw the base texture for all the eicas screens in a single 12-grid image (which can be found in the texture folder, in case you're curious)

and then i could just have the 3d panels "map in" to a certain area of that image, showing whats pre-drawn there as well as what's getting painted by the displays code....

this minimizes the coding effort - at least as far as the drawing logic goes.... if i can have any of the 6 screens simply "tune in" to a fixed area, i can avoid having to do anything more than once (and if no panels are set to a specific area, it can be skipped on redraw)



but then i've been going over and over the docs, and have found little to no information on how on earth i can pull this one off...

it also appears the "old way" of doing stuff like this by manually setting the vertex arrays has been deprecated and is incompatible with NG clients (big no-go for me)


so, then i thought of cloning the panel meshes in 3dsMax - then remapping their UVs so each shows a specific "page" .... but when you add things together, twelve pages, times 6 screens - and good lord, we have 72 models to do :facepalm:

this wouldn't be such a big deal, if at least i could set the visibility of individual meshgroups (rather than full meshes)


so that makes me a bit stumped, i guess... how can i have those displays "change pages" as they should without resorting to a "brute force" workaround?

:cheers:
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,921
Reaction score
221
Points
138
Location
Cape
This sounds like a job for Super Urwumpe.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,668
Reaction score
796
Points
128
It should be possible to use oapiEditMeshGroup() function to change UVs of a meshgroup. There is also a DEVMESHHANDLE counterpart of that function that's not yet documended in the API. I don't know does it exists in Orbiter 2010-P1.

EDIT: Check the sample code of stock DeltaGlider. It's using the oapiEditMeshGroup to manipulate texture UVs.
 
Last edited:
Top