Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
ccbRenderToTexture

Guest
Guest
Quote
2023-05-19 23:36:15

is there any way to not render 2d overlay in ccbRenderToTexture?


Guest
Guest
Quote
2023-05-20 01:42:05

2d overlays don't have textures aka they don't have a material for ccbRenderToTexture to render on. you need to use a 3d mesh with a material such as a plane. childing the plane to the camera is fairly easy. I'm assuming the "not" in your question is a typo. hope that helps.


Guest
Guest
Quote
2023-05-20 03:31:53

that's a problem, i use same way but mesh as ui not so good and i wish to use 2d overlay


Guest
Guest
Quote
2023-05-20 04:10:23

I'm not sure if this will work as I have not tried it but you can render the texture with ccbRenderToTexture to a hidden plane somewhere in your scene and save the texture with ccbSaveTexture to a folder in your project and then load the texture to the overlay in a loop of sorts but I'm not sure how performance intensive this would be. some of these functions only work on certain platforms too. if you can program in JS then it shouldn't be too much of a problem but like I said I've not tried it.


Guest
Guest
Quote
2023-05-20 04:26:49

i've made class for projection plane mesh in 2d screen coordinates but this way gives bad when screen resize


Guest
Guest
Quote
2023-05-20 05:46:27

i've not used many of these Advanced functions since CC's update but from testing ccbRenderToTexture it also renders overlays. maybe try the camera split function?


Guest
Guest
Quote
2023-05-20 06:03:18

fixed my mesh projection class so at now all work good (i used normalize vector but now ive divide them and all looks better)


just_in_case
Moderator
Quote
2023-05-20 06:09:04

Hi there, all the @Guest current ccbRenderToTexture() do render 2D overlays to the texture, for now, there is no way to not render them without hiding them manually before using the RTT command. but I have already updated the command, and it now has an extra parameter, that will decide if you want to use 2D overlays to be rendered or not rendered on the Texture.

This will be usable from the next upcoming update, along with other features and improvements that I have mentioned in this thread here.
https://www.ambiera.com/forum.ph...


Guest
Guest
Quote
2023-05-20 06:09:47

🔎︎



Guest
Guest
Quote
2023-05-20 06:18:20

use percent for position (better for resize) and can click on it, but when render to texture something strange is happen
🔎︎



Guest
Guest
Quote
2023-05-20 06:19:11

@other guest

good to hear! glad you got it sorted!

@jic

that's awesome. it could still be used for a lot of things even without being able to disable the overlays. what would be a nice addition is a shader that saves images from a texture if that is even possible. I was trying to help the other guest but see the ccbRenderToTexture can't be saved with the CC's texture save function. anyway look forward to your update!


Guest
Guest
Quote
2023-05-20 06:19:48

problem with previous screen size or something, how can i fix it


Guest
Guest
Quote
2023-05-20 06:20:45

@other guest

are you using the screen width and height in the ccbRenderToTexture as arguments by chance?


Guest
Guest
Quote
2023-05-20 06:22:01

if so I'd guess you need to update them when resizing the screen.


Guest
Guest
Quote
2023-05-20 06:34:38

i've updating them all time in register on frame function, even try use size like 256, 512, 1024 nothing helps


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Interna?ional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact