Jump to content

Hscript Commands...


AndrewVK

Recommended Posts

Is it possible to copy ALL parameters of object (transforms, light mask, rendering properties etc)

and paste it to newly created object ?

Like:

set name = $arg1
set prm = COPY ALL
...
...
for tx = $BBXmin to $BBXmax step $stepX
 for ty = $BBYmin to $BBYmax step $stepY
  for tz = $BBZmin to $BBZmax step $stepZ
       ...
       ...
       opadd -n geo $cellname
       PASTE ALL to $cellname
  end
 end
end

Link to comment
Share on other sites

Have no idea how to do this :(

# Get source name

set name = $arg1

# Save source as empty template

opscript -g `$name` > $TEMP/temp.cmd

# Jump to /obj/ level

opcf /obj

# Create container for hundreds empty objects

set subnetname = `execute("optype -N $name") + "_subnet"`

opadd -n subnet $subnetname

# Dive in

opcf $subnetname

# Now we are inside of subnet

# Call template script with new object name

source $TEMP/temp.cmd $cellname

Fail!!!

$cellname created at $name level

because of this (part of temp.cmd):

if ( "$argc" != 2 ) then

echo -n Usage: $arg0 op_name1

exit

endif

set saved_path = `execute("oppwf")`

opcf /obj :mad: :banned: :tumbleweed:

I cant edit temp.cmd because my script is used as pre-frame script

I want to keep created objects inside of subnet because i need to

delete subnet quickly from post-frame script

I just want to force "copy sop" and mantra to generate and render

1.000.000 objects as quick as possible

Here

http://www.cgtalk.ru/forum/attachment.php?...07&d=1134435693

500.000 copies generated in 14 minutes and rendered in 20 seconds

at my home XP1800+ 1Gb

Link to comment
Share on other sites

Nice image...

If this is all done during the render I don't see any problem with creating them at object level and deleteing them at object level too, I don't think there is much performance difference between deleting a subnet and deleteing all the individual objects, or are you not finding that to be the case?

Also, if all the parameters are the same why not just use instancing to render them?

Link to comment
Share on other sites

Dont know why...but instancing is VERY slow.

Time to prepare 50.000 objects approximately few hours

or memory overflow in worst case :(

Time to prepare 1.000.000 objects with script is 36 minutes.

And i can control almost everything with stamping :)

Why i want to keep objects inside of subnet?...hmmm

Sometimes i need to just generate objects.

Just one click on subnet display flag to hide hundreds of objects from mantra.

Link to comment
Share on other sites

Just one click on subnet display flag to hide hundreds of objects from mantra.

23249[/snapback]

Sorry I thought you were doing this on the fly during the render only.

How about createing all the objects at object level and then collapsing them into a subnet? Opcollapse does this, only in H8 though, seems to be missing from H7.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...