Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Render Cameras Script

3 REPLIES 3
Reply
Message 1 of 4
christopher.haack6BYP5
465 Views, 3 Replies

Render Cameras Script

Hello,

i would like to automatically render some Camera Views in a selected variant group.

Maybe someone has an idea for a script?

 

 

regards chris

 

 

3 REPLIES 3
Message 2 of 4

Hi Christopher,

basicly like this:

 

Lets say, the variantset is called "views":
#get the viewpoints
viewpoints = getVariantViewPoints("views")
#how many we need to render, loop
maxsteps = len(viewpoints) -1

#the loop
i = 0
while i <= maxsteps:
  #activate the viewpoint
  jumpViewPoint(viewpoints[i])
  #set the filename, use viewpoints[i] to have the viewpointname inside
  file = outputpath + viewpoints[i] + ".png"
  #start render
  createSnapshot(file,1920,1080,true)
  i = i+1

Some notes:

- pay attention to not have animated viewpoints, depending on the vred version, the render will start before the animation is ready

- the while loop is not breakable, once the render starts you need to wait, or cancel every single viewpoint

 

Ciao

Andreas

Message 3 of 4

Hi Andreas,

 

somehow i didn´t get it to work.

I don´t get any errormsg, but i also don´t get any renderings.

 

regards

Chris

Message 4 of 4

Hi,

do you set the outputpath correct?

Somethink like this.

outputpath = "d:/render/"

Depending on the OS, it is better to set it like this

import os.path
outputpath = os.path.join("d:/","render/")

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report