ericstoneking/42

Not seeing regions rendered

mick-h opened this issue · 1 comments

I'm attempting to work out how to get certain features rendered on the ground (mostly to show the location of ground stations on the earth's surface). My first attempt at this has been to use the regions feature.

In Inp_Regions.txt I added a few entries like the following:

TRUE                         ! Exists
"Feature 1"                         ! Name
EARTH                        ! World
LLA                          ! POSW or LLA
0.0   0.0  0.0               ! Position in W, m
9.36 45.59 100.0               ! Lng, Lat (deg), Alt (m)
1.0E6  1.0E4  0.1            ! Elasticity, Damping, Friction Coef
Rgn_Crater.obj              ! Geometry File Name

and updated the Region count accordingly.

However I failed to see anything rendered at the locations specified on the surface of the Earth in the Cam window.

After poking around the code a bit I also tried increasing the value of the Scale variable in the LoadWingsObjFile function in geomkit.c. No matter how much I increased this (up to 1000000) I could not see anything being rendered at the Lat/Lng that I had specified. I also tried increasing the altitude up to 10000 also to no avail. When I put a breakpoint in I can see the loop executing in the OpaquePass function in 42gl.c to render regions.

I feel like I'm missing something fundamental - can anyone point me in the right direction to debug this?

Thanks,
Mick

Hi Mick,

First off, put Scale back to 1.0 till we figure this out. That feature is undocumented for a reason ;-)

The attached scenario works for me. Unzip it, put the Lander folder in the same folder as your executable, then run "42 Lander". If it doesn't work, let me know. If it does work, it may give you clues as to why yours doesn't.

Lander.zip

Regards,
-Eric (he/him)