Jump to content
Sign in to follow this  
markmulli

Vops sprites

Recommended Posts

Hey Guys

I have a question about the wonderful new VOPs. I thought it would be awesome if there was a way to procedurally scatter a variety of different sprites over a surface? Here is an example of what I am talking about.

Let's say you have to make a flight sim game that requires a very large map for the ground. The map needs to have trees, shrubs, huts, and various other objects. The houses would need to be in little community's and aligned to the roads. I know that traditionally this kind of thing would have been done with geometry but I have never seen this kind of thing done in shaders.

Basically I need a way to scatter a large variety or pre made sprites over a surface with control over placement scale etc. I guess what I am after is a kind of copy sop in VOPs. I have a feeling that the loop Vops might be in the right direction?

Also just a quickie regarding hair,

I know there have been a few hair questions on this forum but from memory I think most of them were to do with shading. I'm curious about how the actual hair strands could be made? Could the strands geometry be made with vex? Any suggestions?

Thanks

Mark

Share this post


Link to post
Share on other sites

hi markmulli,

"Could the strands geometry be made with vex? Any suggestions?"

a watered down version - you could use geometry to create individual hairs..eg. a grid set to rows 1, columns 2 or the other way around, append a spring for motion (can hook this into chops)..you could then shade each primitive with a shader or using the point sop to shade.

Mike C.

perhaps sirogi could shed some more light on the subject? ;)

Share this post


Link to post
Share on other sites

uh, basically, you got it...

the curves are used as a backbone for the shader anyways...

I believe the previous posts go over the details...

It's much more efficient to do it this way rather than model it fully in geometry, but if it's game-style hair you're after, you might need to resort to texture-mapped planes attached to a surface.....check out the "fluffball" topic in the effects forum.....

(PS: shader ARE written in vex, VOPS are a nifty and flexible GUI for a VEX background, so......shaders are your friends ;) )

and the bushes, houses etc... are typically a job for either the copy SOP or one of the instance methods...VOPS are used to build operators (SOPS, SHOPS, COPS...), no to process data...that's the operators' job..

any of the rant made sense?

Cheers!

Share this post


Link to post
Share on other sites

thanks for the tips on the hair. i'll have a play with those ideas tonight.

"and the bushes, houses etc... are typically a job for either the copy SOP or one of the instance methods...VOPS are used to build operators (SOPS, SHOPS, COPS...), no to process data...that's the operators' job.."

hmm. I'm not sure that this applies to shader vops. unlike geometry VOPs there really is no network for shaders that is higher up than shader vops. the next highest thing is shops but they are not really designed to interact with each other and be wirded up. that's vops job. So i really do think this is a perfectly suitable task for vops shader networks. If it can't be done in vops perhaps i could do it in VEX?

anyone? :)

Mark

Share this post


Link to post
Share on other sites

my example of shrubs trees and houses may not have been the best, At first glance I could understand why you might recommend SOPS for this task but I have many other ideas for this that would do well not to use geometry. Ie. I really need to do this within a shading context.

picture a long wall with hundreds of different graffiti signatures on it.

I would like to create a few decal signatures and scatter them all over the wall within vops, with control over placement, scale, blurriness etc.

Of course I can already do this in vops manually with hundreds of texture and mix vops but I am looking for a much simpler more procedural way to solve this.

perhaps this is currently too complicated for vex/vops and would require the HDK?

sorry if I am sounding a bit confusing but I think something like this could be extremely powerful if it worked.

cheers,

Mark

Ps. I

Share this post


Link to post
Share on other sites

I really don't see why you split VOPS and VEX....they're really the same thing...

when you compile a VOPS operator, Houdini is writing the code for you in the background, and compiling it....so there are no places thet VEX can reach that VOPs can't, they're one same thing....

"perhaps this is currently too complicated for vex/vops and would require the HDK?"

easy there!...I'm pretty confident it doesn't :)

"picture a long wall with hundreds of different graffiti signatures on it.

I would like to create a few decal signatures and scatter them all over the wall within vops, with control over placement, scale, blurriness etc.

"

don't you think that copy stamping can handle this in SOPs?

that's exactly the case where you would use a copy SOP: randomize copies (and as many copy attributes as you wish) on the fly....have you used copy stamping before? it will give you the dynamic attributes you seek....

that is if you're doing this to geometry...

if you're after the graffiti shader you described, all you need is to use the "bombing technique" get out those dusty Rman books, it's all there in detail....it does exactly what you want, except you only need to give it the initial seed textures, and the shader will handle the random rotation, placement, etc...

PS: so do you want a shader or geometry instances?

is it any clearer? good luck...

Share this post


Link to post
Share on other sites

"perhaps this is currently too complicated for vex/vops and would require the HDK?"

easy there!...I'm pretty confident it doesn't"

i 2nd that!! unless you are creating geometry sops, or plugins etc...the HDK is unecessary. you can use UVW of the geometry to reference your textures, i dont know exactly what it would look like in code, but it shouldnt be to difficult to lookup...or just use VOPs to do the same thing. just one possible way to do what you want. :)

Mike C.

Share this post


Link to post
Share on other sites

hey sirogi

" I really don't see why you split VOPS and VEX....they're really the same thing...

when you compile a VOPS operator, Houdini is writing the code for you in the background, and compiling it....so there are no places thet VEX can reach that VOPs can't, they're one same thing...."

ah. sorry i was not being very clear was i.. i do agree with you. i'm not trying to seperate them. i know that vops is simply a visual interface for vex. however i was thinking that the standard set of vops that come with houdini may not cover the full range of vex functions and to get this full functionality you would need to do some hand coding. (hand coding is what i meant by vex) But who knows.. maybe the visual operators do have ALL the functionality of vex.. i have a lot to learn.

I think i will try and track down some of these renderman books you are talking about. :)

as for the copy sop solution. yes i agree the end resault would look fine.. however since it is in geometry and not in my vop network i would loose a lot of control over cetain things. i don't think i could do things easilly like adding a turbulant noise over all the graffiti textures (i know you probably have an answer for that too!) LOL. but seriously. As i have said. i need to do all this with pixels. not polys :-) even if it's just for the challenge of it all.. :)

ps. Anyone had any luck with the loop vops yet? while, for etc? I have read the manual but still can't work out how to use them for something usefull.

thanks for all the advice

Mark

Share this post


Link to post
Share on other sites

hey, Mark!

the standard set of vops that come with houdini may not cover the full range of vex functions

it's undrstandable that you might think that way, because GUIs would tend to be more restrictive than direct coding.....however

I believe that actually VOPS has many many more functions, because every tile you lay down in VOPS, I a whole small chunk of code in itself, if you open up a generated VEX file you'll see what I mean....so they're saving you from reinventing the wheel, and you still give you access to the regular VEX bulding blocks from VOPS....albeit in a handy "wrapped-easy to use" interface....

easy test: open up the VOPS menu: lotalotsa tiles, right? from complicaed ones to the elementary binary operations....

now open up the rederence html help that comes with VEX:all in all not that many functions (amazingly few actually, it's nuts what you can do with VEXwith that small but by no means limited set of functions....)

i would loose a lot of control over cetain things. i don't think i could do things easilly like adding a turbulant noise over all the graffiti textures

what I am trying to say is that your copies are by no means identical or static!

you can absolutely and most certainly have all the control you want of your geometry (EVEN over the shader params assigned to every piece of geometry!!!) adding all kinds of noises that god felt like creating if you use copy stamping, I promise :) .....I ask again: did you check it out?

careful, we're not talking about ol' plain "copy", but "copy-stamping"?

it's the cornerstone of many things houdini and has a sub-cult following on its own! it some argue it's the REASON why they use houdini, precisely because they can clone one object and assign different settings for each one! (yes, makes them driven by procedual noise and such too....)

sorry, I'm just insisting in that point, because it would be a shame to go and reinvent the whell (a VERY complicated wheel that is) for something that the software is known for and offering for free....

BTW, is the landscape with houses on hills your ACTUAL targeted application, or is it the graffiti wall....not clear which is the example and which is the actual problem.....

hope this helps....pls keep me posted :)

Share this post


Link to post
Share on other sites

jens wrote:

"All hail the mighty gods of the copy stamp!"

agreed, problem is, Mark would like to have it as a shader rather than a hip :P

Share this post


Link to post
Share on other sites

"agreed, problem is, Mark would like to have it as a shader rather than a hip "

...again, this is totally possible, and all depends on what Marc is *actually* trying to do.....the landscape, houses.....or just the graffiti wall (was that just an example?).....it's radically different depending on where you want to go...

I do trust he's is looking at the most efficient way of doing it.. ;)

Share this post


Link to post
Share on other sites

hehe, Hey sirogi. I admire you for your persistence with the copy sop! :D

I have tried stamping before but I have to admit I have not tried shader parameter stamping. Sounds awesome.. i will have to check it out when I get back from work tonight. ok now i have to make a few things clear that i should have made clear at the start of this topic..

both those examples are not real projects i am working on. they were simply hypothetical situations and since i want to do this in VOPs i prefer the graffiti example a bit more. To be honest. I am not really looking for the most efficient way to do this in all of Houdini. if i was to do this under a strict budget and timeframe for someone else. than yes, I most defiantly would be looking for the most efficient method in all of Houdini. But right now I am learning VOPs (VOPs addict) and i thought this would be a cool challenge to test the power of VOPs. what i do end up making in the end is undecided. but I

Share this post


Link to post
Share on other sites

" hehe, Hey sirogi. I admire you for your persistence with the copy sop! "

whoops...he he he....that's a sigh I got carried away :P

"shader parameter stamping. Sounds awesome"

yup, it was a pretty nifty trick! saved a friend of mine a lot of boring network rigging!....

"i prefer the graffiti example a bit more"

it should make for a cool shader, then :)

"but I

Share this post


Link to post
Share on other sites

hehe no worries.. hey, would you by any chance know how to import the following information into vops?

- the XYZ postion of an object in object space.

- the XYZ position of all the particles in a particle system.

thx

Mark

Share this post


Link to post
Share on other sites

haha. i can't believe i didn't see this before! ofcourse i can get the xyz position of any object i desire in vops. just use the parameter sop.. it didn't click at first because i was trying to do all my work from within vops eg looking for some thing that would directly access the object level and get my the parameters i wanted. but all it required was slightly different thinking.. apend a parameter sop to the xyz position of your texture and give the parameter a name. now it apears at the shop level and you can simply channel ref it to any values in houdini :-)

however I'd still like to know how to do the particles thing.

I'd like to make a pond that ripples whenever particles collide with it's surface. the ripples would need to start from exactly where the particle hit and radiate outward. again. i want to keep the deformation/shading stricktly in shaders. however if you have chops/sops soutions i'm all ears aswell :-)

any ideas?

Share this post


Link to post
Share on other sites

there was a houdini Demo file (v4.0) that did just that...with animated curveclay SOPs...

actually , to get your object params, a better way is to pop in a "global variables" Vop and use the P output...(I'm assuming by XYZ position of your object, you're talking about the surface points...)

If you're willing to go the pops route, particles can return all kinds of information about their hit time, hit position, or even hitUV on the collision surface....it's easy to lay a sprite animation (or something) at the hit coordinates...

doing it in the shader would be cool, except that I don't know that you can readily "import" a given set of particles into SHOPs (or Surface Vops to be accurate)...you can get all the info you want on your shaded object, since that's what the shader is going to modify , but getting "foreign" object data would be harder...maybe the colliding particles could set a surface attribute whenever they collide...

good luck...

Share this post


Link to post
Share on other sites

I'll have a go at doing it via the sops/pops rout to see if i can get any ideas about bringing it into shaders as i still really want to do this. In regards to the best way to import external values i was trying to import the xyz position of an object in object space not it's points. although for a particle you would be right about using the global variables vop.

cheers!

Mark

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
Sign in to follow this  

×