-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding a Skybox #7
Comments
I think your skybox need to be un cube. PLUGIN:
ENTITY
GAME EXTEND :
|
Awesome, Thanks a lot! @SilvRO 😃 one small issue I noticed is it is affected by fog, so I have to turn it off. It would be nice though to get this to work with fog. Anyways, really appreciate this and got it working. thanks again 👍 👍 👍 |
The quads are very far away from the camera. You need some tweak to disable fog only on skybox. I'm glad to have helped you 😃 |
I see and I would assume that would involve tweaking the fog shader. @phoboslab is there a current workaround to exclude an entity/quad set from fog? Another minor thing would be attaching or parenting the skybox to the player/camera to get that endless horizon effect. I'm fairly new to impact/tpf and tried to copy the x and y player position to the box position and it is not moving at all.. looks like that's not how it works. any tips for that? |
My code was really for testing. Normally a skybox is not a "physical" entity that the player can touch. I think we need to review the integration of the skybox to do this. A 3D pass for the skybox with fixed origin and camera angle, then a pass for the level. |
Ok got it. Yes, agreed and what I have proposed there is not having to use shaders as much as possible as this is the go-to method which was used before shaders became available, and that is setting up a large skybox following camera or using pivot attached to player camera. I think your solution here is more practical and simple, but I don't mind going for a shader version either. As for the fog, I finally figured out a workaround which just involves depth. With the fog near and far default setting to 128 and 512 respectively, I just set the boxSize a little bit bigger around 8000 (so the sky looks bigger/farther with a huge margin just to make sure) and added this on the fog shader.
or just 1000, might need some adjustment depending on the map setup, but it works. I still have no clue with interacting with custom quads and passing parameters to shader on Impact, but would be curious to know how this can be done, particularly with entities that are not far but is not affected with fog (items, entities, powerups, etc.). |
Hi, I see that the forum is now read only and noted to post here on GitHub for questions, so in particular I'm trying to create a background skybox for a twopointfive level. I did search for previous related post here:
https://impactjs.com/forums/impact-engine/impact-1-24-pseudo-3d-web-audio
but with no luck and somehow can't get it to work. What I have done so far is cleared a part of the ceiling assuming it will be drawn there.
main.js
The text was updated successfully, but these errors were encountered: