• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Visibility issue with objects below ground

Status
Not open for further replies.
Hello,

I am using a full alpha-tile terrain with a starscape as the skybox to create a space terrain. I wanted to decorate the spacescape a bit by putting asteroids, planets etc. in the background, so I added them far below the ground, at z = ~-2000.

However, I'm running into the problem that the objects suddenly disappear when the camera moves to certain positions (when object's position projected to the surface moves out of the camera bounds). I've tried it with special effects, doodads, and destructibles; all with the same result.

Is there any way to fix or workaround this?

Cheers
 
I have not. I wouldn't know how to do that. I've created a cinematic camera before and adjusted it, but I don't know how the CameraSetupSetField works for the game camera.

I doubt it will help, though. So, here in this screenshot, the voidwalker that's down there will disappear when I move the camera such that his coordinates on the surface (red arrow) move out of the camera field, no matter if I set his Z to -500 or -3000, such as in this screenshot.
voidwalkertest.jpg
 
Level 11
Joined
Jul 4, 2016
Messages
627
What you could do is instead of putting them far below ground, you could mimic the distance of them being far away by making them smaller in size.
 
Well, I would have to take care of the parallax scrolling effect, otherwise it won't look like they're far away at all.

But that could be possible by changing the position of the special effect locally:

JASS:
set R = 0.8
set X = R * GetCameraEyePositionX() + (1 - R) * Planet_X
set Y = R * GetCameraEyePositionY() + (1 - R) * Planet_Y
call BlzSetSpecialEffectPosition( Planet_Effect , X , Y , -200 ) //-200 so that it doesn't overlap with other objects.
This would mimic a planet far in the distance, about 5000 below the ground.

If there's no clean solution, I'll try this.
 
Status
Not open for further replies.
Top