Restore the object's properties after applying in Blender 3D (apply location/rotation/scale) [closed] - blender

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I've made a game map in blender and accidentally applied the objects transformations.
I don't really understand how it works. My guess is that the properties getting zeroed because the origin of the object is being set to its center.
I've tried the "clear origin" option, but it doesn't work. Any suggestions?
Thank you,
Amir.

Presuming that I understood you correctly:
Alt+R : Clear Rotation
Alt+G : Clear Location
Alt+S : Clear Scale

When you have a complex object with a container and child transforms that hold the actual meshes, if you mistakenly Apply Location CTRL+A on your container (and it wasn't in the center) it will indeed annoyingly show the location gizmo for the object at the center of the scene (possibly with dotted lines pointing to the child origins).
To fix this (even if you applied location to the child transforms as well), Select your meshes (for example with B) and Set Origin CTRL+SHIFT+ALT+C to Geometry. (This will fix locations of transforms with meshes.)
Next either go to Edit mode TAB and select two (or more) of the extreme vertices - basically corners of the bounding box and Snap SHIFT+S Cursor to Selected (that should get your cursor to the very center of your collection).
Next Unparent ALT+P your transforms (Clear and Keep Transformation), Select your original parent container and Snap SHIFT+S Selection to Cursor.
Finally Select the children again and Parent CTRL+P them back to the container (by Selecting it last).
In the case of Scale and Rotation, if the Undo CTRL+Z didn't help you, then you'll need to manually adjust them back to how they used to be. Point of reference usually helps, if you've got a backup of a previous version, you can just compare to that. Otherwise you can create basic Cube Mesh SHIFT+A or use the grid and Ruler/Protractor (Tool Shelf T > Grease Pencil > Ruler/Protractor) to help you (notice the helpful CTRL guidance).
For Scale S, measure against known length (measured changed length / measured original length), divide the Scale (Properties > Object > Scale) by the resulting quotient and apply the result as new Scale. (Notice, that if you didn't change the Scale uniformly, you might need to do this separately for each axis.)
For Rotation R you'll need to do similar measurements and calculations, though simple manual adjustment with the help of CTRL might get you desired results.
After you've corrected Scale and Rotation, remember to Apply CTRL+A your result (but preferably not the Position).

Once you apply transformation to the object data, there is no way to get it back automatically since its a destructive operation (like flattening layers of an image or scaling it down).
Besides manually setting to the cursor and making that the origin, but that still misses rotation and scale.
you can use Origin tool with 'Origin To Geometry' option to reset the pivot, but thats all.

Related

How to close a surface with holes?

I have a binary volume that I have read into itk::Image. After creating the surface and the mesh, there are some wholes that need to be closed. I need to create a closed surface, however, the object values are reaching to the first row (horizontal or axial view of the volume) and also there are wholes in the starting and ending slice (z-direction), that is not letting the surface to be closed. There are some wholes on the surface as well. What solution do you suggest?
To fix the holes at the edges of the volume, simply pad out the volume with blank space so that the object does not reach the edge of the volume.
For other holes you could try VTK's FillHolesFilter:
https://vtk.org/doc/nightly/html/classvtkFillHolesFilter.html
You might have to play with the HoleSize parameter to get good results.

Center object and fix scaling

I have imported my ZBrush model of some glasses into Blender.
For some reason, the glasses are not centered at all, and I'm having a hard time to navigate it.
I would like to center it so take I can easily navigate around it.
I think the glasses are also not correctly scaled, but I guess I should care about that later.
I have uploaded my model here:
http://pasteall.org/blend/index.php?id=45773
Can anybody tell me how this should be done?
Thank you very much!
Bottom menu: Object -> Transform -> Origin to Geometry
[N] menu: set all three location values to 0.0
Profit
The first step makes sure the origin of your object lies in its geometric center. Currently, the origin is far, far below the glasses. The second step then simply moves your glasses to the center of the coordinate system.
Also, in the 'N' menu (hit 'N' to open it, will show up on the right hand side), you can set the scale just as easily as you have just set the location. Once you are happy with the scale, you might want to use Apply -> Scale (you can get that menu via CTRL+A) to make sure the new size will be used when exporting the model, for example.
Hope this helps. Oh, also: there is a dedicated Blender Stack Exchange.

suggested algorithms to prevent "image persistence" on an LCD screen [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a Windows application which is displayed on kiosk machines and often runs continuously for weeks. The application is full screen. For reference imagine a screen divided into 2 panels, the left one uses about 30% and the right fills the rest. The left panel is completely static and informational, the right panel has video, image and text slides rotate, animations, etc.
No surprise, the left panel can cause some "image persistence" (screen burn) issues. I am looking for suggested remedies on how to prevent the image persistence issue. I'm only concerned about LCD not CRT.
Check out this "wiper" style solution, give it a few seconds you'll see the line wipe across.
http://tinyurl.com/lprt6tr
I like this idea, simple and just overlay it on top, it will work anywhere.
But, my question is how much pixel color change is actually required to avoid the image persistence? Do you need to make sure the pixel changes color at least once every minute, 10 minutes, hour? Does it need to rotate through a range of colors? Does it need to hold a state for a period of time?
Any insight about how often and what kind of color change is needed to actually prevent the problem is what I'm looking for.
Thanks.
Though I agree to Ken White, I guess a double wiper, with a white trail on the left and a black one on the right, would be sufficient, since it would do a hard set on the pixels.
As for the update frequency, you don't need to set it as frequent as you have in your fiddle. See this fiddle: http://jsfiddle.net/4w2K3/83/
Notice I added a border to the sweeper element and changed the way your code works a bit.
var $burnGuard = $('<div>').attr('id','burnGuard').css({
'background-color':'#000',
'width':'1px',
'height':$(document).height()+'px',
'position':'absolute',
'top':'0px',
'left':'0px',
'border-left':'solid 1px',
'border-color':'#FFF',
'display':'none'
}).appendTo('body');
var delay = 10000, scrollDelay = 1000;
function burnGuardAnimate()
{
$burnGuard.css({
'left':'0px'
}).show().animate({
'left':$(window).width()+'px'
},scrollDelay,function(){
$(this).hide();
});
setTimeout(burnGuardAnimate,delay);
}
setTimeout(burnGuardAnimate,delay);
Since screens are basically a giant array of coloured lights (simplified) organised in sets of 3 (red, green and blue), according to colour composition, white would activate all three lights at once, while black is no light at all. So, sweeping this strong-contrast line across the screen would help. Though the timing is much more dependant on the hardware you're using and how often your screen changes naturally (ads, user interaction, etc) I don't know much about the hardware part, but I would suggest from personal experience with CRT monitors, running this every 15 minutes or so, it also depends how long you plan to maintain the same screen for the kiosk.

Prevent illustrator layer color over text being edited [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
When editing text in Illustrator, the text being edited receives a solid overlay of the colour of the layer it belongs.
This is sometimes annoying, as I would like to see the text with its own colour and effects.
How can I prevent this behaviour?
This question is probably better suited for http://graphicdesign.stackexchange.com. In the future, I'd recommend searching for answers and posting questions there. However, I understand that doesn't help you as quickly, so to answer your current question...
Under the View menu, you'll want to play with Hide Edges and Hide Bounding Box, depending on exactly what you're trying to accomplish, you may have to turn off both.
Bounding Box
The Bounding Box refers to a single perimeter around the furthest boundary of all currently selected objects. This also contains the transform controls/handles that can be seen at each corner, and in the middle of each side of the perimeter box. This does not affect the highlighting of individual object edges within the selection.
Edges
The Edges refers to the edges of each object within the current selection. If any of the objects are text objects, it also refers to the underlining within the text box.
It's worth noting that if you only have one object selected, you'll notice very little difference unless you choose to hide both Edges and Bounding Box.

Objective-C draw a path and detect when it closes (forms a closed shape)

I'm fairly new to game programming (but not to programming) and I want to create a space ship which leaves a trail on the screen. Now my problem is to come up with a solution how to detect if the trail left from the ship forms a closed shape - eg. if the ship left a trail around an object, the object is caught inside its trail so to speak.
The direction I'm thinking is to draw the path of the trail on an image not visible on the screen and every now and then try to fill it with certain color and then check if fill is caught within the trail path. However it seems like a lot of overhead.
Any ideas how to do that? I'm using cocos2d if that's of any help
In game programming you often need to think more mathematically than visually.
First does your ship continuously leaves a trail on the screen? If yes, then it will be easier to know when the shape closes : you just have to remember the coordinate where your ship started to leave a trail, then wait for the trail to approach this coordinate another time (for example within a radius of 10 pixels, or else the user will need to be really accurate to hit exactly the same pixel to close the shape).
The visual representation of the trail is only here for the user, you'll never use it to compute anything. What you will do is to keep in memory the path followed by the ship's trail : a polygon, which is nothing else than the list of coordinates it followed.
Then after you know that your shape is closed, you have to determine if an object is inside your polygon or not. It's possible that objective-c or cocos2d (I don't know much about it) already contains a built-in function to know if a point is inside a polygon. In java there is the Polygon class which makes this really easy. If you don't find anything you can do it yourself, there are already great answers about this subject on SO, here is a nice one : How can I determine whether a 2D Point is within a Polygon?