Is there a way?

For all the users of Twilight Render (V1 & V2), to ask questions and get started
Post Reply
ntxdave
Posts: 1012
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Is there a way?

Post by ntxdave » Wed Jan 11, 2023 4:17 pm

Is is possible to save a TR rendered version of a SU model as an obj file instead of as an image?

Fletch
Posts: 12914
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Is there a way?

Post by Fletch » Wed Jan 11, 2023 4:24 pm

You can render to texture with the Twilight Render Render-to-Texture AddOn .
Then the materials will be modified to look like the rendered object. Then you would need to export from Twilight to OBJ with a plugin that does that (there are several out there, likely there's a free one)


ntxdave
Posts: 1012
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Re: Is there a way?

Post by ntxdave » Wed Jan 11, 2023 5:21 pm

Thanks Fletch - now I have some questions/comments:
  • If I save the model after using the Render-to-Texture add on, are the changes saved in the file and can I come back and modify if necessary?
  • Is there a way to save other TR materials applied to objects in the model? I want to be able to use all of the TR material capabilities in this process.
  • I did a search for an add on that would allow me to save/export a TR rendered model to the obj format and could not find one. Do you know where I could find one?
  • Since MS Office 2021 and MS Office 365 support showing 3D objects (in several different formats) it would be really neat if there was a way to export a TR rendered model in a format that could be displayed in MS Office.
As I have stated before, my laptop died so I cannot currently try any of this. I am hoping to buy a new one soon (any recommendations would be appreciated). My purpose at this point in time is to contribute to others on the forum.

Fletch
Posts: 12914
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Is there a way?

Post by Fletch » Wed Jan 11, 2023 6:29 pm

ntxdave wrote: Wed Jan 11, 2023 5:21 pm Thanks Fletch - now I have some questions/comments:
  • If I save the model after using the Render-to-Texture add on, are the changes saved in the file and can I come back and modify if necessary?
  • Is there a way to save other TR materials applied to objects in the model? I want to be able to use all of the TR material capabilities in this process.
  • I did a search for an add on that would allow me to save/export a TR rendered model to the obj format and could not find one. Do you know where I could find one?
  • Since MS Office 2021 and MS Office 365 support showing 3D objects (in several different formats) it would be really neat if there was a way to export a TR rendered model in a format that could be displayed in MS Office.
As I have stated before, my laptop died so I cannot currently try any of this. I am hoping to buy a new one soon (any recommendations would be appreciated). My purpose at this point in time is to contribute to others on the forum.
Twilight Render does not create a model. It can only create a rendering which is a 2D pixel "raster" image.

In order to create a 3D model that has all of the material properties from Twilight you would need to render to texture (please watch the video carefully). But this effect is limited to materials that can be rendered. For instance you can't render to texture a glass sphere... it will not work like a glass sphere any longer, (changing what is refracted through the glass sphere depending on the angle of view).

Once your SU model is rendered to texture, you can NOT now change any material properties further, as the materials are now "baked" to texture. You are looking at the model now with simple flat textures, but the textures happen to be "photo image" textures of the rendered faces. SketchUp is still SketchUp and just showing you the texture of the material. SketchUp is not going to magically start showing your materials with shine and reflection or refraction.

The program you use to view your obj file needs to have a real time render engine built into it if you want it to work like a rendered view, like a video game for example.

Same with opening the OBJ in any other program, such as in Microsoft Office - the object is not going to change the shine of light along the surface as you rotate it around inside of an MS product. That would require Microsoft Office to have a real-time rendering engine on-board. I don't believe it does. :totgm:

If you export a model, say a wooden chair, which was rendered to texture with Twilight Render it would look fine in MS office. But if you want it to be clear plexiglass chair, that material will not work as the look is dependent upon the render engine.

SketchUp pro exports OBJ natively.

ntxdave
Posts: 1012
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Re: Is there a way?

Post by ntxdave » Wed Jan 11, 2023 10:05 pm

Fletch wrote: Wed Jan 11, 2023 6:29 pm Twilight Render does not create a model. It can only create a rendering which is a 2D pixel "raster" image.
That is what I thought but it is something I would like for TR to keep in mind for the future. :D
Fletch wrote: Wed Jan 11, 2023 6:29 pm In order to create a 3D model that has all of the material properties from Twilight you would need to render to texture (please watch the video carefully). But this effect is limited to materials that can be rendered. For instance you can't render to texture a glass sphere... it will not work like a glass sphere any longer, (changing what is refracted through the glass sphere depending on the angle of view.
Yes, I did watch the video and that was what I thought was happening.
Fletch wrote: Wed Jan 11, 2023 6:29 pm Once your SU model is rendered to texture, you can NOT now change any material properties further, as the materials are now "baked" to texture. You are looking at the model now with simple flat textures, but the textures happen to be "photo image" textures of the rendered faces. SketchUp is still SketchUp and just showing you the texture of the material. SketchUp is not going to magically start showing your materials with shine and reflection or refraction.
Understand completely.
Fletch wrote: Wed Jan 11, 2023 6:29 pm The program you use to view your obj file needs to have a real time render engine built into it if you want it to work like a rendered view, like a video game for example.
How does something like Shetchfab accomplished accomplish this?
Fletch wrote: Wed Jan 11, 2023 6:29 pm Same with opening the OBJ in any other program, such as in Microsoft Office - the object is not going to change the shine of light along the surface as you rotate it around inside of an MS product. That would require Microsoft Office to have a real-time rendering engine on-board. I don't believe it does. :totgm:
Again, how does something like Sketchfab accomplish this? Are they using a differential file format?
Fletch wrote: Wed Jan 11, 2023 6:29 pm If you export a model, say a wooden chair, which was rendered to texture with Twilight Render it would look fine in MS office. But if you want it to be clear plexiglass chair, that material will not work as the look is dependent upon the render engine.
Again, I understand what you are saying.

Again, maybe I am being a PITA, I am a big fan on TR (I think it produces some of the best quality out there and is easy to use/learn) and want to promote when I can and want to see it move forward with the industry (even if it is not until future releases). IMO 3D is taking over the modeling industry and being able to share 3D models in 3D mode is where things are headed.

Fletch
Posts: 12914
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Is there a way?

Post by Fletch » Thu Jan 12, 2023 11:09 am

ntxdave wrote: Wed Jan 11, 2023 10:05 pm
How does something like Shetchfab accomplished accomplish this?
...
Again, how does something like Sketchfab accomplish this? Are they using a differential file format?

...
Again, maybe I am being a PITA, I am a big fan on TR (I think it produces some of the best quality out there and is easy to use/learn) and want to promote when I can and want to see it move forward with the industry (even if it is not until future releases). IMO 3D is taking over the modeling industry and being able to share 3D models in 3D mode is where things are headed.
It says on their website:
Sketchfab's website: wrote:"For the 3D world, this (being like YouTube for sharing 3D models) wasn't technically possible before WebGL, which came as a new initiative from Mozilla. My co-founder [Sketchfab CTO Cedric Pinson] was one of the first programmers on earth to work on WebGL. He was working for the gaming industry, where 3D artists shared 2D screenshots or videos of their 3D files for lack of a better way."
So it's a 3D render engine and model studio that converts your creation into WebGL format for sharing. WebGL is now built into modern web browsers by default, so no need for additional software to view.
wikipedia.org/wiki/WebGL wrote:WebGL (Short for Web Graphics Library) is a JavaScript API for rendering interactive 2D and 3D graphics within any compatible web browser without the use of plug-ins.[2] WebGL is fully integrated with other web standards, allowing GPU-accelerated usage of physics and image processing and effects as part of the web page canvas. WebGL elements can be mixed with other HTML elements and composited with other parts of the page or page background.[3]

WebGL programs consist of control code written in JavaScript and shader code that is written in OpenGL ES Shading Language (GLSL ES), a language similar to C or C++, and is executed on a computer's graphics processing unit (GPU). WebGL is designed and maintained by the non-profit Khronos Group.[4]

On February 9, 2022 Khronos Group announced WebGL 2.0 support for all major browsers.[5]
Thanks for your continued insistence, Dave :hat: :rspkt:
We will keep in mind the idea to have ability to export Twilight models to WebGL format. They will not look as great because they will be rendered in WebGL's rendering engine... not in Twilight's render engine. (currently Kerkythea, but in future it will be a different engine.)

ntxdave
Posts: 1012
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Re: Is there a way?

Post by ntxdave » Thu Jan 12, 2023 2:50 pm

Thanks Fletch. :hat: This is very informative/educational. :v:

Now, what about the possibility (in the future) of including a rendered model in MS Office applications. Here is a little quote about the file types that can be used:
Step 5: Navigate to the location with the 3D Model file, select the File and click on Insert. Note that you can only import file formats such as GLB, PLY, 3MF, OBJ, STL, and FBX.
Just maybe something else to keep in mind. :?

Still another silly question (for my education). On some online shopping sites I have seen pictures/models of merchandise (shoes come to mind) that allow you to view it in a 3D format. Do they use WebGL for that? Also, what type of software allows you to create WebGL files?

Fletch
Posts: 12914
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Is there a way?

Post by Fletch » Thu Jan 12, 2023 4:16 pm

ntxdave wrote: Thu Jan 12, 2023 2:50 pm what type of software allows you to create WebGL files?
YOU are the one who told me to look into Sketchfab - that's exactly what it does. ;)

ntxdave wrote: Thu Jan 12, 2023 2:50 pm including a rendered model in MS Office applications. ...GLB, PLY, 3MF, OBJ, STL, and FBX.
So, again, as stated above, you would render with Render-to-texture addon for Twilight, then, in SU pro, simply export the rendered model with the new textures on it as an obj file.
Or get a 3rd party addon for SU of which there are many many many that can export FBX or other formats.

ntxdave wrote: Thu Jan 12, 2023 2:50 pm some online shopping sites I have seen pictures/models of merchandise (shoes come to mind) that allow you to view it in a 3D format. Do they use WebGL for that?
exactly. :^:

ntxdave
Posts: 1012
Joined: Tue Feb 23, 2016 7:05 pm
OS: Win 10
SketchUp: 2020Pro

Re: Is there a way?

Post by ntxdave » Thu Jan 12, 2023 5:21 pm

Two last questions (I hope):
1. Are these files in gltf or glb format (can not see this on my iPad)?
2. Do you have a laptop recommendation?

I appreciate the education I am getting here. :hat:

Hope one of these days soon I can get back into this stuff. :rofl:

Fletch
Posts: 12914
Joined: Fri Mar 20, 2009 2:41 pm
OS: PC 64bit
SketchUp: 2016-2023
Contact:

Re: Is there a way?

Post by Fletch » Thu Jan 12, 2023 8:02 pm

Subject: New pc spec, thoughts?
Fletch wrote: Thu Jan 12, 2023 8:02 pm If someone is looking at laptops:
I am using an MSI GL73 with
16GB RAM
Intel core i7 12 threads
NVIDIA Geforce RTX 2060 6Gb VRAM
1TB SSD disk x3 one used for OS. two for storage/backup
17" IPS screen (important)

I'm quite happy with it. It is a couple years old now, I'm sure there are many better out there.

If you can find one with similar or better specs, you will likely be happy as well. I would suggest 32Gb RAM or better these days.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest