Upbge - 0.3.0

Blender developers have changed undo system to make it faster.

But for now, it doesn’t work very well with the bge 0.3 alpha code as it is.

You can still enable old undo:

  • In user preferences > interface, check developers extra
  • A new menu named “experimental” (iirc) will appear in user preferences
  • Go in "experimental menu and check “undo legacy”

oh ! it instantly started working. thanx :wink:

Upbge 0.3 does not support SetUV() ?
This code works, but the texture seems not moving ?

speed_x = 0.1 # speed by which the coordinates are moved      
speed_y = 0.0   # speed by which the coordinates are moved    
mesh = owner.meshes[0] # access the mesh of the object in question    
v_array = mesh.getVertexArrayLength(0) # how many verts are there?      
for v in range(0,v_array): # go through the uv's of every vert
    vert = mesh.getVertex(0,v)  
    uv = vert.getUV()     
    print(uv)    
    uv[0] += speed_x # change the uv coordinates. uv[0] = x, uv[1] = y
    uv[1] += speed_y        
    vert.setUV(uv) # get the game engine to notice the change!!

Can we use object parameters in the shader editor ?

Another working way is to use UVWrap modifier, and move the “To” object to make UV move.

All mesh related stuff has to be done with bpy. You can also use Shader editor for UVs

1 Like

Shadows look bad as they are making jaggy lines.
https://ibb.co/xCktd2k

so soft shadows before only worked if the camera was sitting still, now they appear to not be working at all.

It feels like there is still something to be done to get TAA working 100% / soft shadows

I don’t like TAA or Upbge 0.3 denoising, it makes objects blurry, very noticeable for the game objects in front of the camera.
But shadows are not related to TAA, they need a different filter or shader improvment.

Also i did not share comparison lighting, but Upbge lighting is really missing lighting bounces and global illumination something Eevee does not have to make lot better and accurate litghing rendering.

This will be lot of work to get Upbge 0.3 able to display modern litghing as Eevee is not the solution for good global illumination litghing in whole game levels.

ue4 etc use ATAA - which is like TAA done right + any limtations TAA has it bypasses by using raytracing for data that is missing.

first we need our TAA to behave properly using clamping / nearest neighbor stuff,
later after eevee itself gets RTX we can try for the ATAA.

another option is to use low scale images and FXAA and upscale the result using AI
(like “DLSS”) to 4k

any idea why, my materials get messed up after i hit p and exit, when i change the anisotropic filtering in viewport settings ?!

its a bug in the undo system. maybe

i enabled that

anyways i don’t know how i stepped into this, cause this is no necessity ! :joy:

so my little experiment with transform feedback works; i got the gpu to move vertices around before the actual drawing stage. sending in bone matrices and weights as uniforms gets us skinning.

big problem though, it crashes blender after ten or so seconds of engine runtime. the error is linked to a glUseProgram call in one of my methods so i am guessing i cant just do that. any ideas?

Could you post the code to be inspected?
We can also ask in the devtalk.blender.org, as they usually answer questions related with gpu module

its nothing too fancy.

std::vector<mt::vec3_packed> deformTest(int totvert) {

	glUseProgram(program); // crashes here
	glBindVertexArray(vertArray);
	glEnable(GL_RASTERIZER_DISCARD);	

	glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, vertBuffers[POSITION_OUTPUT]);

	glBeginTransformFeedback(GL_POINTS);
	glDrawArrays(GL_POINTS, 0, totvert);	
	glBindVertexArray(0)

	glEndTransformFeedback();
	glDisable(GL_RASTERIZER_DISCARD);
	glFlush();

	std::vector<mt::vec3_packed> feedback(totvert);
	glGetBufferSubData(GL_TRANSFORM_FEEDBACK_BUFFER, 0, vertSize, &feedback[0]);
	return feedback;

}

and heres the test shader, which works as expected.

    #version 150 core

    in vec3 in_position;

    out vec3 out_position;

    void main() {
        out_position = in_position * 0.5;
    }

i think ive seen some snippet of moguri’s where he changes the active shader through the rasterizer. maybe i should try that. if it all fails, devtalk it is.

any interesting updates to worth downloading the latest version ? :wink:

newest builds are based on 2.9x
so they have all the new candy 2.9x gets.

1 Like

https://www.youtube.com/watch?v=qC5KtatMcUw - They talk about trillions of triangles and realistic lighting, and 8k textures per frame ? with no bake and stuff, they will just work ? like cgi quality and stuff ? … like scanned asserts straight into the game engine ? can this be implemented into upbge or something ?

1 Like

I looked at what they said about it.

Most of this is hardware
(ps5 dev kit + fast pci_e SSD)

Basically its using a SSD like giant stick of Ram
So they are streaming raw geometry Into a buffer capable of transforming the chunks, and run a tesselator against the streaming buffer
(I think) from the presentation

1 Like

It’s not fully raw data , the demo uses materials( so baked textures and UV ), it’s not material per vertex.

I’m pretty sure all next gen games in the making for next gen consoles are using normal maps because it’s most efficient for micro detail rendering, and traditionnal LOD as the progressive LOD without user control will only work with enough high detail on distant meshes to avoid visual glitches.

I don’t think all companies will drop normal maps and LOD using raw data to make only 30 fps games with 2K resolution like the demo (while features like DLSS 2 could help a lot).

Yeah … ffreak unreal and nvidia :nauseated_face: :face_vomiting:, … guess what’s real is Blender. Can’t wait for amd to take over gpu also and ubisoft on epic ! if unreal has it’s C++ source open on github, than there is no crack needed to adapt on python ! :rofl: ! right Ffffred k ? :joy: