Comments (7)
Hi, yeah, the render pipeline does not expect the camera to be parented to another nodepath.
I will see if I get to implement this for the next Release, in the meantime you can use a task which synchronises the camera position to the desired nodepath.
from renderpipeline.
Right! I will wait for you!
Please try to fix soon, because into my controller system, when i update the camera position into task, the results very, very poor.
Thanks for the attetion.
from renderpipeline.
Make sure the task has the right sort, so that your logic happens first, then the camera position is synchronized, and the render pipeline updates.
The rp updates all have a sort greater zero, so try running your game logic with a sort of -10 and your camera synchronization with a sort of -5 or so.
I am currently in vacation, so I can't do much until next week :)
from renderpipeline.
I found the origin of problem!
Analyzing the glitchs, i see they follow a pattern, and they occour's only into skybox, and how many times i test, less glichs occour's. So when i try you manual solution suggestion, i find the origin of error, and a perfect workaround.
The error occour's because the RP cannot get the starter position of camera when his is a child of another thing, and he is getting some memory info trash, and receiving invalid coordinates.
But, if i can set manualy only the original position, the RP can apply any other transformations correctly, and here is the workaround:
base.camera.setPos(self.orb.getPos() + self.playerNP.getPos() + Vec3(0, 2.5, 0))
base.camera.lookAt(self.orb)
base.camera.reparentTo(self.orb)
base.camera.setPos(0,2.5,0)
base.camera.lookAt(self.orb)
Basically, i am manualy setting the camera position into his future child position, then i make it a child, after this, the RP can correctly calculate the camera position and all glich's are solved.
Now i belive is much more easy to you to found a definitive solution ;)
Att. R.M.Lehnemann
from renderpipeline.
Only a minor update, i found another error, the cascade shadow map, he can't update correctly the camera position, so when i go so far, the shadow quality become very very poor.
But for this problem the solution is more simple, put a if into the cascade shadow map, if the camera is a child, use the father coordinates.
Note: please consider multiple child levels, bacause into my System the camera is a child of child. :P
from renderpipeline.
No more fix is needed, problem as definitely solved.
If you need reparent a camera, instead create a empty node, them use the following command:
base.camera.setTransform(self.EmptyNode.getNetTransform())
Solved. The camera now will recive all transforms of child component.
from renderpipeline.
Cool, glad to hear you found a solution!
I will leave this PR open though, since I think the render pipeline should automatically be able to detect this (by always using the correct transform)
from renderpipeline.
Related Issues (20)
- Black screen after render pipeline is rendered HOT 4
- Unclear display with black blocks HOT 4
- cubemap.txo can't find HOT 2
- No water or flame sample included
- Using RenderPipeline in C++? HOT 4
- Missing reflections HOT 4
- A room without windows is lit up
- SSLR won't work
- Motion blur blurs whole image HOT 1
- glFramebufferParameteri error when enabling fractional scaling and going full screen
- Bloom plugin broken on AMD GPU
- Models shows a white Region HOT 1
- Setting texture to shader terrain through custom shader failed HOT 1
- AttributeError: module 'collections' has no attribute 'Hashable' HOT 1
- Terrain shadow problem HOT 1
- Custom Shaders HOT 1
- Framebuffer errors when using EGL HOT 1
- translucent object handling question
- How to realize the effect of Transparent in samples\07-Shading-Models HOT 1
- GL_INVALID_VALUE and GL_INVALID_OPERATION HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renderpipeline.