For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Export PNG without brown background

jj jj's picture
Forums: 

Hi all,

is there a way to export the object with a transparent background? Or at least change the brown to white.

Thanks alot!

Kirill Gavrilov's picture

V3d_View has methods defining background colors. Note that it is not actually brown, but black by default.
Concerning transparent background - there is no such thing in 3d viewer. However, if you use rgba format instead of rgb in v3d_view::topixmap method parameters, then you'll get something semitransparent

jj jj's picture

Hi Kirill! Thank you very much for your quick response. Could you be a bit more specific how i do that. I am not very experienced. Am I supposed to copy some code in the TLC console? Or can I change the standard parameters somewhere in the files of the program. (to white or transparent)?

Best regards

Kirill Gavrilov's picture

Probably you should first describe in detail what are you actually using (name of software or framework, version, system, etc.)...

jj jj's picture

Dear Kirill,

sorry, I think I didnt mention what program I use. I was referring to CadRays to render some STEP files. The version is V1.0.0 and operating System is Windows 10. I want to get rid of the brownish background. Of course I can use Gimp or PS to do it manually, but the result is usually either bad or needs a lot of work to have a white or transparent background. Is there an easy way to change the background to white, or ideally having a transparent background?

Thanks a alot again. The software is really great and super simple to use!

Kirill Gavrilov's picture

CADRays is expected to be used with environment map in background for better results.
You can specify background color via standard Draw Harness command vbackground in Tcl console:

vbackground -color BLACK

 

john hyslop's picture

Hi

1st of all I'd like to say that CADRays is a fantastic program and so far I've managed to create a couple of really nice renders by

watching and pausing the very few videos that are out there I've found 4  I think...

May I ask a few questions...

1: Can you change the background to pure black ( so I can make alpha backgrounds? ) Kirill Gavrilov posted this but it doesn't work "vbackground -color BLACK"? maybe I'm in the wrong forum?

2: Is there a way to use a flat picture in the background as an environment as the norm seems to wrap the environment around which is ok, but I'd like the option if there is any to place

a flat image..

3: Is there any way to place a LOGO/Decal on a face and make the alpha channel work that's on the image?

4: Is there any documentation anywhere no matter how basic, mainly to understand creating TCL scripts? I've been using the vbox command to create walls and floors so far but that's my limitations.

5: Can you control the textures you add to an object eg tiling, rotation , position? " at the moment a create a rectangle add the Decal , place on model and use Gymp on the final image to fill and blend/smudge..

6: Is CADRays able to use Bump Maps? 

7: Documentation on CADRays interface would also be great..

Any help here would be greatly appreciated..

Thanks for making such an amazing program open source..

Best Regards

John Hyslop

john hyslop's picture

Hi All

To Set the screen (background) color in CADRays this is the command you type in the TCL console;-

vsetcolorbg 0 0 0

the example above will set the screen to black which can then easily be set to alpha background using

irfanview for example...

the 3 zeros are RGB color codes for if you put this :-

vsetcolorbg 255 255 255

you would get a white screen..

Here's a link to color charts

https://www.rapidtables.com/web/color/RGB_Color.html

Hope this helps someone :-)

Cheers

John Hyslop

john hyslop's picture

Hi JJ

vsetcolorbg 255 255 255

sets color to white, type this in the TCL console in CADRays

Cheers

John Hyslop

jj jj's picture

Awesome, thank you so much John. I temporarily solved the problem with a white disk but this solution makes it much easier. I wish the software would be further developed by someone. Haven't found anything as simple and good so far! Really great work, developers!

We used it for our Catalog (Page 22- End) and it really has helped. https://www.ccpcontactprobes.com/sites/default/files/2019-11/CCP-POGO-PIN-BROCHURE_20191120_two-pages.pdf

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.