Problem - vrscene seq

Hi vlado, i have a BIG probl with rendering vrscene seq,

if you remember way back, you send me naiad2vrscene converter to convert naiad particles to vrscene, but i have a problem rendering the vrscene seq

i have added the post py translate script for loading vrscene files but thing is when you hit render script is executed only 1x in whole range

here is a script
----------------------------
import vray.utils as vu
import maya.cmds as cmds

frame = ‘%04d’ % cmds.currentTime(q=1)
vu.addSceneContent(‘t:/vrscene/flood.’+frame+‘.vrscene’)
nodes=vu.findByName(‘pCubeShape1@node’)
shapes=vu.findByName(‘Particle’)
cmds.warning(frame)
if not nodes:
    cmds.warning(‘no nodes’)
if not shapes:
    cmds.warning(‘no shapes’)
if nodes and shapes:
old=nodes[0].get(‘geometry’)
nodes[0].set(‘geometry’, shapes[0])
vu.delete(old)
--------------------------------------------------

i have even try to submit to deadline (1 frame task size) but deadline is also rendering only one frame (frame at saved moment)

so could anyone gimme an idea how to load vrscene seq per frame?

thx

Are you sure that the correct vrscene file is loaded and that this file contains the proper frame?
Currently I don’t think you’ll be able to render whole animation sequences, just separate frames, because the naiad2vrscene generates a single frame files.

hi T,

i made a single per frame vrscene file, and im trying to load them per frame, if i hit a single render at frame 3 it loads vrscene 3, but if i hit render animation, seq is not loading/changing…

i have files like this

flood.0001.vrscene
flood.0002.vrscene
flood.0003.vrscene
flood.0004.vrscene
etc…

i can upload scene with files, if you have time to take a look

p.s.

here is a scene
http://www.sendspace.com/file/hq52i3

Do you can add “print” on your script ?

Like :
frame = ‘%04d’ % cmds.currentTime(q=1)
print frame

I do not think you have to use this command to get the time in batch mode…

hi bigbossfr

does this cmds.warning(frame) will do the same?

u can try very simple test, just add these few lines and check Anim, and hit render

import maya.cmds as cmds
frame = ‘%04d’ % cmds.currentTime(q=1)
print frame

if you get the frame range info then its working, if not then :frowning:

As I’ve said rendering animations won’t work. This feature is single frame only, sorry.

hi T,

i know thats the Maya bug or what ever,

is there a way maybe to implement vrscene as vrmesh loader/importer?

It is not a bug in Maya, just a missing feature in the naiad2vrscene.

We have a special version of ply2vrmesh, which can generate vrmesh files, but I’m sure you don’t want to use it - it generates enormous files, it renders pretty slowly and uses tons of memory.

It turned out that there is undocumented call that might work. The call is appendSceneContent.
Can you try to use appendSceneContent instead of addSceneContent? In order to make it work
you have to call it for all frames. This will include all frames in the scene during the phase of scene
translation.

If this doesn’t work it will be good if you can send some minimal example (2-3 frames, both naiad
and vrscene files)

T, there is a link in previous posts, 3rd post, sendspace link :wink:

thx for your time

Does it work with the new method?

im not by the computer atm…

It could help that you export your vrscene per frame too. With Yeti for example this is the only way to render the fur.

i have few more probl :slight_smile:

is it possible to load more then 1. vrscene inside scene? :slight_smile:

fluid = vu.addSceneContent('t:/1/test_fluid.0001.vrscene’i)
fluid_nodes=vu.findByName(‘pCubeShape1@node’)
fluid_shapes=vu.findByName(‘Particle’)

foam = vu.addSceneContent('t:/1/test_foam.0001.vrscene’i)
foam_nodes=vu.findByName(‘pCubeShape2@node’)
foam_shapes=vu.findByName(‘Particle’)

something like this doesnt work, always loads only 2nd vrscene,

2nd thing, is it possible to link vrscene, not merge data from vrscene, inside vrscene? :slight_smile:

@paulDryzen
im not sure i understand

This happens because the plugins from the second scene have the same names like the plugins from first one.
The addSceneContent and appendSceneContent methods have a second parameter which
can add a prefix string to all the names. I suppose you’ll have to use it.

I don’t understand, you’ll have to try to explain it better.

What happened with the animations? Have you made it render sequences?

no i couldnt make it anything work

also im not sure i understand how to appendSceneContent all frames?

could you plz write few lines of code?

about, the 2nd thing,

i tried this with single frame, when i write everything into py translate post script and i export whole scene as vrscene (again), vrscene that im loading via post script is hard coded into new vrscene, i hope this is more clear, be cause i was expecting to see in this new vrscene just a link to other proxy vrscene

thx

@Bazuka:

Quick explanation:

For rendering we only use VRay standalone, nothing is rendered from Maya.

With Yeti we had the problem that only in the first frame the fur was visible, if we there rendering a sequence with only one .vrscene exported.
The problem was that the exporter only triggered the Yeti expression/prerender script once.
So inside the .vrscene we hat something like:
Yeticache.0001.fur which only worked for the first frame.
After switching to one single .vrscene for each frame the cache was exported properly for all frames.
lke
vray.0001.vrscene / Yeticache.0001.fur
vray.0002.vrscene / Yeticache.0002.fur …

Does this help?

yes i understand but im also doing the same thing :slight_smile: vrscene per frame

The idea is to append all frames to the exported vrscene and see what happens.

It should be something like this:


appendSceneContent('my.001.vrscene')
appendSceneContent('my.002.vrscene')
appendSceneContent('my.003.vrscene')
...
appendSceneContent('my.##n.vrscene')
...
"""here you do the plugin replacement"""

this is what i was afraid of, what will happen if i have 500frames?

thx for time and help, but you have to understand that this method is killing production, who will sit whole day and write down lines for whole seq… (i know i can make script to make py script, but again… :frowning: )

i dont know what to say, if this is the only way to make this thing work, then ill have to find way around :frowning: