C3POwen

[Guide] Rendering LDraw models using POV-Ray

Recommended Posts

10 hours ago, roland said:

I just noticed the 'black transparent' on the IR sesnsor of mocbuild101's rendering isn't very realistic.

Yeah, that's really annoying... :sceptic:

9 hours ago, roland said:

Also, @mocbuild101, are you sure you have smoothing enabled (prefs/ldraw/vertex processing), the rendering looks a bit flat shading-y to me.

I don't know... where could I check it?

7 hours ago, dagupa said:

I prefer to use single lights because you can position them precisely according to the needs.

That makes sense...

Share this post


Link to post
Share on other sites
13 hours ago, mocbuild101 said:

Yeah, that's really annoying... :sceptic:

You could try playing around with

ldrawPlasticTrans_f and ldrawPlasticTrans_t

e.g.

#local ldrawPlasticTrans_f=0.3;
#local ldrawPlasticTrans_t=0.7;

Seems to work better with black trans, but it reduces (imho) the quality of normal transparent stuff. But you don't have that in your scene anyway.

Share this post


Link to post
Share on other sites
6 hours ago, roland said:

You could try playing around with

ldrawPlasticTrans_f and ldrawPlasticTrans_t

Seems to work better with black trans, but it reduces (imho) the quality of normal transparent stuff. But you don't have that in your scene anyway.

Thanks, I will make sure to try that next time!

Share this post


Link to post
Share on other sites

I found a solution to the problem of rendering a subset of frames inside out of a larger animation. I post it here in case anyone have the same problem.

As   @mocbuild101 pointed out the problem with my animation accelerating for no reason around 00:04 was due to a glitch.

https://bricksafe.com/files/dagupa/others/ebvarias/BrickbankFirstAttemp.mp4

After many attempts and a quick search, I found out the exact problem. It was the recovery code. I did the animation with a simple code:
Initial_Frame=1 
Final_Frame=360

PovRay exports each frame with a file name and a number. Example brickbank00001.png;brickbank00002.png;brickbank00003.png(...)

If the program crashes, there is a script that reads the last file written and takes the number from that name. It stores the number as a variable "LastFrame" and starts the process from that frame

Initial_Frame=LastFrame 
Final_Frame=360

Well, it turns out that this is NOT the way to restart the rendering process. What PovRay does is to divide 1 by 360 and then you have 360 different values in the internal variable called "clock" which is the variable that I used to move the camera position 1 degree at a time. So:

Initial_Frame=1 
Final_Frame=360

is not the same as: 

Initial_Frame= LastFrame
Final_Frame=360

In the first code you have a "clock" variable that increases 1/360 at a time. In the "recovery code" the "clock" variable increases LastFrame/360. In my case the program crashed around frame 172, so in the new process each frame changed 172/360 at a time.
That's the reason why the first subset of renders looks different to the second subset: The camera rotates at different speeds.

It turns out that the solution is very easy. A simple google search point to the solution:
If you wish to render a subset of frames such as 172 through 360 out of a 1 to 360 animation, you should not change Initial_Frame or Final_Frame. Instead you should use the subset commands.
Subset_Start_Frame=172
Subset_End_Frame=360

It took me almost a week to figure this out, not because of the complexity of the problem, but because each animation took 110 hours to render.
@mocbuild101 I managed to remove 300 pieces and saved a couple of hours. It's not easy to identify internal bricks that are not seen in a 360-degree animation when the model has so many windows.

@rolandI tried your LDCad. It's a very useful tool. Too bad there's no Mac version.

Thanks for all the advices. I hope someone finds this useful.

Share this post


Link to post
Share on other sites

It's great to hear the problem (and the solution) was found, and I'm sure someone will find it useful - I probably will end up using it too one day...

Share this post


Link to post
Share on other sites

Hello I have created a topic: Stud.io, exporting POV-ray files, some is covered here. The new topic focus on editing .pov files exported from Stud.io and then rendered from a mac OS terminal. 

Right now I'm learning to edit .pov files. 

 I'm trying to adapt the lines of code from CRPOwen' guide to the .pov file exported from Stud.io.

But I had some trouble, because the .pov file, already has a macro for lights:   WriteLight(0, 0, 1, 0, 200, 5) . If I remove that macro (see line below), somehow the rendering fails. 

I'm trying to understand more of the POV-ray language to find whats happening. Any help will be greatly appreciated. 

Solution Update:

.pov files exported from Stud.io give me some trouble, so instead, from stud.io I export a .ldr file, which then I open in LDView, and from there I exported the .pov file. 

This also allow me to select the perspective of the model, and automatically translated to the .pov file (Which I could not do it in Stud.io). 

At first time the .pov file exported from LDView has mismatch colors, that was fixed updating the file /Applications/LDView.app/Contents/Resources/LGEO.xml. 

NOTE: I will eliminate the topic I created, or maybe change to focusing on mac OS related issues of POV-Ray Rendering.

Edited by cosmocaos
Update

Share this post


Link to post
Share on other sites
11 minutes ago, cosmocaos said:

Hello I have created a topic: Stud.io, exporting POV-ray files, some is covered here. The new topic focus on editing .pov files exported from Stud.io and then rendered from a mac mac terminal.

As far I know stud.io pov exports are LDView exports wich most people in this topic use / talk about, so I don't think you need to make a distinction.

Share this post


Link to post
Share on other sites
1 minute ago, roland said:

As far I know stud.io pov exports are LDView exports wich most people in this topic use / talk about, so I don't think you need to make a distinction.

I did not know that, thanks for the clarification. I will read more in this post to see if solves the issue I'm describing. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.