Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   render vertex - quick question (https://simplymaya.com/forum/showthread.php?t=32543)

Falott 01-06-2009 08:30 PM

render vertex - quick question
 
hi folks!

how do I go if I want to render only the vertices of an object, not the actual geometry itself. I´d like to render a night sky full of stars...


tia!

bendingiscool 01-06-2009 11:17 PM

That sounds like a pretty crappy way to go about doing it.

Instead either do it in post or use particles and play with their shader.

Chris

Falott 01-06-2009 11:41 PM

I appreciate your participation chris - tho I find your comment a little bit useless.

the reason why I´d like to use the verts for rendering is because I have a model now representig the (exact) coordinates of about 9000 stars with its vertices' position. in addition the verts are colored to match the apparent brightness of the stars at night.

unless you have an idea how to pointConstrain particles to the objects vertices and color each particle refering to the vertexcolor I think I stick to my plan.

nevertheless - thx for your reply

dan

Joopson 02-06-2009 01:35 AM

1 Attachment(s)
Hmm, no idea.
What immediately came to mind was to make a cube, and snap it to a vertex. Duplicate and snap to another, and so it goes.

then select them all and scale them until they look good, then apply a nice white shader with a glow. Then you get a nice looking starfield, though it takes a while...

Chirone 02-06-2009 01:45 AM

Quote:

Originally posted by Joopson
though it takes a while...
a repetitive task that can be automated no less... perhaps joopson's answer is actually correct (it's quite clever imo) and you just need to write a script that will duplicate and snap cubes to the verts.

just throwing in a suggestion, i don't actually know the code to do such things yet...
writing the code to duplicate an object would be simple, but i'm not quite sure how to cycle through every vertex in a mesh to snap the position of the cube to it
getting an array to enumerate through of all the verts in a mesh might actually be trivial, i'm not sure, haven't tried it...

i could possibly try and find out if you like joopson's idea... it does sound like an easy automatable task, although if you have 9000 cubes that could put a bit of a strain on your computer... (planes maybe not so being only 1/6 of a cube)

could possibly be an easier way....


not sure yet how to solve the colour problem though... unless you tell each cube/plane to change their colour depending on their distance from the camera, which will be dynamic, and you'd end up with 9000 materials in your hypershade and your scene would probably crash as soon as you open it....
unless you can assign one material to them all that changes depending on the distance of the object.... which might be possible with expressions..... doing the scripts and expressions for this might be mightily trivial and doable within 10 minutes... or it could be a nightmare and take a few hours or days...

actually i think how much glow you get depends on how far away from the camera the object is...

when do you need this done by?






or, you could just emit particles from object, they are emitted from the verticies.
i suppose you'd use per particle colouring too, haven't figured that one out though

gster123 02-06-2009 07:48 AM

Personally I would use particles, at their default emitting form vertexes is what they do when set to emit form an objhect with a mni/directional, setting their speed to 0 so thay stay on the surface, you are then open top how you want to shade them (instances, points etc etc).

If you wanted to do the scripting then you would need to find the vertex names with a loop then for each vertex find the position using Xform which you can then use to position a cube. I did something similar for some research to pass mocap animated scanned data into FEA fluid analysis that required the vertex positions on a per frame basis.

bendingiscool 02-06-2009 09:34 AM

I made a script awhile back to snap particles to vertices, I shall post it up later in the day, should get you started.

Chris

gster123 02-06-2009 11:02 AM

Chris, theres no real need to unless you get more control over standard emissions. They emit from the vertexes when using omni etc, so with the speed set to 0 they will stick to them, unless you need them to move at all but then you could use the goal weight.

mastone 05-06-2009 09:23 PM

Call me stupid, but i would use a granite 3d texture you can fiddle with 3 color tabs
randomize it etc.
it's easier then particles and if you apply particles on a sphere it would be evenly spaced so it wouldn't look right

Chirone 05-06-2009 11:30 PM

a good point but by the sounds of it falott won't have a sphere, as mentioned before the exact coordinates of the stars has been mapped out, and i don't think granite texture would give the control to put star-looking features in the place of intention

oh well.. i guess we can only wait to see what falott choses to do

Increality 25-09-2013 11:16 PM

This topic is a bit old, but just in case someone stumbles across it again like I just did.
I've gathered part of this info from this Maya wireframe interface tutorial - YouTube on youtube which describes rendering wires. But you don't need to watch the video unless you need further clarification, I'll explain below:

Select desired object, in Attribute Editor, go to Drawing Overrides (believe it's under the shape tab). Check the box for Enable Overrides, turn Shading off. Alternatively you can leave shading on if desired and you'll render the vertices on top of the mesh (less control this way when going into post).

Convert your object to a softbody (this allows vertices to render). Dynamics (upper left dropdown)> Soft/Rigid Bodies> Create Soft Body (default options should be ok).
Set renderer to Maya Hardware. Batch render, or whatever you need to do. PNG or Tiff to save out the alpha.

You can also switch to Hardware 2.0 to render out the wires separately...Maya Hardware 2.0 Tab> Batch Render Options>Render Mode> Wires. Under MultiSample Anti-Aliasing, set it on and to 16 sample count.

Hope this helps

*edit* I forgot to mention, changing the color under Drawing Overrides will change the color of your wires/vertices. Also, Maya is a bit finicky when Batch rendering Maya Hardware. Don't hit the options box for Batch Render, just hit the Batch Render text.


All times are GMT. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018